1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=armv8-eabi -mattr=+neon | FileCheck %s
4 define arm_aapcs_vfpcc <4 x i32> @vcmpz_eq(<4 x i32> %0, <4 x i32> %b) {
5 ; CHECK-LABEL: vcmpz_eq:
7 ; CHECK-NEXT: vceq.i32 q0, q0, q1
9 %2 = icmp eq <4 x i32> %0, %b
10 %3 = sext <4 x i1> %2 to <4 x i32>
14 define arm_aapcs_vfpcc <4 x i32> @vcmpz_ne(<4 x i32> %0, <4 x i32> %b) {
15 ; CHECK-LABEL: vcmpz_ne:
17 ; CHECK-NEXT: vceq.i32 q8, q0, q1
18 ; CHECK-NEXT: vmvn q0, q8
20 %2 = icmp ne <4 x i32> %0, %b
21 %3 = sext <4 x i1> %2 to <4 x i32>
25 define arm_aapcs_vfpcc <4 x i32> @vcmpz_slt(<4 x i32> %0, <4 x i32> %b) {
26 ; CHECK-LABEL: vcmpz_slt:
28 ; CHECK-NEXT: vcgt.s32 q0, q1, q0
30 %2 = icmp slt <4 x i32> %0, %b
31 %3 = sext <4 x i1> %2 to <4 x i32>
35 define arm_aapcs_vfpcc <4 x i32> @vcmpz_sle(<4 x i32> %0, <4 x i32> %b) {
36 ; CHECK-LABEL: vcmpz_sle:
38 ; CHECK-NEXT: vcge.s32 q0, q1, q0
40 %2 = icmp sle <4 x i32> %0, %b
41 %3 = sext <4 x i1> %2 to <4 x i32>
45 define arm_aapcs_vfpcc <4 x i32> @vcmpz_sgt(<4 x i32> %0, <4 x i32> %b) {
46 ; CHECK-LABEL: vcmpz_sgt:
48 ; CHECK-NEXT: vcgt.s32 q0, q0, q1
50 %2 = icmp sgt <4 x i32> %0, %b
51 %3 = sext <4 x i1> %2 to <4 x i32>
55 define arm_aapcs_vfpcc <4 x i32> @vcmpz_sge(<4 x i32> %0, <4 x i32> %b) {
56 ; CHECK-LABEL: vcmpz_sge:
58 ; CHECK-NEXT: vcge.s32 q0, q0, q1
60 %2 = icmp sge <4 x i32> %0, %b
61 %3 = sext <4 x i1> %2 to <4 x i32>
65 define arm_aapcs_vfpcc <4 x i32> @vcmpz_ult(<4 x i32> %0, <4 x i32> %b) {
66 ; CHECK-LABEL: vcmpz_ult:
68 ; CHECK-NEXT: vcgt.u32 q0, q1, q0
70 %2 = icmp ult <4 x i32> %0, %b
71 %3 = sext <4 x i1> %2 to <4 x i32>
75 define arm_aapcs_vfpcc <4 x i32> @vcmpz_ule(<4 x i32> %0, <4 x i32> %b) {
76 ; CHECK-LABEL: vcmpz_ule:
78 ; CHECK-NEXT: vcge.u32 q0, q1, q0
80 %2 = icmp ule <4 x i32> %0, %b
81 %3 = sext <4 x i1> %2 to <4 x i32>
85 define arm_aapcs_vfpcc <4 x i32> @vcmpz_ugt(<4 x i32> %0, <4 x i32> %b) {
86 ; CHECK-LABEL: vcmpz_ugt:
88 ; CHECK-NEXT: vcgt.u32 q0, q0, q1
90 %2 = icmp ugt <4 x i32> %0, %b
91 %3 = sext <4 x i1> %2 to <4 x i32>
95 define arm_aapcs_vfpcc <4 x i32> @vcmpz_uge(<4 x i32> %0, <4 x i32> %b) {
96 ; CHECK-LABEL: vcmpz_uge:
98 ; CHECK-NEXT: vcge.u32 q0, q0, q1
100 %2 = icmp uge <4 x i32> %0, %b
101 %3 = sext <4 x i1> %2 to <4 x i32>
106 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_eq(<4 x i32> %0) {
107 ; CHECK-LABEL: vcmpz_zr_eq:
109 ; CHECK-NEXT: vceq.i32 q0, q0, #0
111 %2 = icmp eq <4 x i32> %0, zeroinitializer
112 %3 = sext <4 x i1> %2 to <4 x i32>
116 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_ne(<4 x i32> %0) {
117 ; CHECK-LABEL: vcmpz_zr_ne:
119 ; CHECK-NEXT: vceq.i32 q8, q0, #0
120 ; CHECK-NEXT: vmvn q0, q8
122 %2 = icmp ne <4 x i32> %0, zeroinitializer
123 %3 = sext <4 x i1> %2 to <4 x i32>
127 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_slt(<4 x i32> %0) {
128 ; CHECK-LABEL: vcmpz_zr_slt:
130 ; CHECK-NEXT: vclt.s32 q0, q0, #0
132 %2 = icmp slt <4 x i32> %0, zeroinitializer
133 %3 = sext <4 x i1> %2 to <4 x i32>
137 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_sle(<4 x i32> %0) {
138 ; CHECK-LABEL: vcmpz_zr_sle:
140 ; CHECK-NEXT: vcle.s32 q0, q0, #0
142 %2 = icmp sle <4 x i32> %0, zeroinitializer
143 %3 = sext <4 x i1> %2 to <4 x i32>
147 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_sgt(<4 x i32> %0) {
148 ; CHECK-LABEL: vcmpz_zr_sgt:
150 ; CHECK-NEXT: vcgt.s32 q0, q0, #0
152 %2 = icmp sgt <4 x i32> %0, zeroinitializer
153 %3 = sext <4 x i1> %2 to <4 x i32>
157 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_sge(<4 x i32> %0) {
158 ; CHECK-LABEL: vcmpz_zr_sge:
160 ; CHECK-NEXT: vcge.s32 q0, q0, #0
162 %2 = icmp sge <4 x i32> %0, zeroinitializer
163 %3 = sext <4 x i1> %2 to <4 x i32>
167 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_ult(<4 x i32> %0) {
168 ; CHECK-LABEL: vcmpz_zr_ult:
170 ; CHECK-NEXT: vmov.i32 q0, #0x0
172 %2 = icmp ult <4 x i32> %0, zeroinitializer
173 %3 = sext <4 x i1> %2 to <4 x i32>
177 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_ule(<4 x i32> %0) {
178 ; CHECK-LABEL: vcmpz_zr_ule:
180 ; CHECK-NEXT: vmov.i32 q8, #0x0
181 ; CHECK-NEXT: vcge.u32 q0, q8, q0
183 %2 = icmp ule <4 x i32> %0, zeroinitializer
184 %3 = sext <4 x i1> %2 to <4 x i32>
188 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_ugt(<4 x i32> %0) {
189 ; CHECK-LABEL: vcmpz_zr_ugt:
191 ; CHECK-NEXT: vceq.i32 q8, q0, #0
192 ; CHECK-NEXT: vmvn q0, q8
194 %2 = icmp ugt <4 x i32> %0, zeroinitializer
195 %3 = sext <4 x i1> %2 to <4 x i32>
199 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zr_uge(<4 x i32> %0) {
200 ; CHECK-LABEL: vcmpz_zr_uge:
202 ; CHECK-NEXT: vmov.i8 q0, #0xff
204 %2 = icmp uge <4 x i32> %0, zeroinitializer
205 %3 = sext <4 x i1> %2 to <4 x i32>
210 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_eq(<4 x i32> %0) {
211 ; CHECK-LABEL: vcmpz_zl_eq:
213 ; CHECK-NEXT: vceq.i32 q0, q0, #0
215 %2 = icmp eq <4 x i32> zeroinitializer, %0
216 %3 = sext <4 x i1> %2 to <4 x i32>
220 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_ne(<4 x i32> %0) {
221 ; CHECK-LABEL: vcmpz_zl_ne:
223 ; CHECK-NEXT: vceq.i32 q8, q0, #0
224 ; CHECK-NEXT: vmvn q0, q8
226 %2 = icmp ne <4 x i32> zeroinitializer, %0
227 %3 = sext <4 x i1> %2 to <4 x i32>
231 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_slt(<4 x i32> %0) {
232 ; CHECK-LABEL: vcmpz_zl_slt:
234 ; CHECK-NEXT: vcgt.s32 q0, q0, #0
236 %2 = icmp slt <4 x i32> zeroinitializer, %0
237 %3 = sext <4 x i1> %2 to <4 x i32>
241 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_sle(<4 x i32> %0) {
242 ; CHECK-LABEL: vcmpz_zl_sle:
244 ; CHECK-NEXT: vcge.s32 q0, q0, #0
246 %2 = icmp sle <4 x i32> zeroinitializer, %0
247 %3 = sext <4 x i1> %2 to <4 x i32>
251 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_sgt(<4 x i32> %0) {
252 ; CHECK-LABEL: vcmpz_zl_sgt:
254 ; CHECK-NEXT: vclt.s32 q0, q0, #0
256 %2 = icmp sgt <4 x i32> zeroinitializer, %0
257 %3 = sext <4 x i1> %2 to <4 x i32>
261 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_sge(<4 x i32> %0) {
262 ; CHECK-LABEL: vcmpz_zl_sge:
264 ; CHECK-NEXT: vcle.s32 q0, q0, #0
266 %2 = icmp sge <4 x i32> zeroinitializer, %0
267 %3 = sext <4 x i1> %2 to <4 x i32>
271 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_ult(<4 x i32> %0) {
272 ; CHECK-LABEL: vcmpz_zl_ult:
274 ; CHECK-NEXT: vceq.i32 q8, q0, #0
275 ; CHECK-NEXT: vmvn q0, q8
277 %2 = icmp ult <4 x i32> zeroinitializer, %0
278 %3 = sext <4 x i1> %2 to <4 x i32>
282 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_ule(<4 x i32> %0) {
283 ; CHECK-LABEL: vcmpz_zl_ule:
285 ; CHECK-NEXT: vmov.i8 q0, #0xff
287 %2 = icmp ule <4 x i32> zeroinitializer, %0
288 %3 = sext <4 x i1> %2 to <4 x i32>
292 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_ugt(<4 x i32> %0) {
293 ; CHECK-LABEL: vcmpz_zl_ugt:
295 ; CHECK-NEXT: vmov.i32 q0, #0x0
297 %2 = icmp ugt <4 x i32> zeroinitializer, %0
298 %3 = sext <4 x i1> %2 to <4 x i32>
302 define arm_aapcs_vfpcc <4 x i32> @vcmpz_zl_uge(<4 x i32> %0) {
303 ; CHECK-LABEL: vcmpz_zl_uge:
305 ; CHECK-NEXT: vmov.i32 q8, #0x0
306 ; CHECK-NEXT: vcge.u32 q0, q8, q0
308 %2 = icmp uge <4 x i32> zeroinitializer, %0
309 %3 = sext <4 x i1> %2 to <4 x i32>