blob: 5e4c51ab6aa9b4984ead2c3346deade1799537db [file] [log] [blame]
Thomas Lively5ea17d42018-10-20 01:35:23 +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 | 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 | 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 | 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
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000012; SIMD128-NEXT: .functype compare_eq_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000013; SIMD128-NEXT: i8x16.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
14; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000015define <16 x i1> @compare_eq_v16i8 (<16 x i8> %x, <16 x i8> %y) {
16 %res = icmp eq <16 x i8> %x, %y
17 ret <16 x i1> %res
18}
19
Thomas Lively5ea17d42018-10-20 01:35:23 +000020; CHECK-LABEL: compare_sext_eq_v16i8:
21; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000022; SIMD128-NEXT: .functype compare_sext_eq_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +000023; SIMD128-NEXT: i8x16.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
24; SIMD128-NEXT: return $pop[[R]]{{$}}
25define <16 x i8> @compare_sext_eq_v16i8 (<16 x i8> %x, <16 x i8> %y) {
26 %cmp = icmp eq <16 x i8> %x, %y
27 %res = sext <16 x i1> %cmp to <16 x i8>
28 ret <16 x i8> %res
29}
30
Thomas Livelyebd4c902018-09-12 17:56:00 +000031; CHECK-LABEL: compare_ne_v16i8:
32; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000033; SIMD128-NEXT: .functype compare_ne_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000034; SIMD128-NEXT: i8x16.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
35; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000036define <16 x i1> @compare_ne_v16i8 (<16 x i8> %x, <16 x i8> %y) {
37 %res = icmp ne <16 x i8> %x, %y
38 ret <16 x i1> %res
39}
40
Thomas Lively5ea17d42018-10-20 01:35:23 +000041; CHECK-LABEL: compare_sext_ne_v16i8:
42; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000043; SIMD128-NEXT: .functype compare_sext_ne_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +000044; SIMD128-NEXT: i8x16.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
45; SIMD128-NEXT: return $pop[[R]]{{$}}
46define <16 x i8> @compare_sext_ne_v16i8 (<16 x i8> %x, <16 x i8> %y) {
47 %cmp = icmp ne <16 x i8> %x, %y
48 %res = sext <16 x i1> %cmp to <16 x i8>
49 ret <16 x i8> %res
50}
51
Thomas Livelyebd4c902018-09-12 17:56:00 +000052; CHECK-LABEL: compare_slt_v16i8:
53; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000054; SIMD128-NEXT: .functype compare_slt_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000055; SIMD128-NEXT: i8x16.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
56; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000057define <16 x i1> @compare_slt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
58 %res = icmp slt <16 x i8> %x, %y
59 ret <16 x i1> %res
60}
61
Thomas Lively5ea17d42018-10-20 01:35:23 +000062; CHECK-LABEL: compare_sext_slt_v16i8:
63; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000064; SIMD128-NEXT: .functype compare_sext_slt_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +000065; SIMD128-NEXT: i8x16.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
66; SIMD128-NEXT: return $pop[[R]]{{$}}
67define <16 x i8> @compare_sext_slt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
68 %cmp = icmp slt <16 x i8> %x, %y
69 %res = sext <16 x i1> %cmp to <16 x i8>
70 ret <16 x i8> %res
71}
72
Thomas Livelyebd4c902018-09-12 17:56:00 +000073; CHECK-LABEL: compare_ult_v16i8:
74; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000075; SIMD128-NEXT: .functype compare_ult_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000076; SIMD128-NEXT: i8x16.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
77; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000078define <16 x i1> @compare_ult_v16i8 (<16 x i8> %x, <16 x i8> %y) {
79 %res = icmp ult <16 x i8> %x, %y
80 ret <16 x i1> %res
81}
82
Thomas Lively5ea17d42018-10-20 01:35:23 +000083; CHECK-LABEL: compare_sext_ult_v16i8:
84; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000085; SIMD128-NEXT: .functype compare_sext_ult_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +000086; SIMD128-NEXT: i8x16.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
87; SIMD128-NEXT: return $pop[[R]]{{$}}
88define <16 x i8> @compare_sext_ult_v16i8 (<16 x i8> %x, <16 x i8> %y) {
89 %cmp = icmp ult <16 x i8> %x, %y
90 %res = sext <16 x i1> %cmp to <16 x i8>
91 ret <16 x i8> %res
92}
93
Thomas Livelyebd4c902018-09-12 17:56:00 +000094; CHECK-LABEL: compare_sle_v16i8:
95; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +000096; SIMD128-NEXT: .functype compare_sle_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +000097; SIMD128-NEXT: i8x16.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
98; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +000099define <16 x i1> @compare_sle_v16i8 (<16 x i8> %x, <16 x i8> %y) {
100 %res = icmp sle <16 x i8> %x, %y
101 ret <16 x i1> %res
102}
103
Thomas Lively5ea17d42018-10-20 01:35:23 +0000104; CHECK-LABEL: compare_sext_sle_v16i8:
105; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000106; SIMD128-NEXT: .functype compare_sext_sle_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000107; SIMD128-NEXT: i8x16.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
108; SIMD128-NEXT: return $pop[[R]]{{$}}
109define <16 x i8> @compare_sext_sle_v16i8 (<16 x i8> %x, <16 x i8> %y) {
110 %cmp = icmp sle <16 x i8> %x, %y
111 %res = sext <16 x i1> %cmp to <16 x i8>
112 ret <16 x i8> %res
113}
114
Thomas Livelyebd4c902018-09-12 17:56:00 +0000115; CHECK-LABEL: compare_ule_v16i8:
116; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000117; SIMD128-NEXT: .functype compare_ule_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000118; SIMD128-NEXT: i8x16.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
119; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000120define <16 x i1> @compare_ule_v16i8 (<16 x i8> %x, <16 x i8> %y) {
121 %res = icmp ule <16 x i8> %x, %y
122 ret <16 x i1> %res
123}
124
Thomas Lively5ea17d42018-10-20 01:35:23 +0000125; CHECK-LABEL: compare_sext_ule_v16i8:
126; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000127; SIMD128-NEXT: .functype compare_sext_ule_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000128; SIMD128-NEXT: i8x16.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
129; SIMD128-NEXT: return $pop[[R]]{{$}}
130define <16 x i8> @compare_sext_ule_v16i8 (<16 x i8> %x, <16 x i8> %y) {
131 %cmp = icmp ule <16 x i8> %x, %y
132 %res = sext <16 x i1> %cmp to <16 x i8>
133 ret <16 x i8> %res
134}
135
Thomas Livelyebd4c902018-09-12 17:56:00 +0000136; CHECK-LABEL: compare_sgt_v16i8:
137; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000138; SIMD128-NEXT: .functype compare_sgt_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000139; SIMD128-NEXT: i8x16.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
140; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000141define <16 x i1> @compare_sgt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
142 %res = icmp sgt <16 x i8> %x, %y
143 ret <16 x i1> %res
144}
145
Thomas Lively5ea17d42018-10-20 01:35:23 +0000146; CHECK-LABEL: compare_sext_sgt_v16i8:
147; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000148; SIMD128-NEXT: .functype compare_sext_sgt_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000149; SIMD128-NEXT: i8x16.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
150; SIMD128-NEXT: return $pop[[R]]{{$}}
151define <16 x i8> @compare_sext_sgt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
152 %cmp = icmp sgt <16 x i8> %x, %y
153 %res = sext <16 x i1> %cmp to <16 x i8>
154 ret <16 x i8> %res
155}
156
Thomas Livelyebd4c902018-09-12 17:56:00 +0000157; CHECK-LABEL: compare_ugt_v16i8:
158; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000159; SIMD128-NEXT: .functype compare_ugt_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000160; SIMD128-NEXT: i8x16.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
161; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000162define <16 x i1> @compare_ugt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
163 %res = icmp ugt <16 x i8> %x, %y
164 ret <16 x i1> %res
165}
166
Thomas Lively5ea17d42018-10-20 01:35:23 +0000167; CHECK-LABEL: compare_sext_ugt_v16i8:
168; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000169; SIMD128-NEXT: .functype compare_sext_ugt_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000170; SIMD128-NEXT: i8x16.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
171; SIMD128-NEXT: return $pop[[R]]{{$}}
172define <16 x i8> @compare_sext_ugt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
173 %cmp = icmp ugt <16 x i8> %x, %y
174 %res = sext <16 x i1> %cmp to <16 x i8>
175 ret <16 x i8> %res
176}
177
Thomas Livelyebd4c902018-09-12 17:56:00 +0000178; CHECK-LABEL: compare_sge_v16i8:
179; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000180; SIMD128-NEXT: .functype compare_sge_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000181; SIMD128-NEXT: i8x16.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
182; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000183define <16 x i1> @compare_sge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
184 %res = icmp sge <16 x i8> %x, %y
185 ret <16 x i1> %res
186}
187
Thomas Lively5ea17d42018-10-20 01:35:23 +0000188; CHECK-LABEL: compare_sext_sge_v16i8:
189; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000190; SIMD128-NEXT: .functype compare_sext_sge_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000191; SIMD128-NEXT: i8x16.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
192; SIMD128-NEXT: return $pop[[R]]{{$}}
193define <16 x i8> @compare_sext_sge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
194 %cmp = icmp sge <16 x i8> %x, %y
195 %res = sext <16 x i1> %cmp to <16 x i8>
196 ret <16 x i8> %res
197}
198
Thomas Livelyebd4c902018-09-12 17:56:00 +0000199; CHECK-LABEL: compare_uge_v16i8:
200; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000201; SIMD128-NEXT: .functype compare_uge_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000202; SIMD128-NEXT: i8x16.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
203; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000204define <16 x i1> @compare_uge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
205 %res = icmp uge <16 x i8> %x, %y
206 ret <16 x i1> %res
207}
208
Thomas Lively5ea17d42018-10-20 01:35:23 +0000209; CHECK-LABEL: compare_sext_uge_v16i8:
210; NO-SIMD128-NOT: i8x16
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000211; SIMD128-NEXT: .functype compare_sext_uge_v16i8 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000212; SIMD128-NEXT: i8x16.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
213; SIMD128-NEXT: return $pop[[R]]{{$}}
214define <16 x i8> @compare_sext_uge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
215 %cmp = icmp uge <16 x i8> %x, %y
216 %res = sext <16 x i1> %cmp to <16 x i8>
217 ret <16 x i8> %res
218}
219
Thomas Livelyebd4c902018-09-12 17:56:00 +0000220; CHECK-LABEL: compare_eq_v8i16:
221; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000222; SIMD128-NEXT: .functype compare_eq_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000223; SIMD128-NEXT: i16x8.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
224; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000225define <8 x i1> @compare_eq_v8i16 (<8 x i16> %x, <8 x i16> %y) {
226 %res = icmp eq <8 x i16> %x, %y
227 ret <8 x i1> %res
228}
229
Thomas Lively5ea17d42018-10-20 01:35:23 +0000230; CHECK-LABEL: compare_sext_eq_v8i16:
231; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000232; SIMD128-NEXT: .functype compare_sext_eq_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000233; SIMD128-NEXT: i16x8.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
234; SIMD128-NEXT: return $pop[[R]]{{$}}
235define <8 x i16> @compare_sext_eq_v8i16 (<8 x i16> %x, <8 x i16> %y) {
236 %cmp = icmp eq <8 x i16> %x, %y
237 %res = sext <8 x i1> %cmp to <8 x i16>
238 ret <8 x i16> %res
239}
240
Thomas Livelyebd4c902018-09-12 17:56:00 +0000241; CHECK-LABEL: compare_ne_v8i16:
242; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000243; SIMD128-NEXT: .functype compare_ne_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000244; SIMD128-NEXT: i16x8.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
245; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000246define <8 x i1> @compare_ne_v8i16 (<8 x i16> %x, <8 x i16> %y) {
247 %res = icmp ne <8 x i16> %x, %y
248 ret <8 x i1> %res
249}
250
Thomas Lively5ea17d42018-10-20 01:35:23 +0000251; CHECK-LABEL: compare_sext_ne_v8i16:
252; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000253; SIMD128-NEXT: .functype compare_sext_ne_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000254; SIMD128-NEXT: i16x8.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
255; SIMD128-NEXT: return $pop[[R]]{{$}}
256define <8 x i16> @compare_sext_ne_v8i16 (<8 x i16> %x, <8 x i16> %y) {
257 %cmp = icmp ne <8 x i16> %x, %y
258 %res = sext <8 x i1> %cmp to <8 x i16>
259 ret <8 x i16> %res
260}
261
Thomas Livelyebd4c902018-09-12 17:56:00 +0000262; CHECK-LABEL: compare_slt_v8i16:
263; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000264; SIMD128-NEXT: .functype compare_slt_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000265; SIMD128-NEXT: i16x8.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
266; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000267define <8 x i1> @compare_slt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
268 %res = icmp slt <8 x i16> %x, %y
269 ret <8 x i1> %res
270}
271
Thomas Lively5ea17d42018-10-20 01:35:23 +0000272; CHECK-LABEL: compare_sext_slt_v8i16:
273; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000274; SIMD128-NEXT: .functype compare_sext_slt_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000275; SIMD128-NEXT: i16x8.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
276; SIMD128-NEXT: return $pop[[R]]{{$}}
277define <8 x i16> @compare_sext_slt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
278 %cmp = icmp slt <8 x i16> %x, %y
279 %res = sext <8 x i1> %cmp to <8 x i16>
280 ret <8 x i16> %res
281}
282
Thomas Livelyebd4c902018-09-12 17:56:00 +0000283; CHECK-LABEL: compare_ult_v8i16:
284; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000285; SIMD128-NEXT: .functype compare_ult_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000286; SIMD128-NEXT: i16x8.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
287; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000288define <8 x i1> @compare_ult_v8i16 (<8 x i16> %x, <8 x i16> %y) {
289 %res = icmp ult <8 x i16> %x, %y
290 ret <8 x i1> %res
291}
292
Thomas Lively5ea17d42018-10-20 01:35:23 +0000293; CHECK-LABEL: compare_sext_ult_v8i16:
294; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000295; SIMD128-NEXT: .functype compare_sext_ult_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000296; SIMD128-NEXT: i16x8.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
297; SIMD128-NEXT: return $pop[[R]]{{$}}
298define <8 x i16> @compare_sext_ult_v8i16 (<8 x i16> %x, <8 x i16> %y) {
299 %cmp = icmp ult <8 x i16> %x, %y
300 %res = sext <8 x i1> %cmp to <8 x i16>
301 ret <8 x i16> %res
302}
303
Thomas Livelyebd4c902018-09-12 17:56:00 +0000304; CHECK-LABEL: compare_sle_v8i16:
305; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000306; SIMD128-NEXT: .functype compare_sle_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000307; SIMD128-NEXT: i16x8.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
308; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000309define <8 x i1> @compare_sle_v8i16 (<8 x i16> %x, <8 x i16> %y) {
310 %res = icmp sle <8 x i16> %x, %y
311 ret <8 x i1> %res
312}
313
Thomas Lively5ea17d42018-10-20 01:35:23 +0000314; CHECK-LABEL: compare_sext_sle_v8i16:
315; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000316; SIMD128-NEXT: .functype compare_sext_sle_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000317; SIMD128-NEXT: i16x8.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
318; SIMD128-NEXT: return $pop[[R]]{{$}}
319define <8 x i16> @compare_sext_sle_v8i16 (<8 x i16> %x, <8 x i16> %y) {
320 %cmp = icmp sle <8 x i16> %x, %y
321 %res = sext <8 x i1> %cmp to <8 x i16>
322 ret <8 x i16> %res
323}
324
Thomas Livelyebd4c902018-09-12 17:56:00 +0000325; CHECK-LABEL: compare_ule_v8i16:
326; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000327; SIMD128-NEXT: .functype compare_ule_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000328; SIMD128-NEXT: i16x8.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
329; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000330define <8 x i1> @compare_ule_v8i16 (<8 x i16> %x, <8 x i16> %y) {
331 %res = icmp ule <8 x i16> %x, %y
332 ret <8 x i1> %res
333}
334
Thomas Lively5ea17d42018-10-20 01:35:23 +0000335; CHECK-LABEL: compare_sext_ule_v8i16:
336; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000337; SIMD128-NEXT: .functype compare_sext_ule_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000338; SIMD128-NEXT: i16x8.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
339; SIMD128-NEXT: return $pop[[R]]{{$}}
340define <8 x i16> @compare_sext_ule_v8i16 (<8 x i16> %x, <8 x i16> %y) {
341 %cmp = icmp ule <8 x i16> %x, %y
342 %res = sext <8 x i1> %cmp to <8 x i16>
343 ret <8 x i16> %res
344}
345
Thomas Livelyebd4c902018-09-12 17:56:00 +0000346; CHECK-LABEL: compare_sgt_v8i16:
347; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000348; SIMD128-NEXT: .functype compare_sgt_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000349; SIMD128-NEXT: i16x8.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
350; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000351define <8 x i1> @compare_sgt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
352 %res = icmp sgt <8 x i16> %x, %y
353 ret <8 x i1> %res
354}
355
Thomas Lively5ea17d42018-10-20 01:35:23 +0000356; CHECK-LABEL: compare_sext_sgt_v8i16:
357; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000358; SIMD128-NEXT: .functype compare_sext_sgt_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000359; SIMD128-NEXT: i16x8.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
360; SIMD128-NEXT: return $pop[[R]]{{$}}
361define <8 x i16> @compare_sext_sgt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
362 %cmp = icmp sgt <8 x i16> %x, %y
363 %res = sext <8 x i1> %cmp to <8 x i16>
364 ret <8 x i16> %res
365}
366
Thomas Livelyebd4c902018-09-12 17:56:00 +0000367; CHECK-LABEL: compare_ugt_v8i16:
368; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000369; SIMD128-NEXT: .functype compare_ugt_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000370; SIMD128-NEXT: i16x8.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
371; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000372define <8 x i1> @compare_ugt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
373 %res = icmp ugt <8 x i16> %x, %y
374 ret <8 x i1> %res
375}
376
Thomas Lively5ea17d42018-10-20 01:35:23 +0000377; CHECK-LABEL: compare_sext_ugt_v8i16:
378; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000379; SIMD128-NEXT: .functype compare_sext_ugt_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000380; SIMD128-NEXT: i16x8.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
381; SIMD128-NEXT: return $pop[[R]]{{$}}
382define <8 x i16> @compare_sext_ugt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
383 %cmp = icmp ugt <8 x i16> %x, %y
384 %res = sext <8 x i1> %cmp to <8 x i16>
385 ret <8 x i16> %res
386}
387
Thomas Livelyebd4c902018-09-12 17:56:00 +0000388; CHECK-LABEL: compare_sge_v8i16:
389; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000390; SIMD128-NEXT: .functype compare_sge_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000391; SIMD128-NEXT: i16x8.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
392; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000393define <8 x i1> @compare_sge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
394 %res = icmp sge <8 x i16> %x, %y
395 ret <8 x i1> %res
396}
397
Thomas Lively5ea17d42018-10-20 01:35:23 +0000398; CHECK-LABEL: compare_sext_sge_v8i16:
399; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000400; SIMD128-NEXT: .functype compare_sext_sge_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000401; SIMD128-NEXT: i16x8.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
402; SIMD128-NEXT: return $pop[[R]]{{$}}
403define <8 x i16> @compare_sext_sge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
404 %cmp = icmp sge <8 x i16> %x, %y
405 %res = sext <8 x i1> %cmp to <8 x i16>
406 ret <8 x i16> %res
407}
408
Thomas Livelyebd4c902018-09-12 17:56:00 +0000409; CHECK-LABEL: compare_uge_v8i16:
410; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000411; SIMD128-NEXT: .functype compare_uge_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000412; SIMD128-NEXT: i16x8.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
413; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000414define <8 x i1> @compare_uge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
415 %res = icmp uge <8 x i16> %x, %y
416 ret <8 x i1> %res
417}
418
Thomas Lively5ea17d42018-10-20 01:35:23 +0000419; CHECK-LABEL: compare_sext_uge_v8i16:
420; NO-SIMD128-NOT: i16x8
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000421; SIMD128-NEXT: .functype compare_sext_uge_v8i16 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000422; SIMD128-NEXT: i16x8.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
423; SIMD128-NEXT: return $pop[[R]]{{$}}
424define <8 x i16> @compare_sext_uge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
425 %cmp = icmp uge <8 x i16> %x, %y
426 %res = sext <8 x i1> %cmp to <8 x i16>
427 ret <8 x i16> %res
428}
429
Thomas Livelyebd4c902018-09-12 17:56:00 +0000430; CHECK-LABEL: compare_eq_v4i32:
431; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000432; SIMD128-NEXT: .functype compare_eq_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000433; SIMD128-NEXT: i32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
434; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000435define <4 x i1> @compare_eq_v4i32 (<4 x i32> %x, <4 x i32> %y) {
436 %res = icmp eq <4 x i32> %x, %y
437 ret <4 x i1> %res
438}
439
Thomas Lively5ea17d42018-10-20 01:35:23 +0000440; CHECK-LABEL: compare_sext_eq_v4i32:
441; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000442; SIMD128-NEXT: .functype compare_sext_eq_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000443; SIMD128-NEXT: i32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
444; SIMD128-NEXT: return $pop[[R]]{{$}}
445define <4 x i32> @compare_sext_eq_v4i32 (<4 x i32> %x, <4 x i32> %y) {
446 %cmp = icmp eq <4 x i32> %x, %y
447 %res = sext <4 x i1> %cmp to <4 x i32>
448 ret <4 x i32> %res
449}
450
Thomas Livelyebd4c902018-09-12 17:56:00 +0000451; CHECK-LABEL: compare_ne_v4i32:
452; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000453; SIMD128-NEXT: .functype compare_ne_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000454; SIMD128-NEXT: i32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
455; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000456define <4 x i1> @compare_ne_v4i32 (<4 x i32> %x, <4 x i32> %y) {
457 %res = icmp ne <4 x i32> %x, %y
458 ret <4 x i1> %res
459}
460
Thomas Lively5ea17d42018-10-20 01:35:23 +0000461; CHECK-LABEL: compare_sext_ne_v4i32:
462; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000463; SIMD128-NEXT: .functype compare_sext_ne_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000464; SIMD128-NEXT: i32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
465; SIMD128-NEXT: return $pop[[R]]{{$}}
466define <4 x i32> @compare_sext_ne_v4i32 (<4 x i32> %x, <4 x i32> %y) {
467 %cmp = icmp ne <4 x i32> %x, %y
468 %res = sext <4 x i1> %cmp to <4 x i32>
469 ret <4 x i32> %res
470}
471
Thomas Livelyebd4c902018-09-12 17:56:00 +0000472; CHECK-LABEL: compare_slt_v4i32:
473; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000474; SIMD128-NEXT: .functype compare_slt_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000475; SIMD128-NEXT: i32x4.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
476; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000477define <4 x i1> @compare_slt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
478 %res = icmp slt <4 x i32> %x, %y
479 ret <4 x i1> %res
480}
481
Thomas Lively5ea17d42018-10-20 01:35:23 +0000482; CHECK-LABEL: compare_sext_slt_v4i32:
483; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000484; SIMD128-NEXT: .functype compare_sext_slt_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000485; SIMD128-NEXT: i32x4.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
486; SIMD128-NEXT: return $pop[[R]]{{$}}
487define <4 x i32> @compare_sext_slt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
488 %cmp = icmp slt <4 x i32> %x, %y
489 %res = sext <4 x i1> %cmp to <4 x i32>
490 ret <4 x i32> %res
491}
492
Thomas Livelyebd4c902018-09-12 17:56:00 +0000493; CHECK-LABEL: compare_ult_v4i32:
494; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000495; SIMD128-NEXT: .functype compare_ult_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000496; SIMD128-NEXT: i32x4.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
497; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000498define <4 x i1> @compare_ult_v4i32 (<4 x i32> %x, <4 x i32> %y) {
499 %res = icmp ult <4 x i32> %x, %y
500 ret <4 x i1> %res
501}
502
Thomas Lively5ea17d42018-10-20 01:35:23 +0000503; CHECK-LABEL: compare_sext_ult_v4i32:
504; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000505; SIMD128-NEXT: .functype compare_sext_ult_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000506; SIMD128-NEXT: i32x4.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
507; SIMD128-NEXT: return $pop[[R]]{{$}}
508define <4 x i32> @compare_sext_ult_v4i32 (<4 x i32> %x, <4 x i32> %y) {
509 %cmp = icmp ult <4 x i32> %x, %y
510 %res = sext <4 x i1> %cmp to <4 x i32>
511 ret <4 x i32> %res
512}
513
Thomas Livelyebd4c902018-09-12 17:56:00 +0000514; CHECK-LABEL: compare_sle_v4i32:
515; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000516; SIMD128-NEXT: .functype compare_sle_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000517; SIMD128-NEXT: i32x4.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
518; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000519define <4 x i1> @compare_sle_v4i32 (<4 x i32> %x, <4 x i32> %y) {
520 %res = icmp sle <4 x i32> %x, %y
521 ret <4 x i1> %res
522}
523
Thomas Lively5ea17d42018-10-20 01:35:23 +0000524; CHECK-LABEL: compare_sext_sle_v4i32:
525; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000526; SIMD128-NEXT: .functype compare_sext_sle_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000527; SIMD128-NEXT: i32x4.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
528; SIMD128-NEXT: return $pop[[R]]{{$}}
529define <4 x i32> @compare_sext_sle_v4i32 (<4 x i32> %x, <4 x i32> %y) {
530 %cmp = icmp sle <4 x i32> %x, %y
531 %res = sext <4 x i1> %cmp to <4 x i32>
532 ret <4 x i32> %res
533}
534
Thomas Livelyebd4c902018-09-12 17:56:00 +0000535; CHECK-LABEL: compare_ule_v4i32:
536; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000537; SIMD128-NEXT: .functype compare_ule_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000538; SIMD128-NEXT: i32x4.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
539; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000540define <4 x i1> @compare_ule_v4i32 (<4 x i32> %x, <4 x i32> %y) {
541 %res = icmp ule <4 x i32> %x, %y
542 ret <4 x i1> %res
543}
544
Thomas Lively5ea17d42018-10-20 01:35:23 +0000545; CHECK-LABEL: compare_sext_ule_v4i32:
546; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000547; SIMD128-NEXT: .functype compare_sext_ule_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000548; SIMD128-NEXT: i32x4.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
549; SIMD128-NEXT: return $pop[[R]]{{$}}
550define <4 x i32> @compare_sext_ule_v4i32 (<4 x i32> %x, <4 x i32> %y) {
551 %cmp = icmp ule <4 x i32> %x, %y
552 %res = sext <4 x i1> %cmp to <4 x i32>
553 ret <4 x i32> %res
554}
555
Thomas Livelyebd4c902018-09-12 17:56:00 +0000556; CHECK-LABEL: compare_sgt_v4i32:
557; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000558; SIMD128-NEXT: .functype compare_sgt_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000559; SIMD128-NEXT: i32x4.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
560; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000561define <4 x i1> @compare_sgt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
562 %res = icmp sgt <4 x i32> %x, %y
563 ret <4 x i1> %res
564}
565
Thomas Lively5ea17d42018-10-20 01:35:23 +0000566; CHECK-LABEL: compare_sext_sgt_v4i32:
567; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000568; SIMD128-NEXT: .functype compare_sext_sgt_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000569; SIMD128-NEXT: i32x4.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
570; SIMD128-NEXT: return $pop[[R]]{{$}}
571define <4 x i32> @compare_sext_sgt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
572 %cmp = icmp sgt <4 x i32> %x, %y
573 %res = sext <4 x i1> %cmp to <4 x i32>
574 ret <4 x i32> %res
575}
576
Thomas Livelyebd4c902018-09-12 17:56:00 +0000577; CHECK-LABEL: compare_ugt_v4i32:
578; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000579; SIMD128-NEXT: .functype compare_ugt_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000580; SIMD128-NEXT: i32x4.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
581; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000582define <4 x i1> @compare_ugt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
583 %res = icmp ugt <4 x i32> %x, %y
584 ret <4 x i1> %res
585}
586
Thomas Lively5ea17d42018-10-20 01:35:23 +0000587; CHECK-LABEL: compare_sext_ugt_v4i32:
588; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000589; SIMD128-NEXT: .functype compare_sext_ugt_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000590; SIMD128-NEXT: i32x4.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
591; SIMD128-NEXT: return $pop[[R]]{{$}}
592define <4 x i32> @compare_sext_ugt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
593 %cmp = icmp ugt <4 x i32> %x, %y
594 %res = sext <4 x i1> %cmp to <4 x i32>
595 ret <4 x i32> %res
596}
597
Thomas Livelyebd4c902018-09-12 17:56:00 +0000598; CHECK-LABEL: compare_sge_v4i32:
599; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000600; SIMD128-NEXT: .functype compare_sge_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000601; SIMD128-NEXT: i32x4.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
602; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000603define <4 x i1> @compare_sge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
604 %res = icmp sge <4 x i32> %x, %y
605 ret <4 x i1> %res
606}
607
Thomas Lively5ea17d42018-10-20 01:35:23 +0000608; CHECK-LABEL: compare_sext_sge_v4i32:
609; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000610; SIMD128-NEXT: .functype compare_sext_sge_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000611; SIMD128-NEXT: i32x4.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
612; SIMD128-NEXT: return $pop[[R]]{{$}}
613define <4 x i32> @compare_sext_sge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
614 %cmp = icmp sge <4 x i32> %x, %y
615 %res = sext <4 x i1> %cmp to <4 x i32>
616 ret <4 x i32> %res
617}
618
Thomas Livelyebd4c902018-09-12 17:56:00 +0000619; CHECK-LABEL: compare_uge_v4i32:
620; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000621; SIMD128-NEXT: .functype compare_uge_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000622; SIMD128-NEXT: i32x4.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
623; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000624define <4 x i1> @compare_uge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
625 %res = icmp uge <4 x i32> %x, %y
626 ret <4 x i1> %res
627}
628
Thomas Lively5ea17d42018-10-20 01:35:23 +0000629; CHECK-LABEL: compare_sext_uge_v4i32:
630; NO-SIMD128-NOT: i32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000631; SIMD128-NEXT: .functype compare_sext_uge_v4i32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000632; SIMD128-NEXT: i32x4.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
633; SIMD128-NEXT: return $pop[[R]]{{$}}
634define <4 x i32> @compare_sext_uge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
635 %cmp = icmp uge <4 x i32> %x, %y
636 %res = sext <4 x i1> %cmp to <4 x i32>
637 ret <4 x i32> %res
638}
639
Thomas Livelyebd4c902018-09-12 17:56:00 +0000640; CHECK-LABEL: compare_oeq_v4f32:
641; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000642; SIMD128-NEXT: .functype compare_oeq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000643; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
644; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000645define <4 x i1> @compare_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
646 %res = fcmp oeq <4 x float> %x, %y
647 ret <4 x i1> %res
648}
649
Thomas Lively5ea17d42018-10-20 01:35:23 +0000650; CHECK-LABEL: compare_sext_oeq_v4f32:
651; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000652; SIMD128-NEXT: .functype compare_sext_oeq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000653; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
654; SIMD128-NEXT: return $pop[[R]]{{$}}
655define <4 x i32> @compare_sext_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
656 %cmp = fcmp oeq <4 x float> %x, %y
657 %res = sext <4 x i1> %cmp to <4 x i32>
658 ret <4 x i32> %res
659}
660
Thomas Livelyebd4c902018-09-12 17:56:00 +0000661; CHECK-LABEL: compare_ogt_v4f32:
662; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000663; SIMD128-NEXT: .functype compare_ogt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000664; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
665; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000666define <4 x i1> @compare_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
667 %res = fcmp ogt <4 x float> %x, %y
668 ret <4 x i1> %res
669}
670
Thomas Lively5ea17d42018-10-20 01:35:23 +0000671; CHECK-LABEL: compare_sext_ogt_v4f32:
672; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000673; SIMD128-NEXT: .functype compare_sext_ogt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000674; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
675; SIMD128-NEXT: return $pop[[R]]{{$}}
676define <4 x i32> @compare_sext_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
677 %cmp = fcmp ogt <4 x float> %x, %y
678 %res = sext <4 x i1> %cmp to <4 x i32>
679 ret <4 x i32> %res
680}
681
Thomas Livelyebd4c902018-09-12 17:56:00 +0000682; CHECK-LABEL: compare_oge_v4f32:
683; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000684; SIMD128-NEXT: .functype compare_oge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000685; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
686; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000687define <4 x i1> @compare_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
688 %res = fcmp oge <4 x float> %x, %y
689 ret <4 x i1> %res
690}
691
Thomas Lively5ea17d42018-10-20 01:35:23 +0000692; CHECK-LABEL: compare_sext_oge_v4f32:
693; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000694; SIMD128-NEXT: .functype compare_sext_oge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000695; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
696; SIMD128-NEXT: return $pop[[R]]{{$}}
697define <4 x i32> @compare_sext_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
698 %cmp = fcmp oge <4 x float> %x, %y
699 %res = sext <4 x i1> %cmp to <4 x i32>
700 ret <4 x i32> %res
701}
702
Thomas Livelyebd4c902018-09-12 17:56:00 +0000703; CHECK-LABEL: compare_olt_v4f32:
704; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000705; SIMD128-NEXT: .functype compare_olt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000706; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
707; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000708define <4 x i1> @compare_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
709 %res = fcmp olt <4 x float> %x, %y
710 ret <4 x i1> %res
711}
712
Thomas Lively5ea17d42018-10-20 01:35:23 +0000713; CHECK-LABEL: compare_sext_olt_v4f32:
714; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000715; SIMD128-NEXT: .functype compare_sext_olt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000716; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
717; SIMD128-NEXT: return $pop[[R]]{{$}}
718define <4 x i32> @compare_sext_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
719 %cmp = fcmp olt <4 x float> %x, %y
720 %res = sext <4 x i1> %cmp to <4 x i32>
721 ret <4 x i32> %res
722}
723
Thomas Livelyebd4c902018-09-12 17:56:00 +0000724; CHECK-LABEL: compare_ole_v4f32:
725; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000726; SIMD128-NEXT: .functype compare_ole_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000727; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
728; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000729define <4 x i1> @compare_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
730 %res = fcmp ole <4 x float> %x, %y
731 ret <4 x i1> %res
732}
733
Thomas Lively5ea17d42018-10-20 01:35:23 +0000734; CHECK-LABEL: compare_sext_ole_v4f32:
735; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000736; SIMD128-NEXT: .functype compare_sext_ole_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000737; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
738; SIMD128-NEXT: return $pop[[R]]{{$}}
739define <4 x i32> @compare_sext_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
740 %cmp = fcmp ole <4 x float> %x, %y
741 %res = sext <4 x i1> %cmp to <4 x i32>
742 ret <4 x i32> %res
743}
744
Thomas Livelyebd4c902018-09-12 17:56:00 +0000745; CHECK-LABEL: compare_one_v4f32:
746; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000747; SIMD128-NEXT: .functype compare_one_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000748; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
749; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
750; SIMD128-NEXT: f32x4.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
751; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
752; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
753; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000754define <4 x i1> @compare_one_v4f32 (<4 x float> %x, <4 x float> %y) {
755 %res = fcmp one <4 x float> %x, %y
756 ret <4 x i1> %res
757}
758
Thomas Lively5ea17d42018-10-20 01:35:23 +0000759; CHECK-LABEL: compare_sext_one_v4f32:
760; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000761; SIMD128-NEXT: .functype compare_sext_one_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000762; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
763; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
764; SIMD128-NEXT: f32x4.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
765; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
766; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
767; SIMD128-NEXT: return $pop[[R]]{{$}}
768define <4 x i32> @compare_sext_one_v4f32 (<4 x float> %x, <4 x float> %y) {
769 %cmp = fcmp one <4 x float> %x, %y
770 %res = sext <4 x i1> %cmp to <4 x i32>
771 ret <4 x i32> %res
772}
773
Thomas Livelyebd4c902018-09-12 17:56:00 +0000774; CHECK-LABEL: compare_ord_v4f32:
775; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000776; SIMD128-NEXT: .functype compare_ord_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000777; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
778; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
779; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
780; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000781define <4 x i1> @compare_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
782 %res = fcmp ord <4 x float> %x, %y
783 ret <4 x i1> %res
784}
785
Thomas Lively5ea17d42018-10-20 01:35:23 +0000786; CHECK-LABEL: compare_sext_ord_v4f32:
787; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000788; SIMD128-NEXT: .functype compare_sext_ord_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000789; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
790; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
791; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
792; SIMD128-NEXT: return $pop[[R]]{{$}}
793define <4 x i32> @compare_sext_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
794 %cmp = fcmp ord <4 x float> %x, %y
795 %res = sext <4 x i1> %cmp to <4 x i32>
796 ret <4 x i32> %res
797}
798
Thomas Livelyebd4c902018-09-12 17:56:00 +0000799; CHECK-LABEL: compare_ueq_v4f32:
800; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000801; SIMD128-NEXT: .functype compare_ueq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000802; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
803; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
804; SIMD128-NEXT: f32x4.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
805; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
806; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
807; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000808define <4 x i1> @compare_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
809 %res = fcmp ueq <4 x float> %x, %y
810 ret <4 x i1> %res
811}
812
Thomas Lively5ea17d42018-10-20 01:35:23 +0000813; CHECK-LABEL: compare_sext_ueq_v4f32:
814; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000815; SIMD128-NEXT: .functype compare_sext_ueq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000816; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
817; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
818; SIMD128-NEXT: f32x4.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
819; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
820; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
821; SIMD128-NEXT: return $pop[[R]]
822define <4 x i32> @compare_sext_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
823 %cmp = fcmp ueq <4 x float> %x, %y
824 %res = sext <4 x i1> %cmp to <4 x i32>
825 ret <4 x i32> %res
826}
827
Thomas Livelyebd4c902018-09-12 17:56:00 +0000828; CHECK-LABEL: compare_ugt_v4f32:
829; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000830; SIMD128-NEXT: .functype compare_ugt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000831; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
832; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
833; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000834define <4 x i1> @compare_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
835 %res = fcmp ugt <4 x float> %x, %y
836 ret <4 x i1> %res
837}
838
Thomas Lively5ea17d42018-10-20 01:35:23 +0000839; CHECK-LABEL: compare_sext_ugt_v4f32:
840; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000841; SIMD128-NEXT: .functype compare_sext_ugt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000842; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
843; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
844; SIMD128-NEXT: return $pop[[R]]{{$}}
845define <4 x i32> @compare_sext_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
846 %cmp = fcmp ugt <4 x float> %x, %y
847 %res = sext <4 x i1> %cmp to <4 x i32>
848 ret <4 x i32> %res
849}
850
Thomas Livelyebd4c902018-09-12 17:56:00 +0000851; CHECK-LABEL: compare_uge_v4f32:
852; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000853; SIMD128-NEXT: .functype compare_uge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000854; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
855; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
856; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000857define <4 x i1> @compare_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
858 %res = fcmp uge <4 x float> %x, %y
859 ret <4 x i1> %res
860}
861
Thomas Lively5ea17d42018-10-20 01:35:23 +0000862; CHECK-LABEL: compare_sext_uge_v4f32:
863; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000864; SIMD128-NEXT: .functype compare_sext_uge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000865; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
866; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
867; SIMD128-NEXT: return $pop[[R]]{{$}}
868define <4 x i32> @compare_sext_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
869 %cmp = fcmp uge <4 x float> %x, %y
870 %res = sext <4 x i1> %cmp to <4 x i32>
871 ret <4 x i32> %res
872}
873
Thomas Livelyebd4c902018-09-12 17:56:00 +0000874; CHECK-LABEL: compare_ult_v4f32:
875; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000876; SIMD128-NEXT: .functype compare_ult_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000877; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
878; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
879; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000880define <4 x i1> @compare_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
881 %res = fcmp ult <4 x float> %x, %y
882 ret <4 x i1> %res
883}
884
Thomas Lively5ea17d42018-10-20 01:35:23 +0000885; CHECK-LABEL: compare_sext_ult_v4f32:
886; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000887; SIMD128-NEXT: .functype compare_sext_ult_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000888; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
889; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
890; SIMD128-NEXT: return $pop[[R]]{{$}}
891define <4 x i32> @compare_sext_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
892 %cmp = fcmp ult <4 x float> %x, %y
893 %res = sext <4 x i1> %cmp to <4 x i32>
894 ret <4 x i32> %res
895}
896
Thomas Livelyebd4c902018-09-12 17:56:00 +0000897; CHECK-LABEL: compare_ule_v4f32:
898; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000899; SIMD128-NEXT: .functype compare_ule_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000900; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
901; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
902; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000903define <4 x i1> @compare_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
904 %res = fcmp ule <4 x float> %x, %y
905 ret <4 x i1> %res
906}
907
Thomas Lively5ea17d42018-10-20 01:35:23 +0000908; CHECK-LABEL: compare_sext_ule_v4f32:
909; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000910; SIMD128-NEXT: .functype compare_sext_ule_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000911; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
912; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
913; SIMD128-NEXT: return $pop[[R]]{{$}}
914define <4 x i32> @compare_sext_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
915 %cmp = fcmp ule <4 x float> %x, %y
916 %res = sext <4 x i1> %cmp to <4 x i32>
917 ret <4 x i32> %res
918}
919
Thomas Livelyebd4c902018-09-12 17:56:00 +0000920; CHECK-LABEL: compare_une_v4f32:
921; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000922; SIMD128-NEXT: .functype compare_une_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000923; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000924; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000925define <4 x i1> @compare_une_v4f32 (<4 x float> %x, <4 x float> %y) {
926 %res = fcmp une <4 x float> %x, %y
927 ret <4 x i1> %res
928}
929
Thomas Lively5ea17d42018-10-20 01:35:23 +0000930; CHECK-LABEL: compare_sext_une_v4f32:
931; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000932; SIMD128-NEXT: .functype compare_sext_une_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000933; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
934; SIMD128-NEXT: return $pop[[R]]{{$}}
935define <4 x i32> @compare_sext_une_v4f32 (<4 x float> %x, <4 x float> %y) {
936 %cmp = fcmp une <4 x float> %x, %y
937 %res = sext <4 x i1> %cmp to <4 x i32>
938 ret <4 x i32> %res
939}
940
Thomas Livelyebd4c902018-09-12 17:56:00 +0000941; CHECK-LABEL: compare_uno_v4f32:
942; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000943; SIMD128-NEXT: .functype compare_uno_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000944; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
945; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
946; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
947; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000948define <4 x i1> @compare_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
949 %res = fcmp uno <4 x float> %x, %y
950 ret <4 x i1> %res
951}
952
Thomas Lively5ea17d42018-10-20 01:35:23 +0000953; CHECK-LABEL: compare_sext_uno_v4f32:
954; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000955; SIMD128-NEXT: .functype compare_sext_uno_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000956; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
957; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
958; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
959; SIMD128-NEXT: return $pop[[R]]{{$}}
960define <4 x i32> @compare_sext_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
961 %cmp = fcmp uno <4 x float> %x, %y
962 %res = sext <4 x i1> %cmp to <4 x i32>
963 ret <4 x i32> %res
964}
965
Thomas Livelyebd4c902018-09-12 17:56:00 +0000966; CHECK-LABEL: compare_oeq_v2f64:
967; NO-SIMD128-NOT: f64x2
968; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000969; SIMD128-NEXT: .functype compare_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000970; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
971; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000972define <2 x i1> @compare_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
973 %res = fcmp oeq <2 x double> %x, %y
974 ret <2 x i1> %res
975}
976
Thomas Lively5ea17d42018-10-20 01:35:23 +0000977; CHECK-LABEL: compare_sext_oeq_v2f64:
978; NO-SIMD128-NOT: f64x2
979; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000980; SIMD128-NEXT: .functype compare_sext_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000981; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
982; SIMD128-NEXT: return $pop[[R]]{{$}}
983define <2 x i64> @compare_sext_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
984 %cmp = fcmp oeq <2 x double> %x, %y
985 %res = sext <2 x i1> %cmp to <2 x i64>
986 ret <2 x i64> %res
987}
988
Thomas Livelyebd4c902018-09-12 17:56:00 +0000989; CHECK-LABEL: compare_ogt_v2f64:
990; NO-SIMD128-NOT: f64x2
991; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000992; SIMD128-NEXT: .functype compare_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000993; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
994; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000995define <2 x i1> @compare_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
996 %res = fcmp ogt <2 x double> %x, %y
997 ret <2 x i1> %res
998}
999
Thomas Lively5ea17d42018-10-20 01:35:23 +00001000; CHECK-LABEL: compare_sext_ogt_v2f64:
1001; NO-SIMD128-NOT: f64x2
1002; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001003; SIMD128-NEXT: .functype compare_sext_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001004; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1005; SIMD128-NEXT: return $pop[[R]]{{$}}
1006define <2 x i64> @compare_sext_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1007 %cmp = fcmp ogt <2 x double> %x, %y
1008 %res = sext <2 x i1> %cmp to <2 x i64>
1009 ret <2 x i64> %res
1010}
1011
Thomas Livelyebd4c902018-09-12 17:56:00 +00001012; CHECK-LABEL: compare_oge_v2f64:
1013; NO-SIMD128-NOT: f64x2
1014; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001015; SIMD128-NEXT: .functype compare_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001016; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1017; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001018define <2 x i1> @compare_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1019 %res = fcmp oge <2 x double> %x, %y
1020 ret <2 x i1> %res
1021}
1022
Thomas Lively5ea17d42018-10-20 01:35:23 +00001023; CHECK-LABEL: compare_sext_oge_v2f64:
1024; NO-SIMD128-NOT: f64x2
1025; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001026; SIMD128-NEXT: .functype compare_sext_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001027; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1028; SIMD128-NEXT: return $pop[[R]]{{$}}
1029define <2 x i64> @compare_sext_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1030 %cmp = fcmp oge <2 x double> %x, %y
1031 %res = sext <2 x i1> %cmp to <2 x i64>
1032 ret <2 x i64> %res
1033}
1034
Thomas Livelyebd4c902018-09-12 17:56:00 +00001035; CHECK-LABEL: compare_olt_v2f64:
1036; NO-SIMD128-NOT: f64x2
1037; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001038; SIMD128-NEXT: .functype compare_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001039; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1040; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001041define <2 x i1> @compare_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1042 %res = fcmp olt <2 x double> %x, %y
1043 ret <2 x i1> %res
1044}
1045
Thomas Lively5ea17d42018-10-20 01:35:23 +00001046; CHECK-LABEL: compare_sext_olt_v2f64:
1047; NO-SIMD128-NOT: f64x2
1048; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001049; SIMD128-NEXT: .functype compare_sext_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001050; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1051; SIMD128-NEXT: return $pop[[R]]{{$}}
1052define <2 x i64> @compare_sext_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1053 %cmp = fcmp olt <2 x double> %x, %y
1054 %res = sext <2 x i1> %cmp to <2 x i64>
1055 ret <2 x i64> %res
1056}
1057
Thomas Livelyebd4c902018-09-12 17:56:00 +00001058; CHECK-LABEL: compare_ole_v2f64:
1059; NO-SIMD128-NOT: f64x2
1060; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001061; SIMD128-NEXT: .functype compare_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001062; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1063; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001064define <2 x i1> @compare_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1065 %res = fcmp ole <2 x double> %x, %y
1066 ret <2 x i1> %res
1067}
1068
Thomas Lively5ea17d42018-10-20 01:35:23 +00001069; CHECK-LABEL: compare_sext_ole_v2f64:
1070; NO-SIMD128-NOT: f64x2
1071; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001072; SIMD128-NEXT: .functype compare_sext_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001073; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1074; SIMD128-NEXT: return $pop[[R]]{{$}}
1075define <2 x i64> @compare_sext_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1076 %cmp = fcmp ole <2 x double> %x, %y
1077 %res = sext <2 x i1> %cmp to <2 x i64>
1078 ret <2 x i64> %res
1079}
1080
Thomas Livelyebd4c902018-09-12 17:56:00 +00001081; CHECK-LABEL: compare_one_v2f64:
1082; NO-SIMD128-NOT: f64x2
1083; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001084; SIMD128-NEXT: .functype compare_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001085; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1086; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1087; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1088; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1089; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1090; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001091define <2 x i1> @compare_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1092 %res = fcmp one <2 x double> %x, %y
1093 ret <2 x i1> %res
1094}
1095
Thomas Lively5ea17d42018-10-20 01:35:23 +00001096; CHECK-LABEL: compare_sext_one_v2f64:
1097; NO-SIMD128-NOT: f64x2
1098; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001099; SIMD128-NEXT: .functype compare_sext_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001100; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1101; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1102; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1103; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1104; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1105; SIMD128-NEXT: return $pop[[R]]{{$}}
1106define <2 x i64> @compare_sext_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1107 %cmp = fcmp one <2 x double> %x, %y
1108 %res = sext <2 x i1> %cmp to <2 x i64>
1109 ret <2 x i64> %res
1110}
1111
Thomas Livelyebd4c902018-09-12 17:56:00 +00001112; CHECK-LABEL: compare_ord_v2f64:
1113; NO-SIMD128-NOT: f64x2
1114; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001115; SIMD128-NEXT: .functype compare_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001116; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1117; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1118; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1119; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001120define <2 x i1> @compare_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1121 %res = fcmp ord <2 x double> %x, %y
1122 ret <2 x i1> %res
1123}
1124
Thomas Lively5ea17d42018-10-20 01:35:23 +00001125; CHECK-LABEL: compare_sext_ord_v2f64:
1126; NO-SIMD128-NOT: f64x2
1127; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001128; SIMD128-NEXT: .functype compare_sext_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001129; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1130; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1131; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1132; SIMD128-NEXT: return $pop[[R]]{{$}}
1133define <2 x i64> @compare_sext_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1134 %cmp = fcmp ord <2 x double> %x, %y
1135 %res = sext <2 x i1> %cmp to <2 x i64>
1136 ret <2 x i64> %res
1137}
1138
Thomas Livelyebd4c902018-09-12 17:56:00 +00001139; CHECK-LABEL: compare_ueq_v2f64:
1140; NO-SIMD128-NOT: f64x2
1141; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001142; SIMD128-NEXT: .functype compare_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001143; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1144; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1145; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1146; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1147; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1148; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001149define <2 x i1> @compare_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1150 %res = fcmp ueq <2 x double> %x, %y
1151 ret <2 x i1> %res
1152}
1153
Thomas Lively5ea17d42018-10-20 01:35:23 +00001154; CHECK-LABEL: compare_sext_ueq_v2f64:
1155; NO-SIMD128-NOT: f64x2
1156; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001157; SIMD128-NEXT: .functype compare_sext_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001158; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1159; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1160; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1161; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1162; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1163; SIMD128-NEXT: return $pop[[R]]{{$}}
1164define <2 x i64> @compare_sext_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1165 %cmp = fcmp ueq <2 x double> %x, %y
1166 %res = sext <2 x i1> %cmp to <2 x i64>
1167 ret <2 x i64> %res
1168}
1169
Thomas Livelyebd4c902018-09-12 17:56:00 +00001170; CHECK-LABEL: compare_ugt_v2f64:
1171; NO-SIMD128-NOT: f64x2
1172; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001173; SIMD128-NEXT: .functype compare_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001174; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1175; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1176; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001177define <2 x i1> @compare_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1178 %res = fcmp ugt <2 x double> %x, %y
1179 ret <2 x i1> %res
1180}
1181
Thomas Lively5ea17d42018-10-20 01:35:23 +00001182; CHECK-LABEL: compare_sext_ugt_v2f64:
1183; NO-SIMD128-NOT: f64x2
1184; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001185; SIMD128-NEXT: .functype compare_sext_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001186; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1187; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1188; SIMD128-NEXT: return $pop[[R]]{{$}}
1189define <2 x i64> @compare_sext_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1190 %cmp = fcmp ugt <2 x double> %x, %y
1191 %res = sext <2 x i1> %cmp to <2 x i64>
1192 ret <2 x i64> %res
1193}
1194
Thomas Livelyebd4c902018-09-12 17:56:00 +00001195; CHECK-LABEL: compare_uge_v2f64:
1196; NO-SIMD128-NOT: f64x2
1197; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001198; SIMD128-NEXT: .functype compare_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001199; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1200; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1201; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001202define <2 x i1> @compare_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1203 %res = fcmp uge <2 x double> %x, %y
1204 ret <2 x i1> %res
1205}
1206
Thomas Lively5ea17d42018-10-20 01:35:23 +00001207; CHECK-LABEL: compare_sext_uge_v2f64:
1208; NO-SIMD128-NOT: f64x2
1209; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001210; SIMD128-NEXT: .functype compare_sext_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001211; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1212; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1213; SIMD128-NEXT: return $pop[[R]]{{$}}
1214define <2 x i64> @compare_sext_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1215 %cmp = fcmp uge <2 x double> %x, %y
1216 %res = sext <2 x i1> %cmp to <2 x i64>
1217 ret <2 x i64> %res
1218}
1219
Thomas Livelyebd4c902018-09-12 17:56:00 +00001220; CHECK-LABEL: compare_ult_v2f64:
1221; NO-SIMD128-NOT: f64x2
1222; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001223; SIMD128-NEXT: .functype compare_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001224; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1225; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1226; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001227define <2 x i1> @compare_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1228 %res = fcmp ult <2 x double> %x, %y
1229 ret <2 x i1> %res
1230}
1231
Thomas Lively5ea17d42018-10-20 01:35:23 +00001232; CHECK-LABEL: compare_sext_ult_v2f64:
1233; NO-SIMD128-NOT: f64x2
1234; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001235; SIMD128-NEXT: .functype compare_sext_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001236; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1237; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1238; SIMD128-NEXT: return $pop[[R]]{{$}}
1239define <2 x i64> @compare_sext_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1240 %cmp = fcmp ult <2 x double> %x, %y
1241 %res = sext <2 x i1> %cmp to <2 x i64>
1242 ret <2 x i64> %res
1243}
1244
Thomas Livelyebd4c902018-09-12 17:56:00 +00001245; CHECK-LABEL: compare_ule_v2f64:
1246; NO-SIMD128-NOT: f64x2
1247; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001248; SIMD128-NEXT: .functype compare_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001249; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1250; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1251; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001252define <2 x i1> @compare_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1253 %res = fcmp ule <2 x double> %x, %y
1254 ret <2 x i1> %res
1255}
1256
Thomas Lively5ea17d42018-10-20 01:35:23 +00001257; CHECK-LABEL: compare_sext_ule_v2f64:
1258; NO-SIMD128-NOT: f64x2
1259; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001260; SIMD128-NEXT: .functype compare_sext_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001261; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1262; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1263; SIMD128-NEXT: return $pop[[R]]{{$}}
1264define <2 x i64> @compare_sext_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1265 %cmp = fcmp ule <2 x double> %x, %y
1266 %res = sext <2 x i1> %cmp to <2 x i64>
1267 ret <2 x i64> %res
1268}
1269
Thomas Livelyebd4c902018-09-12 17:56:00 +00001270; CHECK-LABEL: compare_une_v2f64:
1271; NO-SIMD128-NOT: f64x2
1272; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001273; SIMD128-NEXT: .functype compare_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001274; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1275; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001276define <2 x i1> @compare_une_v2f64 (<2 x double> %x, <2 x double> %y) {
1277 %res = fcmp une <2 x double> %x, %y
1278 ret <2 x i1> %res
1279}
1280
Thomas Lively5ea17d42018-10-20 01:35:23 +00001281; CHECK-LABEL: compare_sext_une_v2f64:
1282; NO-SIMD128-NOT: f64x2
1283; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001284; SIMD128-NEXT: .functype compare_sext_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001285; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1286; SIMD128-NEXT: return $pop[[R]]{{$}}
1287define <2 x i64> @compare_sext_une_v2f64 (<2 x double> %x, <2 x double> %y) {
1288 %cmp = fcmp une <2 x double> %x, %y
1289 %res = sext <2 x i1> %cmp to <2 x i64>
1290 ret <2 x i64> %res
1291}
1292
Thomas Livelyebd4c902018-09-12 17:56:00 +00001293; CHECK-LABEL: compare_uno_v2f64:
1294; NO-SIMD128-NOT: f64x2
1295; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001296; SIMD128-NEXT: .functype compare_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001297; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1298; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1299; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1300; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001301define <2 x i1> @compare_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
1302 %res = fcmp uno <2 x double> %x, %y
1303 ret <2 x i1> %res
1304}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001305
1306; CHECK-LABEL: compare_sext_uno_v2f64:
1307; NO-SIMD128-NOT: f64x2
1308; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001309; SIMD128-NEXT: .functype compare_sext_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001310; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1311; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1312; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1313; SIMD128-NEXT: return $pop[[R]]{{$}}
1314define <2 x i64> @compare_sext_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
1315 %cmp = fcmp uno <2 x double> %x, %y
1316 %res = sext <2 x i1> %cmp to <2 x i64>
1317 ret <2 x i64> %res
1318}