blob: 790bbb7064627dbf2e5ae958b19284f6719fa472 [file] [log] [blame]
Thomas Livelya3937b22018-09-14 21:21:42 +00001; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -wasm-enable-unimplemented-simd -mattr=+simd128,+sign-ext --show-mc-encoding | FileCheck %s --check-prefixes CHECK,SIMD128
2; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -mattr=+simd128,+sign-ext --show-mc-encoding | FileCheck %s --check-prefixes CHECK,SIMD128-VM
3; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -mattr=-simd128,+sign-ext --show-mc-encoding | FileCheck %s --check-prefixes CHECK,NO-SIMD128
Thomas Livelyebd4c902018-09-12 17:56:00 +00004
5; Test SIMD comparison operators
6
7target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
8target triple = "wasm32-unknown-unknown"
9
10; CHECK-LABEL: compare_eq_v16i8:
11; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000012; SIMD128-NEXT: .param v128, v128{{$}}
13; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000014; SIMD128-NEXT: i8x16.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
15; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000016define <16 x i1> @compare_eq_v16i8 (<16 x i8> %x, <16 x i8> %y) {
17 %res = icmp eq <16 x i8> %x, %y
18 ret <16 x i1> %res
19}
20
21; CHECK-LABEL: compare_ne_v16i8:
22; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000023; SIMD128-NEXT: .param v128, v128{{$}}
24; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000025; SIMD128-NEXT: i8x16.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
26; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000027define <16 x i1> @compare_ne_v16i8 (<16 x i8> %x, <16 x i8> %y) {
28 %res = icmp ne <16 x i8> %x, %y
29 ret <16 x i1> %res
30}
31
32; CHECK-LABEL: compare_slt_v16i8:
33; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000034; SIMD128-NEXT: .param v128, v128{{$}}
35; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000036; SIMD128-NEXT: i8x16.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
37; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000038define <16 x i1> @compare_slt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
39 %res = icmp slt <16 x i8> %x, %y
40 ret <16 x i1> %res
41}
42
43; CHECK-LABEL: compare_ult_v16i8:
44; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000045; SIMD128-NEXT: .param v128, v128{{$}}
46; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000047; SIMD128-NEXT: i8x16.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
48; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000049define <16 x i1> @compare_ult_v16i8 (<16 x i8> %x, <16 x i8> %y) {
50 %res = icmp ult <16 x i8> %x, %y
51 ret <16 x i1> %res
52}
53
54; CHECK-LABEL: compare_sle_v16i8:
55; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000056; SIMD128-NEXT: .param v128, v128{{$}}
57; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000058; SIMD128-NEXT: i8x16.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
59; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000060define <16 x i1> @compare_sle_v16i8 (<16 x i8> %x, <16 x i8> %y) {
61 %res = icmp sle <16 x i8> %x, %y
62 ret <16 x i1> %res
63}
64
65; CHECK-LABEL: compare_ule_v16i8:
66; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000067; SIMD128-NEXT: .param v128, v128{{$}}
68; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000069; SIMD128-NEXT: i8x16.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
70; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000071define <16 x i1> @compare_ule_v16i8 (<16 x i8> %x, <16 x i8> %y) {
72 %res = icmp ule <16 x i8> %x, %y
73 ret <16 x i1> %res
74}
75
76; CHECK-LABEL: compare_sgt_v16i8:
77; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000078; SIMD128-NEXT: .param v128, v128{{$}}
79; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000080; SIMD128-NEXT: i8x16.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
81; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000082define <16 x i1> @compare_sgt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
83 %res = icmp sgt <16 x i8> %x, %y
84 ret <16 x i1> %res
85}
86
87; CHECK-LABEL: compare_ugt_v16i8:
88; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +000089; SIMD128-NEXT: .param v128, v128{{$}}
90; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000091; SIMD128-NEXT: i8x16.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
92; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000093define <16 x i1> @compare_ugt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
94 %res = icmp ugt <16 x i8> %x, %y
95 ret <16 x i1> %res
96}
97
98; CHECK-LABEL: compare_sge_v16i8:
99; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +0000100; SIMD128-NEXT: .param v128, v128{{$}}
101; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000102; SIMD128-NEXT: i8x16.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
103; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000104define <16 x i1> @compare_sge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
105 %res = icmp sge <16 x i8> %x, %y
106 ret <16 x i1> %res
107}
108
109; CHECK-LABEL: compare_uge_v16i8:
110; NO-SIMD128-NOT: i8x16
Thomas Livelya3937b22018-09-14 21:21:42 +0000111; SIMD128-NEXT: .param v128, v128{{$}}
112; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000113; SIMD128-NEXT: i8x16.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
114; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000115define <16 x i1> @compare_uge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
116 %res = icmp uge <16 x i8> %x, %y
117 ret <16 x i1> %res
118}
119
120; CHECK-LABEL: compare_eq_v8i16:
121; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000122; SIMD128-NEXT: .param v128, v128{{$}}
123; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000124; SIMD128-NEXT: i16x8.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
125; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000126define <8 x i1> @compare_eq_v8i16 (<8 x i16> %x, <8 x i16> %y) {
127 %res = icmp eq <8 x i16> %x, %y
128 ret <8 x i1> %res
129}
130
131; CHECK-LABEL: compare_ne_v8i16:
132; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000133; SIMD128-NEXT: .param v128, v128{{$}}
134; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000135; SIMD128-NEXT: i16x8.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
136; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000137define <8 x i1> @compare_ne_v8i16 (<8 x i16> %x, <8 x i16> %y) {
138 %res = icmp ne <8 x i16> %x, %y
139 ret <8 x i1> %res
140}
141
142; CHECK-LABEL: compare_slt_v8i16:
143; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000144; SIMD128-NEXT: .param v128, v128{{$}}
145; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000146; SIMD128-NEXT: i16x8.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
147; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000148define <8 x i1> @compare_slt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
149 %res = icmp slt <8 x i16> %x, %y
150 ret <8 x i1> %res
151}
152
153; CHECK-LABEL: compare_ult_v8i16:
154; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000155; SIMD128-NEXT: .param v128, v128{{$}}
156; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000157; SIMD128-NEXT: i16x8.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
158; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000159define <8 x i1> @compare_ult_v8i16 (<8 x i16> %x, <8 x i16> %y) {
160 %res = icmp ult <8 x i16> %x, %y
161 ret <8 x i1> %res
162}
163
164; CHECK-LABEL: compare_sle_v8i16:
165; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000166; SIMD128-NEXT: .param v128, v128{{$}}
167; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000168; SIMD128-NEXT: i16x8.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
169; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000170define <8 x i1> @compare_sle_v8i16 (<8 x i16> %x, <8 x i16> %y) {
171 %res = icmp sle <8 x i16> %x, %y
172 ret <8 x i1> %res
173}
174
175; CHECK-LABEL: compare_ule_v8i16:
176; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000177; SIMD128-NEXT: .param v128, v128{{$}}
178; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000179; SIMD128-NEXT: i16x8.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
180; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000181define <8 x i1> @compare_ule_v8i16 (<8 x i16> %x, <8 x i16> %y) {
182 %res = icmp ule <8 x i16> %x, %y
183 ret <8 x i1> %res
184}
185
186; CHECK-LABEL: compare_sgt_v8i16:
187; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000188; SIMD128-NEXT: .param v128, v128{{$}}
189; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000190; SIMD128-NEXT: i16x8.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
191; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000192define <8 x i1> @compare_sgt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
193 %res = icmp sgt <8 x i16> %x, %y
194 ret <8 x i1> %res
195}
196
197; CHECK-LABEL: compare_ugt_v8i16:
198; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000199; SIMD128-NEXT: .param v128, v128{{$}}
200; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000201; SIMD128-NEXT: i16x8.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
202; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000203define <8 x i1> @compare_ugt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
204 %res = icmp ugt <8 x i16> %x, %y
205 ret <8 x i1> %res
206}
207
208; CHECK-LABEL: compare_sge_v8i16:
209; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000210; SIMD128-NEXT: .param v128, v128{{$}}
211; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000212; SIMD128-NEXT: i16x8.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
213; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000214define <8 x i1> @compare_sge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
215 %res = icmp sge <8 x i16> %x, %y
216 ret <8 x i1> %res
217}
218
219; CHECK-LABEL: compare_uge_v8i16:
220; NO-SIMD128-NOT: i16x8
Thomas Livelya3937b22018-09-14 21:21:42 +0000221; SIMD128-NEXT: .param v128, v128{{$}}
222; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000223; SIMD128-NEXT: i16x8.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
224; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000225define <8 x i1> @compare_uge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
226 %res = icmp uge <8 x i16> %x, %y
227 ret <8 x i1> %res
228}
229
230; CHECK-LABEL: compare_eq_v4i32:
231; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000232; SIMD128-NEXT: .param v128, v128{{$}}
233; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000234; SIMD128-NEXT: i32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
235; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000236define <4 x i1> @compare_eq_v4i32 (<4 x i32> %x, <4 x i32> %y) {
237 %res = icmp eq <4 x i32> %x, %y
238 ret <4 x i1> %res
239}
240
241; CHECK-LABEL: compare_ne_v4i32:
242; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000243; SIMD128-NEXT: .param v128, v128{{$}}
244; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000245; SIMD128-NEXT: i32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
246; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000247define <4 x i1> @compare_ne_v4i32 (<4 x i32> %x, <4 x i32> %y) {
248 %res = icmp ne <4 x i32> %x, %y
249 ret <4 x i1> %res
250}
251
252; CHECK-LABEL: compare_slt_v4i32:
253; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000254; SIMD128-NEXT: .param v128, v128{{$}}
255; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000256; SIMD128-NEXT: i32x4.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
257; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000258define <4 x i1> @compare_slt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
259 %res = icmp slt <4 x i32> %x, %y
260 ret <4 x i1> %res
261}
262
263; CHECK-LABEL: compare_ult_v4i32:
264; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000265; SIMD128-NEXT: .param v128, v128{{$}}
266; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000267; SIMD128-NEXT: i32x4.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
268; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000269define <4 x i1> @compare_ult_v4i32 (<4 x i32> %x, <4 x i32> %y) {
270 %res = icmp ult <4 x i32> %x, %y
271 ret <4 x i1> %res
272}
273
274; CHECK-LABEL: compare_sle_v4i32:
275; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000276; SIMD128-NEXT: .param v128, v128{{$}}
277; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000278; SIMD128-NEXT: i32x4.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
279; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000280define <4 x i1> @compare_sle_v4i32 (<4 x i32> %x, <4 x i32> %y) {
281 %res = icmp sle <4 x i32> %x, %y
282 ret <4 x i1> %res
283}
284
285; CHECK-LABEL: compare_ule_v4i32:
286; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000287; SIMD128-NEXT: .param v128, v128{{$}}
288; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000289; SIMD128-NEXT: i32x4.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
290; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000291define <4 x i1> @compare_ule_v4i32 (<4 x i32> %x, <4 x i32> %y) {
292 %res = icmp ule <4 x i32> %x, %y
293 ret <4 x i1> %res
294}
295
296; CHECK-LABEL: compare_sgt_v4i32:
297; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000298; SIMD128-NEXT: .param v128, v128{{$}}
299; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000300; SIMD128-NEXT: i32x4.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
301; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000302define <4 x i1> @compare_sgt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
303 %res = icmp sgt <4 x i32> %x, %y
304 ret <4 x i1> %res
305}
306
307; CHECK-LABEL: compare_ugt_v4i32:
308; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000309; SIMD128-NEXT: .param v128, v128{{$}}
310; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000311; SIMD128-NEXT: i32x4.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
312; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000313define <4 x i1> @compare_ugt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
314 %res = icmp ugt <4 x i32> %x, %y
315 ret <4 x i1> %res
316}
317
318; CHECK-LABEL: compare_sge_v4i32:
319; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000320; SIMD128-NEXT: .param v128, v128{{$}}
321; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000322; SIMD128-NEXT: i32x4.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
323; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000324define <4 x i1> @compare_sge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
325 %res = icmp sge <4 x i32> %x, %y
326 ret <4 x i1> %res
327}
328
329; CHECK-LABEL: compare_uge_v4i32:
330; NO-SIMD128-NOT: i32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000331; SIMD128-NEXT: .param v128, v128{{$}}
332; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000333; SIMD128-NEXT: i32x4.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
334; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000335define <4 x i1> @compare_uge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
336 %res = icmp uge <4 x i32> %x, %y
337 ret <4 x i1> %res
338}
339
340; CHECK-LABEL: compare_oeq_v4f32:
341; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000342; SIMD128-NEXT: .param v128, v128{{$}}
343; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000344; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
345; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000346define <4 x i1> @compare_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
347 %res = fcmp oeq <4 x float> %x, %y
348 ret <4 x i1> %res
349}
350
351; CHECK-LABEL: compare_ogt_v4f32:
352; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000353; SIMD128-NEXT: .param v128, v128{{$}}
354; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000355; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
356; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000357define <4 x i1> @compare_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
358 %res = fcmp ogt <4 x float> %x, %y
359 ret <4 x i1> %res
360}
361
362; CHECK-LABEL: compare_oge_v4f32:
363; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000364; SIMD128-NEXT: .param v128, v128{{$}}
365; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000366; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
367; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000368define <4 x i1> @compare_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
369 %res = fcmp oge <4 x float> %x, %y
370 ret <4 x i1> %res
371}
372
373; CHECK-LABEL: compare_olt_v4f32:
374; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000375; SIMD128-NEXT: .param v128, v128{{$}}
376; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000377; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
378; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000379define <4 x i1> @compare_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
380 %res = fcmp olt <4 x float> %x, %y
381 ret <4 x i1> %res
382}
383
384; CHECK-LABEL: compare_ole_v4f32:
385; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000386; SIMD128-NEXT: .param v128, v128{{$}}
387; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000388; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
389; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000390define <4 x i1> @compare_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
391 %res = fcmp ole <4 x float> %x, %y
392 ret <4 x i1> %res
393}
394
395; CHECK-LABEL: compare_one_v4f32:
396; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000397; SIMD128-NEXT: .param v128, v128{{$}}
398; SIMD128-NEXT: .result v128{{$}}
399; SIMD128-NEXT: f32x4.ne
Thomas Livelyebd4c902018-09-12 17:56:00 +0000400define <4 x i1> @compare_one_v4f32 (<4 x float> %x, <4 x float> %y) {
401 %res = fcmp one <4 x float> %x, %y
402 ret <4 x i1> %res
403}
404
405; CHECK-LABEL: compare_ord_v4f32:
406; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000407; SIMD128-NEXT: .param v128, v128{{$}}
408; SIMD128-NEXT: .result v128{{$}}
409; SIMD128-NEXT: f32x4.eq
Thomas Livelyebd4c902018-09-12 17:56:00 +0000410define <4 x i1> @compare_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
411 %res = fcmp ord <4 x float> %x, %y
412 ret <4 x i1> %res
413}
414
415; CHECK-LABEL: compare_ueq_v4f32:
416; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000417; SIMD128-NEXT: .param v128, v128{{$}}
418; SIMD128-NEXT: .result v128{{$}}
419; SIMD128-NEXT: f32x4.eq
Thomas Livelyebd4c902018-09-12 17:56:00 +0000420define <4 x i1> @compare_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
421 %res = fcmp ueq <4 x float> %x, %y
422 ret <4 x i1> %res
423}
424
425; CHECK-LABEL: compare_ugt_v4f32:
426; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000427; SIMD128-NEXT: .param v128, v128{{$}}
428; SIMD128-NEXT: .result v128{{$}}
429; SIMD128-NEXT: f32x4.le
Thomas Livelyebd4c902018-09-12 17:56:00 +0000430define <4 x i1> @compare_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
431 %res = fcmp ugt <4 x float> %x, %y
432 ret <4 x i1> %res
433}
434
435; CHECK-LABEL: compare_uge_v4f32:
436; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000437; SIMD128-NEXT: .param v128, v128{{$}}
438; SIMD128-NEXT: .result v128{{$}}
439; SIMD128-NEXT: f32x4.lt
Thomas Livelyebd4c902018-09-12 17:56:00 +0000440define <4 x i1> @compare_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
441 %res = fcmp uge <4 x float> %x, %y
442 ret <4 x i1> %res
443}
444
445; CHECK-LABEL: compare_ult_v4f32:
446; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000447; SIMD128-NEXT: .param v128, v128{{$}}
448; SIMD128-NEXT: .result v128{{$}}
449; SIMD128-NEXT: f32x4.ge
Thomas Livelyebd4c902018-09-12 17:56:00 +0000450define <4 x i1> @compare_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
451 %res = fcmp ult <4 x float> %x, %y
452 ret <4 x i1> %res
453}
454
455; CHECK-LABEL: compare_ule_v4f32:
456; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000457; SIMD128-NEXT: .param v128, v128{{$}}
458; SIMD128-NEXT: .result v128{{$}}
459; SIMD128-NEXT: f32x4.gt
Thomas Livelyebd4c902018-09-12 17:56:00 +0000460define <4 x i1> @compare_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
461 %res = fcmp ule <4 x float> %x, %y
462 ret <4 x i1> %res
463}
464
465; CHECK-LABEL: compare_une_v4f32:
466; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000467; SIMD128-NEXT: .param v128, v128{{$}}
468; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000469; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
470; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000471define <4 x i1> @compare_une_v4f32 (<4 x float> %x, <4 x float> %y) {
472 %res = fcmp une <4 x float> %x, %y
473 ret <4 x i1> %res
474}
475
476; CHECK-LABEL: compare_uno_v4f32:
477; NO-SIMD128-NOT: f32x4
Thomas Livelya3937b22018-09-14 21:21:42 +0000478; SIMD128-NEXT: .param v128, v128{{$}}
479; SIMD128-NEXT: .result v128{{$}}
480; SIMD128-NEXT: f32x4.ne
Thomas Livelyebd4c902018-09-12 17:56:00 +0000481define <4 x i1> @compare_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
482 %res = fcmp uno <4 x float> %x, %y
483 ret <4 x i1> %res
484}
485
486; CHECK-LABEL: compare_oeq_v2f64:
487; NO-SIMD128-NOT: f64x2
488; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000489; SIMD128-NEXT: .param v128, v128{{$}}
490; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000491; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
492; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000493define <2 x i1> @compare_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
494 %res = fcmp oeq <2 x double> %x, %y
495 ret <2 x i1> %res
496}
497
498; CHECK-LABEL: compare_ogt_v2f64:
499; NO-SIMD128-NOT: f64x2
500; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000501; SIMD128-NEXT: .param v128, v128{{$}}
502; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000503; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
504; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000505define <2 x i1> @compare_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
506 %res = fcmp ogt <2 x double> %x, %y
507 ret <2 x i1> %res
508}
509
510; CHECK-LABEL: compare_oge_v2f64:
511; NO-SIMD128-NOT: f64x2
512; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000513; SIMD128-NEXT: .param v128, v128{{$}}
514; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000515; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
516; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000517define <2 x i1> @compare_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
518 %res = fcmp oge <2 x double> %x, %y
519 ret <2 x i1> %res
520}
521
522; CHECK-LABEL: compare_olt_v2f64:
523; NO-SIMD128-NOT: f64x2
524; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000525; SIMD128-NEXT: .param v128, v128{{$}}
526; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000527; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
528; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000529define <2 x i1> @compare_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
530 %res = fcmp olt <2 x double> %x, %y
531 ret <2 x i1> %res
532}
533
534; CHECK-LABEL: compare_ole_v2f64:
535; NO-SIMD128-NOT: f64x2
536; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000537; SIMD128-NEXT: .param v128, v128{{$}}
538; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000539; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
540; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000541define <2 x i1> @compare_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
542 %res = fcmp ole <2 x double> %x, %y
543 ret <2 x i1> %res
544}
545
546; CHECK-LABEL: compare_one_v2f64:
547; NO-SIMD128-NOT: f64x2
548; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000549; SIMD128-NEXT: .param v128, v128{{$}}
550; SIMD128-NEXT: .result v128{{$}}
551; SIMD128-NEXT: f64x2.ne
Thomas Livelyebd4c902018-09-12 17:56:00 +0000552define <2 x i1> @compare_one_v2f64 (<2 x double> %x, <2 x double> %y) {
553 %res = fcmp one <2 x double> %x, %y
554 ret <2 x i1> %res
555}
556
557; CHECK-LABEL: compare_ord_v2f64:
558; NO-SIMD128-NOT: f64x2
559; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000560; SIMD128-NEXT: .param v128, v128{{$}}
561; SIMD128-NEXT: .result v128{{$}}
562; SIMD128-NEXT: f64x2.eq
Thomas Livelyebd4c902018-09-12 17:56:00 +0000563define <2 x i1> @compare_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
564 %res = fcmp ord <2 x double> %x, %y
565 ret <2 x i1> %res
566}
567
568; CHECK-LABEL: compare_ueq_v2f64:
569; NO-SIMD128-NOT: f64x2
570; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000571; SIMD128-NEXT: .param v128, v128{{$}}
572; SIMD128-NEXT: .result v128{{$}}
573; SIMD128-NEXT: f64x2.eq
Thomas Livelyebd4c902018-09-12 17:56:00 +0000574define <2 x i1> @compare_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
575 %res = fcmp ueq <2 x double> %x, %y
576 ret <2 x i1> %res
577}
578
579; CHECK-LABEL: compare_ugt_v2f64:
580; NO-SIMD128-NOT: f64x2
581; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000582; SIMD128-NEXT: .param v128, v128{{$}}
583; SIMD128-NEXT: .result v128{{$}}
584; SIMD128-NEXT: f64x2.le
Thomas Livelyebd4c902018-09-12 17:56:00 +0000585define <2 x i1> @compare_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
586 %res = fcmp ugt <2 x double> %x, %y
587 ret <2 x i1> %res
588}
589
590; CHECK-LABEL: compare_uge_v2f64:
591; NO-SIMD128-NOT: f64x2
592; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000593; SIMD128-NEXT: .param v128, v128{{$}}
594; SIMD128-NEXT: .result v128{{$}}
595; SIMD128-NEXT: f64x2.lt
Thomas Livelyebd4c902018-09-12 17:56:00 +0000596define <2 x i1> @compare_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
597 %res = fcmp uge <2 x double> %x, %y
598 ret <2 x i1> %res
599}
600
601; CHECK-LABEL: compare_ult_v2f64:
602; NO-SIMD128-NOT: f64x2
603; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000604; SIMD128-NEXT: .param v128, v128{{$}}
605; SIMD128-NEXT: .result v128{{$}}
606; SIMD128-NEXT: f64x2.ge
Thomas Livelyebd4c902018-09-12 17:56:00 +0000607define <2 x i1> @compare_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
608 %res = fcmp ult <2 x double> %x, %y
609 ret <2 x i1> %res
610}
611
612; CHECK-LABEL: compare_ule_v2f64:
613; NO-SIMD128-NOT: f64x2
614; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000615; SIMD128-NEXT: .param v128, v128{{$}}
616; SIMD128-NEXT: .result v128{{$}}
617; SIMD128-NEXT: f64x2.gt
Thomas Livelyebd4c902018-09-12 17:56:00 +0000618define <2 x i1> @compare_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
619 %res = fcmp ule <2 x double> %x, %y
620 ret <2 x i1> %res
621}
622
623; CHECK-LABEL: compare_une_v2f64:
624; NO-SIMD128-NOT: f64x2
625; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000626; SIMD128-NEXT: .param v128, v128{{$}}
627; SIMD128-NEXT: .result v128{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000628; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
629; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000630define <2 x i1> @compare_une_v2f64 (<2 x double> %x, <2 x double> %y) {
631 %res = fcmp une <2 x double> %x, %y
632 ret <2 x i1> %res
633}
634
635; CHECK-LABEL: compare_uno_v2f64:
636; NO-SIMD128-NOT: f64x2
637; SIMD128-VM-NOT: f64x2
Thomas Livelya3937b22018-09-14 21:21:42 +0000638; SIMD128-NEXT: .param v128, v128{{$}}
639; SIMD128-NEXT: .result v128{{$}}
640; SIMD128-NEXT: f64x2.ne
Thomas Livelyebd4c902018-09-12 17:56:00 +0000641define <2 x i1> @compare_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
642 %res = fcmp uno <2 x double> %x, %y
643 ret <2 x i1> %res
644}