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