[X86] IsNOT - don't fold not(pcmpgt(C1, C2)) -> pcmpgt(C2, C1 - 1)
[llvm-project.git] / llvm / test / CodeGen / RISCV / GlobalISel / legalizer / rvv / legalize-vscale-rv64.mir
blobfea094d73736efc62cf876ceedd601609e1c6b9e
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -mattr=+v,+m -run-pass=legalizer %s -o - | FileCheck %s
4 ---
5 name:            test_1
6 body:             |
7   bb.0.entry:
9     ; CHECK-LABEL: name: test_1
10     ; CHECK: [[READ_VLENB:%[0-9]+]]:_(s64) = G_READ_VLENB
11     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
12     ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[READ_VLENB]], [[C]](s64)
13     ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
14     ; CHECK-NEXT: PseudoRET implicit $x10
15     %0:_(s64) = G_VSCALE i64 1
16     $x10 = COPY %0
17     PseudoRET implicit $x10
18 ...
19 ---
20 name:            test_2
21 body:             |
22   bb.0.entry:
24     ; CHECK-LABEL: name: test_2
25     ; CHECK: [[READ_VLENB:%[0-9]+]]:_(s64) = G_READ_VLENB
26     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
27     ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[READ_VLENB]], [[C]](s64)
28     ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
29     ; CHECK-NEXT: PseudoRET implicit $x10
30     %0:_(s64) = G_VSCALE i64 2
31     $x10 = COPY %0
32     PseudoRET implicit $x10
33 ...
34 ---
35 name:            test_3
36 body:             |
37   bb.0.entry:
39     ; CHECK-LABEL: name: test_3
40     ; CHECK: [[READ_VLENB:%[0-9]+]]:_(s64) = G_READ_VLENB
41     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
42     ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[READ_VLENB]], [[C]](s64)
43     ; CHECK-NEXT: [[MUL:%[0-9]+]]:_(s64) = G_MUL [[LSHR]], [[C]]
44     ; CHECK-NEXT: $x10 = COPY [[MUL]](s64)
45     ; CHECK-NEXT: PseudoRET implicit $x10
46     %0:_(s64) = G_VSCALE i64 3
47     $x10 = COPY %0
48     PseudoRET implicit $x10
49 ...
50 ---
51 name:            test_4
52 body:             |
53   bb.0.entry:
55     ; CHECK-LABEL: name: test_4
56     ; CHECK: [[READ_VLENB:%[0-9]+]]:_(s64) = G_READ_VLENB
57     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
58     ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[READ_VLENB]], [[C]](s64)
59     ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
60     ; CHECK-NEXT: PseudoRET implicit $x10
61     %0:_(s64) = G_VSCALE i64 4
62     $x10 = COPY %0
63     PseudoRET implicit $x10
64 ...
65 ---
66 name:            test_8
67 body:             |
68   bb.0.entry:
70     ; CHECK-LABEL: name: test_8
71     ; CHECK: [[READ_VLENB:%[0-9]+]]:_(s64) = G_READ_VLENB
72     ; CHECK-NEXT: $x10 = COPY [[READ_VLENB]](s64)
73     ; CHECK-NEXT: PseudoRET implicit $x10
74     %0:_(s64) = G_VSCALE i64 8
75     $x10 = COPY %0
76     PseudoRET implicit $x10
77 ...
78 ---
79 name:            test_16
80 body:             |
81   bb.0.entry:
83     ; CHECK-LABEL: name: test_16
84     ; CHECK: [[READ_VLENB:%[0-9]+]]:_(s64) = G_READ_VLENB
85     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
86     ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[READ_VLENB]], [[C]](s64)
87     ; CHECK-NEXT: $x10 = COPY [[SHL]](s64)
88     ; CHECK-NEXT: PseudoRET implicit $x10
89     %0:_(s64) = G_VSCALE i64 16
90     $x10 = COPY %0
91     PseudoRET implicit $x10
92 ...
93 ---
94 name:            test_40
95 body:             |
96   bb.0.entry:
98     ; CHECK-LABEL: name: test_40
99     ; CHECK: [[READ_VLENB:%[0-9]+]]:_(s64) = G_READ_VLENB
100     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
101     ; CHECK-NEXT: [[MUL:%[0-9]+]]:_(s64) = G_MUL [[READ_VLENB]], [[C]]
102     ; CHECK-NEXT: $x10 = COPY [[MUL]](s64)
103     ; CHECK-NEXT: PseudoRET implicit $x10
104     %0:_(s64) = G_VSCALE i64 40
105     $x10 = COPY %0
106     PseudoRET implicit $x10