OLD | NEW |
1 ; This file checks support for comparing vector values with the icmp | 1 ; This file checks support for comparing vector values with the icmp |
2 ; instruction. | 2 ; instruction. |
3 | 3 |
4 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 4 ; RUN: %p2i -i %s --assemble --disassemble --args -O2 --verbose none \ |
5 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | 5 ; RUN: | FileCheck %s |
6 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | 6 ; RUN: %p2i -i %s --assemble --disassemble --args -Om1 --verbose none \ |
7 ; RUN: %p2i -i %s --args -Om1 --verbose none \ | 7 ; RUN: | FileCheck %s |
8 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | |
9 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | |
10 | 8 |
11 ; Check that sext elimination occurs when the result of the comparison | 9 ; Check that sext elimination occurs when the result of the comparison |
12 ; instruction is alrady sign extended. Sign extension to 4 x i32 uses | 10 ; instruction is alrady sign extended. Sign extension to 4 x i32 uses |
13 ; the pslld instruction. | 11 ; the pslld instruction. |
14 define <4 x i32> @test_sext_elimination(<4 x i32> %a, <4 x i32> %b) { | 12 define <4 x i32> @test_sext_elimination(<4 x i32> %a, <4 x i32> %b) { |
15 entry: | 13 entry: |
16 %res.trunc = icmp eq <4 x i32> %a, %b | 14 %res.trunc = icmp eq <4 x i32> %a, %b |
17 %res = sext <4 x i1> %res.trunc to <4 x i32> | 15 %res = sext <4 x i1> %res.trunc to <4 x i32> |
18 ret <4 x i32> %res | 16 ret <4 x i32> %res |
19 ; CHECK-LABEL: test_sext_elimination: | 17 ; CHECK-LABEL: test_sext_elimination |
20 ; CHECK: pcmpeqd | 18 ; CHECK: pcmpeqd |
21 ; CHECK-NOT: pslld | 19 ; CHECK-NOT: pslld |
22 } | 20 } |
23 | 21 |
24 define <4 x i1> @test_icmp_v4i32_eq(<4 x i32> %a, <4 x i32> %b) { | 22 define <4 x i1> @test_icmp_v4i32_eq(<4 x i32> %a, <4 x i32> %b) { |
25 entry: | 23 entry: |
26 %res = icmp eq <4 x i32> %a, %b | 24 %res = icmp eq <4 x i32> %a, %b |
27 ret <4 x i1> %res | 25 ret <4 x i1> %res |
28 ; CHECK-LABEL: test_icmp_v4i32_eq: | 26 ; CHECK-LABEL: test_icmp_v4i32_eq |
29 ; CHECK: pcmpeqd | 27 ; CHECK: pcmpeqd |
30 } | 28 } |
31 | 29 |
32 define <4 x i1> @test_icmp_v4i32_ne(<4 x i32> %a, <4 x i32> %b) { | 30 define <4 x i1> @test_icmp_v4i32_ne(<4 x i32> %a, <4 x i32> %b) { |
33 entry: | 31 entry: |
34 %res = icmp ne <4 x i32> %a, %b | 32 %res = icmp ne <4 x i32> %a, %b |
35 ret <4 x i1> %res | 33 ret <4 x i1> %res |
36 ; CHECK-LABEL: test_icmp_v4i32_ne: | 34 ; CHECK-LABEL: test_icmp_v4i32_ne |
37 ; CHECK: pcmpeqd | 35 ; CHECK: pcmpeqd |
38 ; CHECK: pxor | 36 ; CHECK: pxor |
39 } | 37 } |
40 | 38 |
41 define <4 x i1> @test_icmp_v4i32_sgt(<4 x i32> %a, <4 x i32> %b) { | 39 define <4 x i1> @test_icmp_v4i32_sgt(<4 x i32> %a, <4 x i32> %b) { |
42 entry: | 40 entry: |
43 %res = icmp sgt <4 x i32> %a, %b | 41 %res = icmp sgt <4 x i32> %a, %b |
44 ret <4 x i1> %res | 42 ret <4 x i1> %res |
45 ; CHECK: pcmpgtd | 43 ; CHECK: pcmpgtd |
46 } | 44 } |
47 | 45 |
48 define <4 x i1> @test_icmp_v4i32_sle(<4 x i32> %a, <4 x i32> %b) { | 46 define <4 x i1> @test_icmp_v4i32_sle(<4 x i32> %a, <4 x i32> %b) { |
49 entry: | 47 entry: |
50 %res = icmp sle <4 x i32> %a, %b | 48 %res = icmp sle <4 x i32> %a, %b |
51 ret <4 x i1> %res | 49 ret <4 x i1> %res |
52 ; CHECK-LABEL: test_icmp_v4i32_sle: | 50 ; CHECK-LABEL: test_icmp_v4i32_sle |
53 ; CHECK: pcmpgtd | 51 ; CHECK: pcmpgtd |
54 ; CHECK: pxor | 52 ; CHECK: pxor |
55 } | 53 } |
56 | 54 |
57 define <4 x i1> @test_icmp_v4i32_slt(<4 x i32> %a, <4 x i32> %b) { | 55 define <4 x i1> @test_icmp_v4i32_slt(<4 x i32> %a, <4 x i32> %b) { |
58 entry: | 56 entry: |
59 %res = icmp slt <4 x i32> %a, %b | 57 %res = icmp slt <4 x i32> %a, %b |
60 ret <4 x i1> %res | 58 ret <4 x i1> %res |
61 ; CHECK-LABEL: test_icmp_v4i32_slt: | 59 ; CHECK-LABEL: test_icmp_v4i32_slt |
62 ; CHECK: pcmpgtd | 60 ; CHECK: pcmpgtd |
63 } | 61 } |
64 | 62 |
65 define <4 x i1> @test_icmp_v4i32_uge(<4 x i32> %a, <4 x i32> %b) { | 63 define <4 x i1> @test_icmp_v4i32_uge(<4 x i32> %a, <4 x i32> %b) { |
66 entry: | 64 entry: |
67 %res = icmp uge <4 x i32> %a, %b | 65 %res = icmp uge <4 x i32> %a, %b |
68 ret <4 x i1> %res | 66 ret <4 x i1> %res |
69 ; CHECK-LABEL: test_icmp_v4i32_uge: | 67 ; CHECK-LABEL: test_icmp_v4i32_uge |
70 ; CHECK: pxor | 68 ; CHECK: pxor |
71 ; CHECK: pcmpgtd | 69 ; CHECK: pcmpgtd |
72 ; CHECK: pxor | 70 ; CHECK: pxor |
73 } | 71 } |
74 | 72 |
75 define <4 x i1> @test_icmp_v4i32_ugt(<4 x i32> %a, <4 x i32> %b) { | 73 define <4 x i1> @test_icmp_v4i32_ugt(<4 x i32> %a, <4 x i32> %b) { |
76 entry: | 74 entry: |
77 %res = icmp ugt <4 x i32> %a, %b | 75 %res = icmp ugt <4 x i32> %a, %b |
78 ret <4 x i1> %res | 76 ret <4 x i1> %res |
79 ; CHECK-LABEL: test_icmp_v4i32_ugt: | 77 ; CHECK-LABEL: test_icmp_v4i32_ugt |
80 ; CHECK: pxor | 78 ; CHECK: pxor |
81 ; CHECK: pcmpgtd | 79 ; CHECK: pcmpgtd |
82 } | 80 } |
83 | 81 |
84 define <4 x i1> @test_icmp_v4i32_ule(<4 x i32> %a, <4 x i32> %b) { | 82 define <4 x i1> @test_icmp_v4i32_ule(<4 x i32> %a, <4 x i32> %b) { |
85 entry: | 83 entry: |
86 %res = icmp ule <4 x i32> %a, %b | 84 %res = icmp ule <4 x i32> %a, %b |
87 ret <4 x i1> %res | 85 ret <4 x i1> %res |
88 ; CHECK-LABEL: test_icmp_v4i32_ule: | 86 ; CHECK-LABEL: test_icmp_v4i32_ule |
89 ; CHECK: pxor | 87 ; CHECK: pxor |
90 ; CHECK: pcmpgtd | 88 ; CHECK: pcmpgtd |
91 ; CHECK: pxor | 89 ; CHECK: pxor |
92 } | 90 } |
93 | 91 |
94 define <4 x i1> @test_icmp_v4i32_ult(<4 x i32> %a, <4 x i32> %b) { | 92 define <4 x i1> @test_icmp_v4i32_ult(<4 x i32> %a, <4 x i32> %b) { |
95 entry: | 93 entry: |
96 %res = icmp ult <4 x i32> %a, %b | 94 %res = icmp ult <4 x i32> %a, %b |
97 ret <4 x i1> %res | 95 ret <4 x i1> %res |
98 ; CHECK-LABEL: test_icmp_v4i32_ult: | 96 ; CHECK-LABEL: test_icmp_v4i32_ult |
99 ; CHECK: pxor | 97 ; CHECK: pxor |
100 ; CHECK: pcmpgtd | 98 ; CHECK: pcmpgtd |
101 } | 99 } |
102 | 100 |
103 define <4 x i1> @test_icmp_v4i1_eq(<4 x i1> %a, <4 x i1> %b) { | 101 define <4 x i1> @test_icmp_v4i1_eq(<4 x i1> %a, <4 x i1> %b) { |
104 entry: | 102 entry: |
105 %res = icmp eq <4 x i1> %a, %b | 103 %res = icmp eq <4 x i1> %a, %b |
106 ret <4 x i1> %res | 104 ret <4 x i1> %res |
107 ; CHECK-LABEL: test_icmp_v4i1_eq: | 105 ; CHECK-LABEL: test_icmp_v4i1_eq |
108 ; CHECK: pcmpeqd | 106 ; CHECK: pcmpeqd |
109 } | 107 } |
110 | 108 |
111 define <4 x i1> @test_icmp_v4i1_ne(<4 x i1> %a, <4 x i1> %b) { | 109 define <4 x i1> @test_icmp_v4i1_ne(<4 x i1> %a, <4 x i1> %b) { |
112 entry: | 110 entry: |
113 %res = icmp ne <4 x i1> %a, %b | 111 %res = icmp ne <4 x i1> %a, %b |
114 ret <4 x i1> %res | 112 ret <4 x i1> %res |
115 ; CHECK-LABEL: test_icmp_v4i1_ne: | 113 ; CHECK-LABEL: test_icmp_v4i1_ne |
116 ; CHECK: pcmpeqd | 114 ; CHECK: pcmpeqd |
117 ; CHECK: pxor | 115 ; CHECK: pxor |
118 } | 116 } |
119 | 117 |
120 define <4 x i1> @test_icmp_v4i1_sgt(<4 x i1> %a, <4 x i1> %b) { | 118 define <4 x i1> @test_icmp_v4i1_sgt(<4 x i1> %a, <4 x i1> %b) { |
121 entry: | 119 entry: |
122 %res = icmp sgt <4 x i1> %a, %b | 120 %res = icmp sgt <4 x i1> %a, %b |
123 ret <4 x i1> %res | 121 ret <4 x i1> %res |
124 ; CHECK-LABEL: test_icmp_v4i1_sgt: | 122 ; CHECK-LABEL: test_icmp_v4i1_sgt |
125 ; CHECK: pcmpgtd | 123 ; CHECK: pcmpgtd |
126 } | 124 } |
127 | 125 |
128 define <4 x i1> @test_icmp_v4i1_sle(<4 x i1> %a, <4 x i1> %b) { | 126 define <4 x i1> @test_icmp_v4i1_sle(<4 x i1> %a, <4 x i1> %b) { |
129 entry: | 127 entry: |
130 %res = icmp sle <4 x i1> %a, %b | 128 %res = icmp sle <4 x i1> %a, %b |
131 ret <4 x i1> %res | 129 ret <4 x i1> %res |
132 ; CHECK-LABEL: test_icmp_v4i1_sle: | 130 ; CHECK-LABEL: test_icmp_v4i1_sle |
133 ; CHECK: pcmpgtd | 131 ; CHECK: pcmpgtd |
134 ; CHECK: pxor | 132 ; CHECK: pxor |
135 } | 133 } |
136 | 134 |
137 define <4 x i1> @test_icmp_v4i1_slt(<4 x i1> %a, <4 x i1> %b) { | 135 define <4 x i1> @test_icmp_v4i1_slt(<4 x i1> %a, <4 x i1> %b) { |
138 entry: | 136 entry: |
139 %res = icmp slt <4 x i1> %a, %b | 137 %res = icmp slt <4 x i1> %a, %b |
140 ret <4 x i1> %res | 138 ret <4 x i1> %res |
141 ; CHECK-LABEL: test_icmp_v4i1_slt: | 139 ; CHECK-LABEL: test_icmp_v4i1_slt |
142 ; CHECK: pcmpgtd | 140 ; CHECK: pcmpgtd |
143 } | 141 } |
144 | 142 |
145 define <4 x i1> @test_icmp_v4i1_uge(<4 x i1> %a, <4 x i1> %b) { | 143 define <4 x i1> @test_icmp_v4i1_uge(<4 x i1> %a, <4 x i1> %b) { |
146 entry: | 144 entry: |
147 %res = icmp uge <4 x i1> %a, %b | 145 %res = icmp uge <4 x i1> %a, %b |
148 ret <4 x i1> %res | 146 ret <4 x i1> %res |
149 ; CHECK-LABEL: test_icmp_v4i1_uge: | 147 ; CHECK-LABEL: test_icmp_v4i1_uge |
150 ; CHECK: pxor | 148 ; CHECK: pxor |
151 ; CHECK: pcmpgtd | 149 ; CHECK: pcmpgtd |
152 ; CHECK: pxor | 150 ; CHECK: pxor |
153 } | 151 } |
154 | 152 |
155 define <4 x i1> @test_icmp_v4i1_ugt(<4 x i1> %a, <4 x i1> %b) { | 153 define <4 x i1> @test_icmp_v4i1_ugt(<4 x i1> %a, <4 x i1> %b) { |
156 entry: | 154 entry: |
157 %res = icmp ugt <4 x i1> %a, %b | 155 %res = icmp ugt <4 x i1> %a, %b |
158 ret <4 x i1> %res | 156 ret <4 x i1> %res |
159 ; CHECK-LABEL: test_icmp_v4i1_ugt: | 157 ; CHECK-LABEL: test_icmp_v4i1_ugt |
160 ; CHECK: pxor | 158 ; CHECK: pxor |
161 ; CHECK: pcmpgtd | 159 ; CHECK: pcmpgtd |
162 } | 160 } |
163 | 161 |
164 define <4 x i1> @test_icmp_v4i1_ule(<4 x i1> %a, <4 x i1> %b) { | 162 define <4 x i1> @test_icmp_v4i1_ule(<4 x i1> %a, <4 x i1> %b) { |
165 entry: | 163 entry: |
166 %res = icmp ule <4 x i1> %a, %b | 164 %res = icmp ule <4 x i1> %a, %b |
167 ret <4 x i1> %res | 165 ret <4 x i1> %res |
168 ; CHECK-LABEL: test_icmp_v4i1_ule: | 166 ; CHECK-LABEL: test_icmp_v4i1_ule |
169 ; CHECK: pxor | 167 ; CHECK: pxor |
170 ; CHECK: pcmpgtd | 168 ; CHECK: pcmpgtd |
171 ; CHECK: pxor | 169 ; CHECK: pxor |
172 } | 170 } |
173 | 171 |
174 define <4 x i1> @test_icmp_v4i1_ult(<4 x i1> %a, <4 x i1> %b) { | 172 define <4 x i1> @test_icmp_v4i1_ult(<4 x i1> %a, <4 x i1> %b) { |
175 entry: | 173 entry: |
176 %res = icmp ult <4 x i1> %a, %b | 174 %res = icmp ult <4 x i1> %a, %b |
177 ret <4 x i1> %res | 175 ret <4 x i1> %res |
178 ; CHECK-LABEL: test_icmp_v4i1_ult: | 176 ; CHECK-LABEL: test_icmp_v4i1_ult |
179 ; CHECK: pxor | 177 ; CHECK: pxor |
180 ; CHECK: pcmpgtd | 178 ; CHECK: pcmpgtd |
181 } | 179 } |
182 | 180 |
183 define <8 x i1> @test_icmp_v8i16_eq(<8 x i16> %a, <8 x i16> %b) { | 181 define <8 x i1> @test_icmp_v8i16_eq(<8 x i16> %a, <8 x i16> %b) { |
184 entry: | 182 entry: |
185 %res = icmp eq <8 x i16> %a, %b | 183 %res = icmp eq <8 x i16> %a, %b |
186 ret <8 x i1> %res | 184 ret <8 x i1> %res |
187 ; CHECK-LABEL: test_icmp_v8i16_eq: | 185 ; CHECK-LABEL: test_icmp_v8i16_eq |
188 ; CHECK: pcmpeqw | 186 ; CHECK: pcmpeqw |
189 } | 187 } |
190 | 188 |
191 define <8 x i1> @test_icmp_v8i16_ne(<8 x i16> %a, <8 x i16> %b) { | 189 define <8 x i1> @test_icmp_v8i16_ne(<8 x i16> %a, <8 x i16> %b) { |
192 entry: | 190 entry: |
193 %res = icmp ne <8 x i16> %a, %b | 191 %res = icmp ne <8 x i16> %a, %b |
194 ret <8 x i1> %res | 192 ret <8 x i1> %res |
195 ; CHECK-LABEL: test_icmp_v8i16_ne: | 193 ; CHECK-LABEL: test_icmp_v8i16_ne |
196 ; CHECK: pcmpeqw | 194 ; CHECK: pcmpeqw |
197 ; CHECK: pxor | 195 ; CHECK: pxor |
198 } | 196 } |
199 | 197 |
200 define <8 x i1> @test_icmp_v8i16_sgt(<8 x i16> %a, <8 x i16> %b) { | 198 define <8 x i1> @test_icmp_v8i16_sgt(<8 x i16> %a, <8 x i16> %b) { |
201 entry: | 199 entry: |
202 %res = icmp sgt <8 x i16> %a, %b | 200 %res = icmp sgt <8 x i16> %a, %b |
203 ret <8 x i1> %res | 201 ret <8 x i1> %res |
204 ; CHECK-LABEL: test_icmp_v8i16_sgt: | 202 ; CHECK-LABEL: test_icmp_v8i16_sgt |
205 ; CHECK: pcmpgtw | 203 ; CHECK: pcmpgtw |
206 } | 204 } |
207 | 205 |
208 define <8 x i1> @test_icmp_v8i16_sle(<8 x i16> %a, <8 x i16> %b) { | 206 define <8 x i1> @test_icmp_v8i16_sle(<8 x i16> %a, <8 x i16> %b) { |
209 entry: | 207 entry: |
210 %res = icmp sle <8 x i16> %a, %b | 208 %res = icmp sle <8 x i16> %a, %b |
211 ret <8 x i1> %res | 209 ret <8 x i1> %res |
212 ; CHECK-LABEL: test_icmp_v8i16_sle: | 210 ; CHECK-LABEL: test_icmp_v8i16_sle |
213 ; CHECK: pcmpgtw | 211 ; CHECK: pcmpgtw |
214 ; CHECK: pxor | 212 ; CHECK: pxor |
215 } | 213 } |
216 | 214 |
217 define <8 x i1> @test_icmp_v8i16_slt(<8 x i16> %a, <8 x i16> %b) { | 215 define <8 x i1> @test_icmp_v8i16_slt(<8 x i16> %a, <8 x i16> %b) { |
218 entry: | 216 entry: |
219 %res = icmp slt <8 x i16> %a, %b | 217 %res = icmp slt <8 x i16> %a, %b |
220 ret <8 x i1> %res | 218 ret <8 x i1> %res |
221 ; CHECK-LABEL: test_icmp_v8i16_slt: | 219 ; CHECK-LABEL: test_icmp_v8i16_slt |
222 ; CHECK: pcmpgtw | 220 ; CHECK: pcmpgtw |
223 } | 221 } |
224 | 222 |
225 define <8 x i1> @test_icmp_v8i16_uge(<8 x i16> %a, <8 x i16> %b) { | 223 define <8 x i1> @test_icmp_v8i16_uge(<8 x i16> %a, <8 x i16> %b) { |
226 entry: | 224 entry: |
227 %res = icmp uge <8 x i16> %a, %b | 225 %res = icmp uge <8 x i16> %a, %b |
228 ret <8 x i1> %res | 226 ret <8 x i1> %res |
229 ; CHECK-LABEL: test_icmp_v8i16_uge: | 227 ; CHECK-LABEL: test_icmp_v8i16_uge |
230 ; CHECK: pxor | 228 ; CHECK: pxor |
231 ; CHECK: pcmpgtw | 229 ; CHECK: pcmpgtw |
232 ; CHECK: pxor | 230 ; CHECK: pxor |
233 } | 231 } |
234 | 232 |
235 define <8 x i1> @test_icmp_v8i16_ugt(<8 x i16> %a, <8 x i16> %b) { | 233 define <8 x i1> @test_icmp_v8i16_ugt(<8 x i16> %a, <8 x i16> %b) { |
236 entry: | 234 entry: |
237 %res = icmp ugt <8 x i16> %a, %b | 235 %res = icmp ugt <8 x i16> %a, %b |
238 ret <8 x i1> %res | 236 ret <8 x i1> %res |
239 ; CHECK-LABEL: test_icmp_v8i16_ugt: | 237 ; CHECK-LABEL: test_icmp_v8i16_ugt |
240 ; CHECK: pxor | 238 ; CHECK: pxor |
241 ; CHECK: pcmpgtw | 239 ; CHECK: pcmpgtw |
242 } | 240 } |
243 | 241 |
244 define <8 x i1> @test_icmp_v8i16_ule(<8 x i16> %a, <8 x i16> %b) { | 242 define <8 x i1> @test_icmp_v8i16_ule(<8 x i16> %a, <8 x i16> %b) { |
245 entry: | 243 entry: |
246 %res = icmp ule <8 x i16> %a, %b | 244 %res = icmp ule <8 x i16> %a, %b |
247 ret <8 x i1> %res | 245 ret <8 x i1> %res |
248 ; CHECK-LABEL: test_icmp_v8i16_ule: | 246 ; CHECK-LABEL: test_icmp_v8i16_ule |
249 ; CHECK: pxor | 247 ; CHECK: pxor |
250 ; CHECK: pcmpgtw | 248 ; CHECK: pcmpgtw |
251 ; CHECK: pxor | 249 ; CHECK: pxor |
252 } | 250 } |
253 | 251 |
254 define <8 x i1> @test_icmp_v8i16_ult(<8 x i16> %a, <8 x i16> %b) { | 252 define <8 x i1> @test_icmp_v8i16_ult(<8 x i16> %a, <8 x i16> %b) { |
255 entry: | 253 entry: |
256 %res = icmp ult <8 x i16> %a, %b | 254 %res = icmp ult <8 x i16> %a, %b |
257 ret <8 x i1> %res | 255 ret <8 x i1> %res |
258 ; CHECK-LABEL: test_icmp_v8i16_ult: | 256 ; CHECK-LABEL: test_icmp_v8i16_ult |
259 ; CHECK: pxor | 257 ; CHECK: pxor |
260 ; CHECK: pcmpgtw | 258 ; CHECK: pcmpgtw |
261 } | 259 } |
262 | 260 |
263 define <8 x i1> @test_icmp_v8i1_eq(<8 x i1> %a, <8 x i1> %b) { | 261 define <8 x i1> @test_icmp_v8i1_eq(<8 x i1> %a, <8 x i1> %b) { |
264 entry: | 262 entry: |
265 %res = icmp eq <8 x i1> %a, %b | 263 %res = icmp eq <8 x i1> %a, %b |
266 ret <8 x i1> %res | 264 ret <8 x i1> %res |
267 ; CHECK-LABEL: test_icmp_v8i1_eq: | 265 ; CHECK-LABEL: test_icmp_v8i1_eq |
268 ; CHECK: pcmpeqw | 266 ; CHECK: pcmpeqw |
269 } | 267 } |
270 | 268 |
271 define <8 x i1> @test_icmp_v8i1_ne(<8 x i1> %a, <8 x i1> %b) { | 269 define <8 x i1> @test_icmp_v8i1_ne(<8 x i1> %a, <8 x i1> %b) { |
272 entry: | 270 entry: |
273 %res = icmp ne <8 x i1> %a, %b | 271 %res = icmp ne <8 x i1> %a, %b |
274 ret <8 x i1> %res | 272 ret <8 x i1> %res |
275 ; CHECK-LABEL: test_icmp_v8i1_ne: | 273 ; CHECK-LABEL: test_icmp_v8i1_ne |
276 ; CHECK: pcmpeqw | 274 ; CHECK: pcmpeqw |
277 ; CHECK: pxor | 275 ; CHECK: pxor |
278 } | 276 } |
279 | 277 |
280 define <8 x i1> @test_icmp_v8i1_sgt(<8 x i1> %a, <8 x i1> %b) { | 278 define <8 x i1> @test_icmp_v8i1_sgt(<8 x i1> %a, <8 x i1> %b) { |
281 entry: | 279 entry: |
282 %res = icmp sgt <8 x i1> %a, %b | 280 %res = icmp sgt <8 x i1> %a, %b |
283 ret <8 x i1> %res | 281 ret <8 x i1> %res |
284 ; CHECK-LABEL: test_icmp_v8i1_sgt: | 282 ; CHECK-LABEL: test_icmp_v8i1_sgt |
285 ; CHECK: pcmpgtw | 283 ; CHECK: pcmpgtw |
286 } | 284 } |
287 | 285 |
288 define <8 x i1> @test_icmp_v8i1_sle(<8 x i1> %a, <8 x i1> %b) { | 286 define <8 x i1> @test_icmp_v8i1_sle(<8 x i1> %a, <8 x i1> %b) { |
289 entry: | 287 entry: |
290 %res = icmp sle <8 x i1> %a, %b | 288 %res = icmp sle <8 x i1> %a, %b |
291 ret <8 x i1> %res | 289 ret <8 x i1> %res |
292 ; CHECK-LABEL: test_icmp_v8i1_sle: | 290 ; CHECK-LABEL: test_icmp_v8i1_sle |
293 ; CHECK: pcmpgtw | 291 ; CHECK: pcmpgtw |
294 ; CHECK: pxor | 292 ; CHECK: pxor |
295 } | 293 } |
296 | 294 |
297 define <8 x i1> @test_icmp_v8i1_slt(<8 x i1> %a, <8 x i1> %b) { | 295 define <8 x i1> @test_icmp_v8i1_slt(<8 x i1> %a, <8 x i1> %b) { |
298 entry: | 296 entry: |
299 %res = icmp slt <8 x i1> %a, %b | 297 %res = icmp slt <8 x i1> %a, %b |
300 ret <8 x i1> %res | 298 ret <8 x i1> %res |
301 ; CHECK-LABEL: test_icmp_v8i1_slt: | 299 ; CHECK-LABEL: test_icmp_v8i1_slt |
302 ; CHECK: pcmpgtw | 300 ; CHECK: pcmpgtw |
303 } | 301 } |
304 | 302 |
305 define <8 x i1> @test_icmp_v8i1_uge(<8 x i1> %a, <8 x i1> %b) { | 303 define <8 x i1> @test_icmp_v8i1_uge(<8 x i1> %a, <8 x i1> %b) { |
306 entry: | 304 entry: |
307 %res = icmp uge <8 x i1> %a, %b | 305 %res = icmp uge <8 x i1> %a, %b |
308 ret <8 x i1> %res | 306 ret <8 x i1> %res |
309 ; CHECK-LABEL: test_icmp_v8i1_uge: | 307 ; CHECK-LABEL: test_icmp_v8i1_uge |
310 ; CHECK: pxor | 308 ; CHECK: pxor |
311 ; CHECK: pcmpgtw | 309 ; CHECK: pcmpgtw |
312 ; CHECK: pxor | 310 ; CHECK: pxor |
313 } | 311 } |
314 | 312 |
315 define <8 x i1> @test_icmp_v8i1_ugt(<8 x i1> %a, <8 x i1> %b) { | 313 define <8 x i1> @test_icmp_v8i1_ugt(<8 x i1> %a, <8 x i1> %b) { |
316 entry: | 314 entry: |
317 %res = icmp ugt <8 x i1> %a, %b | 315 %res = icmp ugt <8 x i1> %a, %b |
318 ret <8 x i1> %res | 316 ret <8 x i1> %res |
319 ; CHECK-LABEL: test_icmp_v8i1_ugt: | 317 ; CHECK-LABEL: test_icmp_v8i1_ugt |
320 ; CHECK: pxor | 318 ; CHECK: pxor |
321 ; CHECK: pcmpgtw | 319 ; CHECK: pcmpgtw |
322 } | 320 } |
323 | 321 |
324 define <8 x i1> @test_icmp_v8i1_ule(<8 x i1> %a, <8 x i1> %b) { | 322 define <8 x i1> @test_icmp_v8i1_ule(<8 x i1> %a, <8 x i1> %b) { |
325 entry: | 323 entry: |
326 %res = icmp ule <8 x i1> %a, %b | 324 %res = icmp ule <8 x i1> %a, %b |
327 ret <8 x i1> %res | 325 ret <8 x i1> %res |
328 ; CHECK-LABEL: test_icmp_v8i1_ule: | 326 ; CHECK-LABEL: test_icmp_v8i1_ule |
329 ; CHECK: pxor | 327 ; CHECK: pxor |
330 ; CHECK: pcmpgtw | 328 ; CHECK: pcmpgtw |
331 ; CHECK: pxor | 329 ; CHECK: pxor |
332 } | 330 } |
333 | 331 |
334 define <8 x i1> @test_icmp_v8i1_ult(<8 x i1> %a, <8 x i1> %b) { | 332 define <8 x i1> @test_icmp_v8i1_ult(<8 x i1> %a, <8 x i1> %b) { |
335 entry: | 333 entry: |
336 %res = icmp ult <8 x i1> %a, %b | 334 %res = icmp ult <8 x i1> %a, %b |
337 ret <8 x i1> %res | 335 ret <8 x i1> %res |
338 ; CHECK-LABEL: test_icmp_v8i1_ult: | 336 ; CHECK-LABEL: test_icmp_v8i1_ult |
339 ; CHECK: pxor | 337 ; CHECK: pxor |
340 ; CHECK: pcmpgtw | 338 ; CHECK: pcmpgtw |
341 } | 339 } |
342 | 340 |
343 define <16 x i1> @test_icmp_v16i8_eq(<16 x i8> %a, <16 x i8> %b) { | 341 define <16 x i1> @test_icmp_v16i8_eq(<16 x i8> %a, <16 x i8> %b) { |
344 entry: | 342 entry: |
345 %res = icmp eq <16 x i8> %a, %b | 343 %res = icmp eq <16 x i8> %a, %b |
346 ret <16 x i1> %res | 344 ret <16 x i1> %res |
347 ; CHECK-LABEL: test_icmp_v16i8_eq: | 345 ; CHECK-LABEL: test_icmp_v16i8_eq |
348 ; CHECK: pcmpeqb | 346 ; CHECK: pcmpeqb |
349 } | 347 } |
350 | 348 |
351 define <16 x i1> @test_icmp_v16i8_ne(<16 x i8> %a, <16 x i8> %b) { | 349 define <16 x i1> @test_icmp_v16i8_ne(<16 x i8> %a, <16 x i8> %b) { |
352 entry: | 350 entry: |
353 %res = icmp ne <16 x i8> %a, %b | 351 %res = icmp ne <16 x i8> %a, %b |
354 ret <16 x i1> %res | 352 ret <16 x i1> %res |
355 ; CHECK-LABEL: test_icmp_v16i8_ne: | 353 ; CHECK-LABEL: test_icmp_v16i8_ne |
356 ; CHECK: pcmpeqb | 354 ; CHECK: pcmpeqb |
357 ; CHECK: pxor | 355 ; CHECK: pxor |
358 } | 356 } |
359 | 357 |
360 define <16 x i1> @test_icmp_v16i8_sgt(<16 x i8> %a, <16 x i8> %b) { | 358 define <16 x i1> @test_icmp_v16i8_sgt(<16 x i8> %a, <16 x i8> %b) { |
361 entry: | 359 entry: |
362 %res = icmp sgt <16 x i8> %a, %b | 360 %res = icmp sgt <16 x i8> %a, %b |
363 ret <16 x i1> %res | 361 ret <16 x i1> %res |
364 ; CHECK-LABEL: test_icmp_v16i8_sgt: | 362 ; CHECK-LABEL: test_icmp_v16i8_sgt |
365 ; CHECK: pcmpgtb | 363 ; CHECK: pcmpgtb |
366 } | 364 } |
367 | 365 |
368 define <16 x i1> @test_icmp_v16i8_sle(<16 x i8> %a, <16 x i8> %b) { | 366 define <16 x i1> @test_icmp_v16i8_sle(<16 x i8> %a, <16 x i8> %b) { |
369 entry: | 367 entry: |
370 %res = icmp sle <16 x i8> %a, %b | 368 %res = icmp sle <16 x i8> %a, %b |
371 ret <16 x i1> %res | 369 ret <16 x i1> %res |
372 ; CHECK-LABEL: test_icmp_v16i8_sle: | 370 ; CHECK-LABEL: test_icmp_v16i8_sle |
373 ; CHECK: pcmpgtb | 371 ; CHECK: pcmpgtb |
374 ; CHECK: pxor | 372 ; CHECK: pxor |
375 } | 373 } |
376 | 374 |
377 define <16 x i1> @test_icmp_v16i8_slt(<16 x i8> %a, <16 x i8> %b) { | 375 define <16 x i1> @test_icmp_v16i8_slt(<16 x i8> %a, <16 x i8> %b) { |
378 entry: | 376 entry: |
379 %res = icmp slt <16 x i8> %a, %b | 377 %res = icmp slt <16 x i8> %a, %b |
380 ret <16 x i1> %res | 378 ret <16 x i1> %res |
381 ; CHECK-LABEL: test_icmp_v16i8_slt: | 379 ; CHECK-LABEL: test_icmp_v16i8_slt |
382 ; CHECK: pcmpgtb | 380 ; CHECK: pcmpgtb |
383 } | 381 } |
384 | 382 |
385 define <16 x i1> @test_icmp_v16i8_uge(<16 x i8> %a, <16 x i8> %b) { | 383 define <16 x i1> @test_icmp_v16i8_uge(<16 x i8> %a, <16 x i8> %b) { |
386 entry: | 384 entry: |
387 %res = icmp uge <16 x i8> %a, %b | 385 %res = icmp uge <16 x i8> %a, %b |
388 ret <16 x i1> %res | 386 ret <16 x i1> %res |
389 ; CHECK-LABEL: test_icmp_v16i8_uge: | 387 ; CHECK-LABEL: test_icmp_v16i8_uge |
390 ; CHECK: pxor | 388 ; CHECK: pxor |
391 ; CHECK: pcmpgtb | 389 ; CHECK: pcmpgtb |
392 ; CHECK: pxor | 390 ; CHECK: pxor |
393 } | 391 } |
394 | 392 |
395 define <16 x i1> @test_icmp_v16i8_ugt(<16 x i8> %a, <16 x i8> %b) { | 393 define <16 x i1> @test_icmp_v16i8_ugt(<16 x i8> %a, <16 x i8> %b) { |
396 entry: | 394 entry: |
397 %res = icmp ugt <16 x i8> %a, %b | 395 %res = icmp ugt <16 x i8> %a, %b |
398 ret <16 x i1> %res | 396 ret <16 x i1> %res |
399 ; CHECK-LABEL: test_icmp_v16i8_ugt: | 397 ; CHECK-LABEL: test_icmp_v16i8_ugt |
400 ; CHECK: pxor | 398 ; CHECK: pxor |
401 ; CHECK: pcmpgtb | 399 ; CHECK: pcmpgtb |
402 } | 400 } |
403 | 401 |
404 define <16 x i1> @test_icmp_v16i8_ule(<16 x i8> %a, <16 x i8> %b) { | 402 define <16 x i1> @test_icmp_v16i8_ule(<16 x i8> %a, <16 x i8> %b) { |
405 entry: | 403 entry: |
406 %res = icmp ule <16 x i8> %a, %b | 404 %res = icmp ule <16 x i8> %a, %b |
407 ret <16 x i1> %res | 405 ret <16 x i1> %res |
408 ; CHECK-LABEL: test_icmp_v16i8_ule: | 406 ; CHECK-LABEL: test_icmp_v16i8_ule |
409 ; CHECK: pxor | 407 ; CHECK: pxor |
410 ; CHECK: pcmpgtb | 408 ; CHECK: pcmpgtb |
411 ; CHECK: pxor | 409 ; CHECK: pxor |
412 } | 410 } |
413 | 411 |
414 define <16 x i1> @test_icmp_v16i8_ult(<16 x i8> %a, <16 x i8> %b) { | 412 define <16 x i1> @test_icmp_v16i8_ult(<16 x i8> %a, <16 x i8> %b) { |
415 entry: | 413 entry: |
416 %res = icmp ult <16 x i8> %a, %b | 414 %res = icmp ult <16 x i8> %a, %b |
417 ret <16 x i1> %res | 415 ret <16 x i1> %res |
418 ; CHECK-LABEL: test_icmp_v16i8_ult: | 416 ; CHECK-LABEL: test_icmp_v16i8_ult |
419 ; CHECK: pxor | 417 ; CHECK: pxor |
420 ; CHECK: pcmpgtb | 418 ; CHECK: pcmpgtb |
421 } | 419 } |
422 | 420 |
423 define <16 x i1> @test_icmp_v16i1_eq(<16 x i1> %a, <16 x i1> %b) { | 421 define <16 x i1> @test_icmp_v16i1_eq(<16 x i1> %a, <16 x i1> %b) { |
424 entry: | 422 entry: |
425 %res = icmp eq <16 x i1> %a, %b | 423 %res = icmp eq <16 x i1> %a, %b |
426 ret <16 x i1> %res | 424 ret <16 x i1> %res |
427 ; CHECK-LABEL: test_icmp_v16i1_eq: | 425 ; CHECK-LABEL: test_icmp_v16i1_eq |
428 ; CHECK: pcmpeqb | 426 ; CHECK: pcmpeqb |
429 } | 427 } |
430 | 428 |
431 define <16 x i1> @test_icmp_v16i1_ne(<16 x i1> %a, <16 x i1> %b) { | 429 define <16 x i1> @test_icmp_v16i1_ne(<16 x i1> %a, <16 x i1> %b) { |
432 entry: | 430 entry: |
433 %res = icmp ne <16 x i1> %a, %b | 431 %res = icmp ne <16 x i1> %a, %b |
434 ret <16 x i1> %res | 432 ret <16 x i1> %res |
435 ; CHECK-LABEL: test_icmp_v16i1_ne: | 433 ; CHECK-LABEL: test_icmp_v16i1_ne |
436 ; CHECK: pcmpeqb | 434 ; CHECK: pcmpeqb |
437 ; CHECK: pxor | 435 ; CHECK: pxor |
438 } | 436 } |
439 | 437 |
440 define <16 x i1> @test_icmp_v16i1_sgt(<16 x i1> %a, <16 x i1> %b) { | 438 define <16 x i1> @test_icmp_v16i1_sgt(<16 x i1> %a, <16 x i1> %b) { |
441 entry: | 439 entry: |
442 %res = icmp sgt <16 x i1> %a, %b | 440 %res = icmp sgt <16 x i1> %a, %b |
443 ret <16 x i1> %res | 441 ret <16 x i1> %res |
444 ; CHECK-LABEL: test_icmp_v16i1_sgt: | 442 ; CHECK-LABEL: test_icmp_v16i1_sgt |
445 ; CHECK: pcmpgtb | 443 ; CHECK: pcmpgtb |
446 } | 444 } |
447 | 445 |
448 define <16 x i1> @test_icmp_v16i1_sle(<16 x i1> %a, <16 x i1> %b) { | 446 define <16 x i1> @test_icmp_v16i1_sle(<16 x i1> %a, <16 x i1> %b) { |
449 entry: | 447 entry: |
450 %res = icmp sle <16 x i1> %a, %b | 448 %res = icmp sle <16 x i1> %a, %b |
451 ret <16 x i1> %res | 449 ret <16 x i1> %res |
452 ; CHECK-LABEL: test_icmp_v16i1_sle: | 450 ; CHECK-LABEL: test_icmp_v16i1_sle |
453 ; CHECK: pcmpgtb | 451 ; CHECK: pcmpgtb |
454 ; CHECK: pxor | 452 ; CHECK: pxor |
455 } | 453 } |
456 | 454 |
457 define <16 x i1> @test_icmp_v16i1_slt(<16 x i1> %a, <16 x i1> %b) { | 455 define <16 x i1> @test_icmp_v16i1_slt(<16 x i1> %a, <16 x i1> %b) { |
458 entry: | 456 entry: |
459 %res = icmp slt <16 x i1> %a, %b | 457 %res = icmp slt <16 x i1> %a, %b |
460 ret <16 x i1> %res | 458 ret <16 x i1> %res |
461 ; CHECK-LABEL: test_icmp_v16i1_slt: | 459 ; CHECK-LABEL: test_icmp_v16i1_slt |
462 ; CHECK: pcmpgtb | 460 ; CHECK: pcmpgtb |
463 } | 461 } |
464 | 462 |
465 define <16 x i1> @test_icmp_v16i1_uge(<16 x i1> %a, <16 x i1> %b) { | 463 define <16 x i1> @test_icmp_v16i1_uge(<16 x i1> %a, <16 x i1> %b) { |
466 entry: | 464 entry: |
467 %res = icmp uge <16 x i1> %a, %b | 465 %res = icmp uge <16 x i1> %a, %b |
468 ret <16 x i1> %res | 466 ret <16 x i1> %res |
469 ; CHECK-LABEL: test_icmp_v16i1_uge: | 467 ; CHECK-LABEL: test_icmp_v16i1_uge |
470 ; CHECK: pxor | 468 ; CHECK: pxor |
471 ; CHECK: pcmpgtb | 469 ; CHECK: pcmpgtb |
472 ; CHECK: pxor | 470 ; CHECK: pxor |
473 } | 471 } |
474 | 472 |
475 define <16 x i1> @test_icmp_v16i1_ugt(<16 x i1> %a, <16 x i1> %b) { | 473 define <16 x i1> @test_icmp_v16i1_ugt(<16 x i1> %a, <16 x i1> %b) { |
476 entry: | 474 entry: |
477 %res = icmp ugt <16 x i1> %a, %b | 475 %res = icmp ugt <16 x i1> %a, %b |
478 ret <16 x i1> %res | 476 ret <16 x i1> %res |
479 ; CHECK-LABEL: test_icmp_v16i1_ugt: | 477 ; CHECK-LABEL: test_icmp_v16i1_ugt |
480 ; CHECK: pxor | 478 ; CHECK: pxor |
481 ; CHECK: pcmpgtb | 479 ; CHECK: pcmpgtb |
482 } | 480 } |
483 | 481 |
484 define <16 x i1> @test_icmp_v16i1_ule(<16 x i1> %a, <16 x i1> %b) { | 482 define <16 x i1> @test_icmp_v16i1_ule(<16 x i1> %a, <16 x i1> %b) { |
485 entry: | 483 entry: |
486 %res = icmp ule <16 x i1> %a, %b | 484 %res = icmp ule <16 x i1> %a, %b |
487 ret <16 x i1> %res | 485 ret <16 x i1> %res |
488 ; CHECK-LABEL: test_icmp_v16i1_ule: | 486 ; CHECK-LABEL: test_icmp_v16i1_ule |
489 ; CHECK: pxor | 487 ; CHECK: pxor |
490 ; CHECK: pcmpgtb | 488 ; CHECK: pcmpgtb |
491 ; CHECK: pxor | 489 ; CHECK: pxor |
492 } | 490 } |
493 | 491 |
494 define <16 x i1> @test_icmp_v16i1_ult(<16 x i1> %a, <16 x i1> %b) { | 492 define <16 x i1> @test_icmp_v16i1_ult(<16 x i1> %a, <16 x i1> %b) { |
495 entry: | 493 entry: |
496 %res = icmp ult <16 x i1> %a, %b | 494 %res = icmp ult <16 x i1> %a, %b |
497 ret <16 x i1> %res | 495 ret <16 x i1> %res |
498 ; CHECK-LABEL: test_icmp_v16i1_ult: | 496 ; CHECK-LABEL: test_icmp_v16i1_ult |
499 ; CHECK: pxor | 497 ; CHECK: pxor |
500 ; CHECK: pcmpgtb | 498 ; CHECK: pcmpgtb |
501 } | 499 } |
OLD | NEW |