blob: 2decd38fa84a14d1fd04d26a932362e817c3a6fb [file] [log] [blame]
Thomas Lively64a39a12019-01-10 22:32:11 +00001; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -mattr=+unimplemented-simd128 | FileCheck %s --check-prefixes CHECK,SIMD128
2; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -mattr=+simd128 | FileCheck %s --check-prefixes CHECK,SIMD128-VM
3; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals | 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 Lively0200d622019-03-19 00:55:34 +0000650; CHECK-LABEL: compare_oeq_nnan_v4f32:
651; NO-SIMD128-NOT: f32x4
652; SIMD128-NEXT: .functype compare_oeq_nnan_v4f32 (v128, v128) -> (v128){{$}}
653; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
654; SIMD128-NEXT: return $pop[[R]]{{$}}
655define <4 x i1> @compare_oeq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
656 %res = fcmp nnan oeq <4 x float> %x, %y
657 ret <4 x i1> %res
658}
659
Thomas Lively5ea17d42018-10-20 01:35:23 +0000660; CHECK-LABEL: compare_sext_oeq_v4f32:
661; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000662; SIMD128-NEXT: .functype compare_sext_oeq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000663; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
664; SIMD128-NEXT: return $pop[[R]]{{$}}
665define <4 x i32> @compare_sext_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
666 %cmp = fcmp oeq <4 x float> %x, %y
667 %res = sext <4 x i1> %cmp to <4 x i32>
668 ret <4 x i32> %res
669}
670
Thomas Lively0200d622019-03-19 00:55:34 +0000671; CHECK-LABEL: compare_sext_oeq_nnan_v4f32:
672; NO-SIMD128-NOT: f32x4
673; SIMD128-NEXT: .functype compare_sext_oeq_nnan_v4f32 (v128, v128) -> (v128){{$}}
674; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
675; SIMD128-NEXT: return $pop[[R]]{{$}}
676define <4 x i32> @compare_sext_oeq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
677 %cmp = fcmp nnan oeq <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_ogt_v4f32:
683; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000684; SIMD128-NEXT: .functype compare_ogt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000685; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
686; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000687define <4 x i1> @compare_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
688 %res = fcmp ogt <4 x float> %x, %y
689 ret <4 x i1> %res
690}
691
Thomas Lively0200d622019-03-19 00:55:34 +0000692; CHECK-LABEL: compare_ogt_nnan_v4f32:
693; NO-SIMD128-NOT: f32x4
694; SIMD128-NEXT: .functype compare_ogt_nnan_v4f32 (v128, v128) -> (v128){{$}}
695; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
696; SIMD128-NEXT: return $pop[[R]]{{$}}
697define <4 x i1> @compare_ogt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
698 %res = fcmp nnan ogt <4 x float> %x, %y
699 ret <4 x i1> %res
700}
701
Thomas Lively5ea17d42018-10-20 01:35:23 +0000702; CHECK-LABEL: compare_sext_ogt_v4f32:
703; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000704; SIMD128-NEXT: .functype compare_sext_ogt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000705; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
706; SIMD128-NEXT: return $pop[[R]]{{$}}
707define <4 x i32> @compare_sext_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
708 %cmp = fcmp ogt <4 x float> %x, %y
709 %res = sext <4 x i1> %cmp to <4 x i32>
710 ret <4 x i32> %res
711}
712
Thomas Lively0200d622019-03-19 00:55:34 +0000713; CHECK-LABEL: compare_sext_ogt_nnan_v4f32:
714; NO-SIMD128-NOT: f32x4
715; SIMD128-NEXT: .functype compare_sext_ogt_nnan_v4f32 (v128, v128) -> (v128){{$}}
716; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
717; SIMD128-NEXT: return $pop[[R]]{{$}}
718define <4 x i32> @compare_sext_ogt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
719 %cmp = fcmp nnan ogt <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_oge_v4f32:
725; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000726; SIMD128-NEXT: .functype compare_oge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000727; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
728; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000729define <4 x i1> @compare_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
730 %res = fcmp oge <4 x float> %x, %y
731 ret <4 x i1> %res
732}
733
Thomas Lively0200d622019-03-19 00:55:34 +0000734; CHECK-LABEL: compare_oge_nnan_v4f32:
735; NO-SIMD128-NOT: f32x4
736; SIMD128-NEXT: .functype compare_oge_nnan_v4f32 (v128, v128) -> (v128){{$}}
737; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
738; SIMD128-NEXT: return $pop[[R]]{{$}}
739define <4 x i1> @compare_oge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
740 %res = fcmp nnan oge <4 x float> %x, %y
741 ret <4 x i1> %res
742}
743
Thomas Lively5ea17d42018-10-20 01:35:23 +0000744; CHECK-LABEL: compare_sext_oge_v4f32:
745; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000746; SIMD128-NEXT: .functype compare_sext_oge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000747; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
748; SIMD128-NEXT: return $pop[[R]]{{$}}
749define <4 x i32> @compare_sext_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
750 %cmp = fcmp oge <4 x float> %x, %y
751 %res = sext <4 x i1> %cmp to <4 x i32>
752 ret <4 x i32> %res
753}
754
Thomas Lively0200d622019-03-19 00:55:34 +0000755; CHECK-LABEL: compare_sext_oge_nnan_v4f32:
756; NO-SIMD128-NOT: f32x4
757; SIMD128-NEXT: .functype compare_sext_oge_nnan_v4f32 (v128, v128) -> (v128){{$}}
758; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
759; SIMD128-NEXT: return $pop[[R]]{{$}}
760define <4 x i32> @compare_sext_oge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
761 %cmp = fcmp nnan oge <4 x float> %x, %y
762 %res = sext <4 x i1> %cmp to <4 x i32>
763 ret <4 x i32> %res
764}
765
Thomas Livelyebd4c902018-09-12 17:56:00 +0000766; CHECK-LABEL: compare_olt_v4f32:
767; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000768; SIMD128-NEXT: .functype compare_olt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000769; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
770; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000771define <4 x i1> @compare_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
772 %res = fcmp olt <4 x float> %x, %y
773 ret <4 x i1> %res
774}
775
Thomas Lively0200d622019-03-19 00:55:34 +0000776; CHECK-LABEL: compare_olt_nnan_v4f32:
777; NO-SIMD128-NOT: f32x4
778; SIMD128-NEXT: .functype compare_olt_nnan_v4f32 (v128, v128) -> (v128){{$}}
779; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
780; SIMD128-NEXT: return $pop[[R]]{{$}}
781define <4 x i1> @compare_olt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
782 %res = fcmp nnan olt <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_olt_v4f32:
787; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000788; SIMD128-NEXT: .functype compare_sext_olt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000789; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
790; SIMD128-NEXT: return $pop[[R]]{{$}}
791define <4 x i32> @compare_sext_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
792 %cmp = fcmp olt <4 x float> %x, %y
793 %res = sext <4 x i1> %cmp to <4 x i32>
794 ret <4 x i32> %res
795}
796
Thomas Lively0200d622019-03-19 00:55:34 +0000797; CHECK-LABEL: compare_sext_olt_nnan_v4f32:
798; NO-SIMD128-NOT: f32x4
799; SIMD128-NEXT: .functype compare_sext_olt_nnan_v4f32 (v128, v128) -> (v128){{$}}
800; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
801; SIMD128-NEXT: return $pop[[R]]{{$}}
802define <4 x i32> @compare_sext_olt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
803 %cmp = fcmp nnan olt <4 x float> %x, %y
804 %res = sext <4 x i1> %cmp to <4 x i32>
805 ret <4 x i32> %res
806}
807
Thomas Livelyebd4c902018-09-12 17:56:00 +0000808; CHECK-LABEL: compare_ole_v4f32:
809; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000810; SIMD128-NEXT: .functype compare_ole_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000811; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
812; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000813define <4 x i1> @compare_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
814 %res = fcmp ole <4 x float> %x, %y
815 ret <4 x i1> %res
816}
817
Thomas Lively0200d622019-03-19 00:55:34 +0000818; CHECK-LABEL: compare_ole_nnan_v4f32:
819; NO-SIMD128-NOT: f32x4
820; SIMD128-NEXT: .functype compare_ole_nnan_v4f32 (v128, v128) -> (v128){{$}}
821; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
822; SIMD128-NEXT: return $pop[[R]]{{$}}
823define <4 x i1> @compare_ole_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
824 %res = fcmp nnan ole <4 x float> %x, %y
825 ret <4 x i1> %res
826}
827
Thomas Lively5ea17d42018-10-20 01:35:23 +0000828; CHECK-LABEL: compare_sext_ole_v4f32:
829; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000830; SIMD128-NEXT: .functype compare_sext_ole_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000831; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
832; SIMD128-NEXT: return $pop[[R]]{{$}}
833define <4 x i32> @compare_sext_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
834 %cmp = fcmp ole <4 x float> %x, %y
835 %res = sext <4 x i1> %cmp to <4 x i32>
836 ret <4 x i32> %res
837}
838
Thomas Lively0200d622019-03-19 00:55:34 +0000839; CHECK-LABEL: compare_sext_ole_nnan_v4f32:
840; NO-SIMD128-NOT: f32x4
841; SIMD128-NEXT: .functype compare_sext_ole_nnan_v4f32 (v128, v128) -> (v128){{$}}
842; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
843; SIMD128-NEXT: return $pop[[R]]{{$}}
844define <4 x i32> @compare_sext_ole_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
845 %cmp = fcmp nnan ole <4 x float> %x, %y
846 %res = sext <4 x i1> %cmp to <4 x i32>
847 ret <4 x i32> %res
848}
849
Thomas Livelyebd4c902018-09-12 17:56:00 +0000850; CHECK-LABEL: compare_one_v4f32:
851; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000852; SIMD128-NEXT: .functype compare_one_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000853; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
854; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
855; SIMD128-NEXT: f32x4.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
856; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
857; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
858; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000859define <4 x i1> @compare_one_v4f32 (<4 x float> %x, <4 x float> %y) {
860 %res = fcmp one <4 x float> %x, %y
861 ret <4 x i1> %res
862}
863
Thomas Lively0200d622019-03-19 00:55:34 +0000864; CHECK-LABEL: compare_one_nnan_v4f32:
865; NO-SIMD128-NOT: f32x4
866; SIMD128-NEXT: .functype compare_one_nnan_v4f32 (v128, v128) -> (v128){{$}}
867; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
868; SIMD128-NEXT: return $pop[[R]]{{$}}
869define <4 x i1> @compare_one_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
870 %res = fcmp nnan one <4 x float> %x, %y
871 ret <4 x i1> %res
872}
873
Thomas Lively5ea17d42018-10-20 01:35:23 +0000874; CHECK-LABEL: compare_sext_one_v4f32:
875; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000876; SIMD128-NEXT: .functype compare_sext_one_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000877; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
878; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
879; SIMD128-NEXT: f32x4.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
880; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
881; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
882; SIMD128-NEXT: return $pop[[R]]{{$}}
883define <4 x i32> @compare_sext_one_v4f32 (<4 x float> %x, <4 x float> %y) {
884 %cmp = fcmp one <4 x float> %x, %y
885 %res = sext <4 x i1> %cmp to <4 x i32>
886 ret <4 x i32> %res
887}
888
Thomas Lively0200d622019-03-19 00:55:34 +0000889; CHECK-LABEL: compare_sext_one_nnan_v4f32:
890; NO-SIMD128-NOT: f32x4
891; SIMD128-NEXT: .functype compare_sext_one_nnan_v4f32 (v128, v128) -> (v128){{$}}
892; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
893; SIMD128-NEXT: return $pop[[R]]{{$}}
894define <4 x i32> @compare_sext_one_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
895 %cmp = fcmp nnan one <4 x float> %x, %y
896 %res = sext <4 x i1> %cmp to <4 x i32>
897 ret <4 x i32> %res
898}
899
Thomas Livelyebd4c902018-09-12 17:56:00 +0000900; CHECK-LABEL: compare_ord_v4f32:
901; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000902; SIMD128-NEXT: .functype compare_ord_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000903; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
904; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
905; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
906; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000907define <4 x i1> @compare_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
908 %res = fcmp ord <4 x float> %x, %y
909 ret <4 x i1> %res
910}
911
Thomas Lively0200d622019-03-19 00:55:34 +0000912; CHECK-LABEL: compare_ord_nnan_v4f32:
913; NO-SIMD128-NOT: f32x4
914; SIMD128-NEXT: .functype compare_ord_nnan_v4f32 (v128, v128) -> (v128){{$}}
915; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
916; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
917; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
918; SIMD128-NEXT: return $pop[[R]]{{$}}
919define <4 x i1> @compare_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
920 %res = fcmp nnan ord <4 x float> %x, %y
921 ret <4 x i1> %res
922}
923
Thomas Lively5ea17d42018-10-20 01:35:23 +0000924; CHECK-LABEL: compare_sext_ord_v4f32:
925; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000926; SIMD128-NEXT: .functype compare_sext_ord_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000927; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
928; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
929; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
930; SIMD128-NEXT: return $pop[[R]]{{$}}
931define <4 x i32> @compare_sext_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
932 %cmp = fcmp ord <4 x float> %x, %y
933 %res = sext <4 x i1> %cmp to <4 x i32>
934 ret <4 x i32> %res
935}
936
Thomas Lively0200d622019-03-19 00:55:34 +0000937; CHECK-LABEL: compare_sext_ord_nnan_v4f32:
938; NO-SIMD128-NOT: f32x4
939; SIMD128-NEXT: .functype compare_sext_ord_nnan_v4f32 (v128, v128) -> (v128){{$}}
940; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
941; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
942; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
943; SIMD128-NEXT: return $pop[[R]]{{$}}
944define <4 x i32> @compare_sext_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
945 %cmp = fcmp nnan ord <4 x float> %x, %y
946 %res = sext <4 x i1> %cmp to <4 x i32>
947 ret <4 x i32> %res
948}
949
Thomas Livelyebd4c902018-09-12 17:56:00 +0000950; CHECK-LABEL: compare_ueq_v4f32:
951; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000952; SIMD128-NEXT: .functype compare_ueq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000953; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
954; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
955; SIMD128-NEXT: f32x4.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
956; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
957; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
958; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000959define <4 x i1> @compare_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
960 %res = fcmp ueq <4 x float> %x, %y
961 ret <4 x i1> %res
962}
963
Thomas Lively0200d622019-03-19 00:55:34 +0000964; CHECK-LABEL: compare_ueq_nnan_v4f32:
965; NO-SIMD128-NOT: f32x4
966; SIMD128-NEXT: .functype compare_ueq_nnan_v4f32 (v128, v128) -> (v128){{$}}
967; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
968; SIMD128-NEXT: return $pop[[R]]{{$}}
969define <4 x i1> @compare_ueq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
970 %res = fcmp nnan ueq <4 x float> %x, %y
971 ret <4 x i1> %res
972}
973
Thomas Lively5ea17d42018-10-20 01:35:23 +0000974; CHECK-LABEL: compare_sext_ueq_v4f32:
975; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000976; SIMD128-NEXT: .functype compare_sext_ueq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000977; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
978; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
979; SIMD128-NEXT: f32x4.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
980; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
981; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
982; SIMD128-NEXT: return $pop[[R]]
983define <4 x i32> @compare_sext_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
984 %cmp = fcmp ueq <4 x float> %x, %y
985 %res = sext <4 x i1> %cmp to <4 x i32>
986 ret <4 x i32> %res
987}
988
Thomas Lively0200d622019-03-19 00:55:34 +0000989; CHECK-LABEL: compare_sext_ueq_nnan_v4f32:
990; NO-SIMD128-NOT: f32x4
991; SIMD128-NEXT: .functype compare_sext_ueq_nnan_v4f32 (v128, v128) -> (v128){{$}}
992; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
993; SIMD128-NEXT: return $pop[[R]]
994define <4 x i32> @compare_sext_ueq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
995 %cmp = fcmp nnan ueq <4 x float> %x, %y
996 %res = sext <4 x i1> %cmp to <4 x i32>
997 ret <4 x i32> %res
998}
999
Thomas Livelyebd4c902018-09-12 17:56:00 +00001000; CHECK-LABEL: compare_ugt_v4f32:
1001; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001002; SIMD128-NEXT: .functype compare_ugt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001003; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1004; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1005; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001006define <4 x i1> @compare_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
1007 %res = fcmp ugt <4 x float> %x, %y
1008 ret <4 x i1> %res
1009}
1010
Thomas Lively0200d622019-03-19 00:55:34 +00001011; CHECK-LABEL: compare_ugt_nnan_v4f32:
1012; NO-SIMD128-NOT: f32x4
1013; SIMD128-NEXT: .functype compare_ugt_nnan_v4f32 (v128, v128) -> (v128){{$}}
1014; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1015; SIMD128-NEXT: return $pop[[R]]{{$}}
1016define <4 x i1> @compare_ugt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1017 %res = fcmp nnan ugt <4 x float> %x, %y
1018 ret <4 x i1> %res
1019}
1020
Thomas Lively5ea17d42018-10-20 01:35:23 +00001021; CHECK-LABEL: compare_sext_ugt_v4f32:
1022; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001023; SIMD128-NEXT: .functype compare_sext_ugt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001024; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1025; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1026; SIMD128-NEXT: return $pop[[R]]{{$}}
1027define <4 x i32> @compare_sext_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
1028 %cmp = fcmp ugt <4 x float> %x, %y
1029 %res = sext <4 x i1> %cmp to <4 x i32>
1030 ret <4 x i32> %res
1031}
1032
Thomas Lively0200d622019-03-19 00:55:34 +00001033; CHECK-LABEL: compare_sext_ugt_nnan_v4f32:
1034; NO-SIMD128-NOT: f32x4
1035; SIMD128-NEXT: .functype compare_sext_ugt_nnan_v4f32 (v128, v128) -> (v128){{$}}
1036; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1037; SIMD128-NEXT: return $pop[[R]]{{$}}
1038define <4 x i32> @compare_sext_ugt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1039 %cmp = fcmp nnan ugt <4 x float> %x, %y
1040 %res = sext <4 x i1> %cmp to <4 x i32>
1041 ret <4 x i32> %res
1042}
1043
Thomas Livelyebd4c902018-09-12 17:56:00 +00001044; CHECK-LABEL: compare_uge_v4f32:
1045; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001046; SIMD128-NEXT: .functype compare_uge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001047; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1048; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1049; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001050define <4 x i1> @compare_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
1051 %res = fcmp uge <4 x float> %x, %y
1052 ret <4 x i1> %res
1053}
1054
Thomas Lively0200d622019-03-19 00:55:34 +00001055; CHECK-LABEL: compare_uge_nnan_v4f32:
1056; NO-SIMD128-NOT: f32x4
1057; SIMD128-NEXT: .functype compare_uge_nnan_v4f32 (v128, v128) -> (v128){{$}}
1058; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1059; SIMD128-NEXT: return $pop[[R]]{{$}}
1060define <4 x i1> @compare_uge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1061 %res = fcmp nnan uge <4 x float> %x, %y
1062 ret <4 x i1> %res
1063}
1064
Thomas Lively5ea17d42018-10-20 01:35:23 +00001065; CHECK-LABEL: compare_sext_uge_v4f32:
1066; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001067; SIMD128-NEXT: .functype compare_sext_uge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001068; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1069; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1070; SIMD128-NEXT: return $pop[[R]]{{$}}
1071define <4 x i32> @compare_sext_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
1072 %cmp = fcmp uge <4 x float> %x, %y
1073 %res = sext <4 x i1> %cmp to <4 x i32>
1074 ret <4 x i32> %res
1075}
1076
Thomas Lively0200d622019-03-19 00:55:34 +00001077; CHECK-LABEL: compare_sext_uge_nnan_v4f32:
1078; NO-SIMD128-NOT: f32x4
1079; SIMD128-NEXT: .functype compare_sext_uge_nnan_v4f32 (v128, v128) -> (v128){{$}}
1080; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1081; SIMD128-NEXT: return $pop[[R]]{{$}}
1082define <4 x i32> @compare_sext_uge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1083 %cmp = fcmp nnan uge <4 x float> %x, %y
1084 %res = sext <4 x i1> %cmp to <4 x i32>
1085 ret <4 x i32> %res
1086}
1087
Thomas Livelyebd4c902018-09-12 17:56:00 +00001088; CHECK-LABEL: compare_ult_v4f32:
1089; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001090; SIMD128-NEXT: .functype compare_ult_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001091; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1092; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1093; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001094define <4 x i1> @compare_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
1095 %res = fcmp ult <4 x float> %x, %y
1096 ret <4 x i1> %res
1097}
1098
Thomas Lively0200d622019-03-19 00:55:34 +00001099; CHECK-LABEL: compare_ult_nnan_v4f32:
1100; NO-SIMD128-NOT: f32x4
1101; SIMD128-NEXT: .functype compare_ult_nnan_v4f32 (v128, v128) -> (v128){{$}}
1102; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1103; SIMD128-NEXT: return $pop[[R]]{{$}}
1104define <4 x i1> @compare_ult_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1105 %res = fcmp nnan ult <4 x float> %x, %y
1106 ret <4 x i1> %res
1107}
1108
Thomas Lively5ea17d42018-10-20 01:35:23 +00001109; CHECK-LABEL: compare_sext_ult_v4f32:
1110; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001111; SIMD128-NEXT: .functype compare_sext_ult_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001112; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1113; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1114; SIMD128-NEXT: return $pop[[R]]{{$}}
1115define <4 x i32> @compare_sext_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
1116 %cmp = fcmp ult <4 x float> %x, %y
1117 %res = sext <4 x i1> %cmp to <4 x i32>
1118 ret <4 x i32> %res
1119}
1120
Thomas Lively0200d622019-03-19 00:55:34 +00001121; CHECK-LABEL: compare_sext_ult_nnan_v4f32:
1122; NO-SIMD128-NOT: f32x4
1123; SIMD128-NEXT: .functype compare_sext_ult_nnan_v4f32 (v128, v128) -> (v128){{$}}
1124; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1125; SIMD128-NEXT: return $pop[[R]]{{$}}
1126define <4 x i32> @compare_sext_ult_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1127 %cmp = fcmp nnan ult <4 x float> %x, %y
1128 %res = sext <4 x i1> %cmp to <4 x i32>
1129 ret <4 x i32> %res
1130}
1131
Thomas Livelyebd4c902018-09-12 17:56:00 +00001132; CHECK-LABEL: compare_ule_v4f32:
1133; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001134; SIMD128-NEXT: .functype compare_ule_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001135; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1136; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1137; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001138define <4 x i1> @compare_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
1139 %res = fcmp ule <4 x float> %x, %y
1140 ret <4 x i1> %res
1141}
1142
Thomas Lively0200d622019-03-19 00:55:34 +00001143; CHECK-LABEL: compare_ule_nnan_v4f32:
1144; NO-SIMD128-NOT: f32x4
1145; SIMD128-NEXT: .functype compare_ule_nnan_v4f32 (v128, v128) -> (v128){{$}}
1146; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1147; SIMD128-NEXT: return $pop[[R]]{{$}}
1148define <4 x i1> @compare_ule_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1149 %res = fcmp nnan ule <4 x float> %x, %y
1150 ret <4 x i1> %res
1151}
1152
Thomas Lively5ea17d42018-10-20 01:35:23 +00001153; CHECK-LABEL: compare_sext_ule_v4f32:
1154; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001155; SIMD128-NEXT: .functype compare_sext_ule_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001156; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1157; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1158; SIMD128-NEXT: return $pop[[R]]{{$}}
1159define <4 x i32> @compare_sext_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
1160 %cmp = fcmp ule <4 x float> %x, %y
1161 %res = sext <4 x i1> %cmp to <4 x i32>
1162 ret <4 x i32> %res
1163}
1164
Thomas Lively0200d622019-03-19 00:55:34 +00001165; CHECK-LABEL: compare_sext_ule_nnan_v4f32:
1166; NO-SIMD128-NOT: f32x4
1167; SIMD128-NEXT: .functype compare_sext_ule_nnan_v4f32 (v128, v128) -> (v128){{$}}
1168; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1169; SIMD128-NEXT: return $pop[[R]]{{$}}
1170define <4 x i32> @compare_sext_ule_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1171 %cmp = fcmp nnan ule <4 x float> %x, %y
1172 %res = sext <4 x i1> %cmp to <4 x i32>
1173 ret <4 x i32> %res
1174}
1175
Thomas Livelyebd4c902018-09-12 17:56:00 +00001176; CHECK-LABEL: compare_une_v4f32:
1177; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001178; SIMD128-NEXT: .functype compare_une_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001179; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001180; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001181define <4 x i1> @compare_une_v4f32 (<4 x float> %x, <4 x float> %y) {
1182 %res = fcmp une <4 x float> %x, %y
1183 ret <4 x i1> %res
1184}
1185
Thomas Lively0200d622019-03-19 00:55:34 +00001186; CHECK-LABEL: compare_une_nnan_v4f32:
1187; NO-SIMD128-NOT: f32x4
1188; SIMD128-NEXT: .functype compare_une_nnan_v4f32 (v128, v128) -> (v128){{$}}
1189; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}{{$}}
1190; SIMD128-NEXT: return $pop[[R]]{{$}}
1191define <4 x i1> @compare_une_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1192 %res = fcmp nnan une <4 x float> %x, %y
1193 ret <4 x i1> %res
1194}
1195
Thomas Lively5ea17d42018-10-20 01:35:23 +00001196; CHECK-LABEL: compare_sext_une_v4f32:
1197; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001198; SIMD128-NEXT: .functype compare_sext_une_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001199; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1200; SIMD128-NEXT: return $pop[[R]]{{$}}
1201define <4 x i32> @compare_sext_une_v4f32 (<4 x float> %x, <4 x float> %y) {
1202 %cmp = fcmp une <4 x float> %x, %y
1203 %res = sext <4 x i1> %cmp to <4 x i32>
1204 ret <4 x i32> %res
1205}
1206
Thomas Lively0200d622019-03-19 00:55:34 +00001207; CHECK-LABEL: compare_sext_une_nnan_v4f32:
1208; NO-SIMD128-NOT: f32x4
1209; SIMD128-NEXT: .functype compare_sext_une_nnan_v4f32 (v128, v128) -> (v128){{$}}
1210; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1211; SIMD128-NEXT: return $pop[[R]]{{$}}
1212define <4 x i32> @compare_sext_une_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1213 %cmp = fcmp nnan une <4 x float> %x, %y
1214 %res = sext <4 x i1> %cmp to <4 x i32>
1215 ret <4 x i32> %res
1216}
1217
Thomas Livelyebd4c902018-09-12 17:56:00 +00001218; CHECK-LABEL: compare_uno_v4f32:
1219; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001220; SIMD128-NEXT: .functype compare_uno_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001221; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1222; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1223; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1224; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001225define <4 x i1> @compare_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
1226 %res = fcmp uno <4 x float> %x, %y
1227 ret <4 x i1> %res
1228}
1229
Thomas Lively0200d622019-03-19 00:55:34 +00001230; CHECK-LABEL: compare_uno_nnan_v4f32:
1231; NO-SIMD128-NOT: f32x4
1232; SIMD128-NEXT: .functype compare_uno_nnan_v4f32 (v128, v128) -> (v128){{$}}
1233; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1234; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1235; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1236; SIMD128-NEXT: return $pop[[R]]{{$}}
1237define <4 x i1> @compare_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1238 %res = fcmp nnan uno <4 x float> %x, %y
1239 ret <4 x i1> %res
1240}
1241
Thomas Lively5ea17d42018-10-20 01:35:23 +00001242; CHECK-LABEL: compare_sext_uno_v4f32:
1243; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001244; SIMD128-NEXT: .functype compare_sext_uno_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001245; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1246; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1247; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1248; SIMD128-NEXT: return $pop[[R]]{{$}}
1249define <4 x i32> @compare_sext_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
1250 %cmp = fcmp uno <4 x float> %x, %y
1251 %res = sext <4 x i1> %cmp to <4 x i32>
1252 ret <4 x i32> %res
1253}
1254
Thomas Lively0200d622019-03-19 00:55:34 +00001255; CHECK-LABEL: compare_sext_uno_nnan_v4f32:
1256; NO-SIMD128-NOT: f32x4
1257; SIMD128-NEXT: .functype compare_sext_uno_nnan_v4f32 (v128, v128) -> (v128){{$}}
1258; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1259; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1260; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1261; SIMD128-NEXT: return $pop[[R]]{{$}}
1262define <4 x i32> @compare_sext_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1263 %cmp = fcmp nnan uno <4 x float> %x, %y
1264 %res = sext <4 x i1> %cmp to <4 x i32>
1265 ret <4 x i32> %res
1266}
1267
Thomas Livelyebd4c902018-09-12 17:56:00 +00001268; CHECK-LABEL: compare_oeq_v2f64:
1269; NO-SIMD128-NOT: f64x2
1270; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001271; SIMD128-NEXT: .functype compare_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001272; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1273; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001274define <2 x i1> @compare_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1275 %res = fcmp oeq <2 x double> %x, %y
1276 ret <2 x i1> %res
1277}
1278
Thomas Lively0200d622019-03-19 00:55:34 +00001279; CHECK-LABEL: compare_oeq_nnan_v2f64:
1280; NO-SIMD128-NOT: f64x2
1281; SIMD128-VM-NOT: f64x2
1282; SIMD128-NEXT: .functype compare_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1283; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1284; SIMD128-NEXT: return $pop[[R]]{{$}}
1285define <2 x i1> @compare_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1286 %res = fcmp nnan oeq <2 x double> %x, %y
1287 ret <2 x i1> %res
1288}
1289
Thomas Lively5ea17d42018-10-20 01:35:23 +00001290; CHECK-LABEL: compare_sext_oeq_v2f64:
1291; NO-SIMD128-NOT: f64x2
1292; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001293; SIMD128-NEXT: .functype compare_sext_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001294; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1295; SIMD128-NEXT: return $pop[[R]]{{$}}
1296define <2 x i64> @compare_sext_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1297 %cmp = fcmp oeq <2 x double> %x, %y
1298 %res = sext <2 x i1> %cmp to <2 x i64>
1299 ret <2 x i64> %res
1300}
1301
Thomas Lively0200d622019-03-19 00:55:34 +00001302; CHECK-LABEL: compare_sext_oeq_nnan_v2f64:
1303; NO-SIMD128-NOT: f64x2
1304; SIMD128-VM-NOT: f64x2
1305; SIMD128-NEXT: .functype compare_sext_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1306; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1307; SIMD128-NEXT: return $pop[[R]]{{$}}
1308define <2 x i64> @compare_sext_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1309 %cmp = fcmp nnan oeq <2 x double> %x, %y
1310 %res = sext <2 x i1> %cmp to <2 x i64>
1311 ret <2 x i64> %res
1312}
1313
Thomas Livelyebd4c902018-09-12 17:56:00 +00001314; CHECK-LABEL: compare_ogt_v2f64:
1315; NO-SIMD128-NOT: f64x2
1316; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001317; SIMD128-NEXT: .functype compare_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001318; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1319; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001320define <2 x i1> @compare_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1321 %res = fcmp ogt <2 x double> %x, %y
1322 ret <2 x i1> %res
1323}
1324
Thomas Lively0200d622019-03-19 00:55:34 +00001325; CHECK-LABEL: compare_ogt_nnan_v2f64:
1326; NO-SIMD128-NOT: f64x2
1327; SIMD128-VM-NOT: f64x2
1328; SIMD128-NEXT: .functype compare_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1329; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1330; SIMD128-NEXT: return $pop[[R]]{{$}}
1331define <2 x i1> @compare_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1332 %res = fcmp nnan ogt <2 x double> %x, %y
1333 ret <2 x i1> %res
1334}
1335
Thomas Lively5ea17d42018-10-20 01:35:23 +00001336; CHECK-LABEL: compare_sext_ogt_v2f64:
1337; NO-SIMD128-NOT: f64x2
1338; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001339; SIMD128-NEXT: .functype compare_sext_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001340; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1341; SIMD128-NEXT: return $pop[[R]]{{$}}
1342define <2 x i64> @compare_sext_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1343 %cmp = fcmp ogt <2 x double> %x, %y
1344 %res = sext <2 x i1> %cmp to <2 x i64>
1345 ret <2 x i64> %res
1346}
1347
Thomas Lively0200d622019-03-19 00:55:34 +00001348; CHECK-LABEL: compare_sext_ogt_nnan_v2f64:
1349; NO-SIMD128-NOT: f64x2
1350; SIMD128-VM-NOT: f64x2
1351; SIMD128-NEXT: .functype compare_sext_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1352; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1353; SIMD128-NEXT: return $pop[[R]]{{$}}
1354define <2 x i64> @compare_sext_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1355 %cmp = fcmp nnan ogt <2 x double> %x, %y
1356 %res = sext <2 x i1> %cmp to <2 x i64>
1357 ret <2 x i64> %res
1358}
1359
Thomas Livelyebd4c902018-09-12 17:56:00 +00001360; CHECK-LABEL: compare_oge_v2f64:
1361; NO-SIMD128-NOT: f64x2
1362; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001363; SIMD128-NEXT: .functype compare_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001364; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1365; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001366define <2 x i1> @compare_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1367 %res = fcmp oge <2 x double> %x, %y
1368 ret <2 x i1> %res
1369}
1370
Thomas Lively0200d622019-03-19 00:55:34 +00001371; CHECK-LABEL: compare_oge_nnan_v2f64:
1372; NO-SIMD128-NOT: f64x2
1373; SIMD128-VM-NOT: f64x2
1374; SIMD128-NEXT: .functype compare_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1375; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1376; SIMD128-NEXT: return $pop[[R]]{{$}}
1377define <2 x i1> @compare_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1378 %res = fcmp nnan oge <2 x double> %x, %y
1379 ret <2 x i1> %res
1380}
1381
Thomas Lively5ea17d42018-10-20 01:35:23 +00001382; CHECK-LABEL: compare_sext_oge_v2f64:
1383; NO-SIMD128-NOT: f64x2
1384; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001385; SIMD128-NEXT: .functype compare_sext_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001386; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1387; SIMD128-NEXT: return $pop[[R]]{{$}}
1388define <2 x i64> @compare_sext_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1389 %cmp = fcmp oge <2 x double> %x, %y
1390 %res = sext <2 x i1> %cmp to <2 x i64>
1391 ret <2 x i64> %res
1392}
1393
Thomas Lively0200d622019-03-19 00:55:34 +00001394; CHECK-LABEL: compare_sext_oge_nnan_v2f64:
1395; NO-SIMD128-NOT: f64x2
1396; SIMD128-VM-NOT: f64x2
1397; SIMD128-NEXT: .functype compare_sext_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1398; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1399; SIMD128-NEXT: return $pop[[R]]{{$}}
1400define <2 x i64> @compare_sext_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1401 %cmp = fcmp nnan oge <2 x double> %x, %y
1402 %res = sext <2 x i1> %cmp to <2 x i64>
1403 ret <2 x i64> %res
1404}
1405
Thomas Livelyebd4c902018-09-12 17:56:00 +00001406; CHECK-LABEL: compare_olt_v2f64:
1407; NO-SIMD128-NOT: f64x2
1408; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001409; SIMD128-NEXT: .functype compare_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001410; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1411; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001412define <2 x i1> @compare_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1413 %res = fcmp olt <2 x double> %x, %y
1414 ret <2 x i1> %res
1415}
1416
Thomas Lively0200d622019-03-19 00:55:34 +00001417; CHECK-LABEL: compare_olt_nnan_v2f64:
1418; NO-SIMD128-NOT: f64x2
1419; SIMD128-VM-NOT: f64x2
1420; SIMD128-NEXT: .functype compare_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1421; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1422; SIMD128-NEXT: return $pop[[R]]{{$}}
1423define <2 x i1> @compare_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1424 %res = fcmp nnan olt <2 x double> %x, %y
1425 ret <2 x i1> %res
1426}
1427
Thomas Lively5ea17d42018-10-20 01:35:23 +00001428; CHECK-LABEL: compare_sext_olt_v2f64:
1429; NO-SIMD128-NOT: f64x2
1430; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001431; SIMD128-NEXT: .functype compare_sext_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001432; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1433; SIMD128-NEXT: return $pop[[R]]{{$}}
1434define <2 x i64> @compare_sext_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1435 %cmp = fcmp olt <2 x double> %x, %y
1436 %res = sext <2 x i1> %cmp to <2 x i64>
1437 ret <2 x i64> %res
1438}
1439
Thomas Lively0200d622019-03-19 00:55:34 +00001440; CHECK-LABEL: compare_sext_olt_nnan_v2f64:
1441; NO-SIMD128-NOT: f64x2
1442; SIMD128-VM-NOT: f64x2
1443; SIMD128-NEXT: .functype compare_sext_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1444; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1445; SIMD128-NEXT: return $pop[[R]]{{$}}
1446define <2 x i64> @compare_sext_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1447 %cmp = fcmp nnan olt <2 x double> %x, %y
1448 %res = sext <2 x i1> %cmp to <2 x i64>
1449 ret <2 x i64> %res
1450}
1451
Thomas Livelyebd4c902018-09-12 17:56:00 +00001452; CHECK-LABEL: compare_ole_v2f64:
1453; NO-SIMD128-NOT: f64x2
1454; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001455; SIMD128-NEXT: .functype compare_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001456; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1457; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001458define <2 x i1> @compare_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1459 %res = fcmp ole <2 x double> %x, %y
1460 ret <2 x i1> %res
1461}
1462
Thomas Lively0200d622019-03-19 00:55:34 +00001463; CHECK-LABEL: compare_ole_nnan_v2f64:
1464; NO-SIMD128-NOT: f64x2
1465; SIMD128-VM-NOT: f64x2
1466; SIMD128-NEXT: .functype compare_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1467; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1468; SIMD128-NEXT: return $pop[[R]]{{$}}
1469define <2 x i1> @compare_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1470 %res = fcmp nnan ole <2 x double> %x, %y
1471 ret <2 x i1> %res
1472}
1473
Thomas Lively5ea17d42018-10-20 01:35:23 +00001474; CHECK-LABEL: compare_sext_ole_v2f64:
1475; NO-SIMD128-NOT: f64x2
1476; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001477; SIMD128-NEXT: .functype compare_sext_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001478; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1479; SIMD128-NEXT: return $pop[[R]]{{$}}
1480define <2 x i64> @compare_sext_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1481 %cmp = fcmp ole <2 x double> %x, %y
1482 %res = sext <2 x i1> %cmp to <2 x i64>
1483 ret <2 x i64> %res
1484}
1485
Thomas Lively0200d622019-03-19 00:55:34 +00001486; CHECK-LABEL: compare_sext_ole_nnan_v2f64:
1487; NO-SIMD128-NOT: f64x2
1488; SIMD128-VM-NOT: f64x2
1489; SIMD128-NEXT: .functype compare_sext_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1490; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1491; SIMD128-NEXT: return $pop[[R]]{{$}}
1492define <2 x i64> @compare_sext_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1493 %cmp = fcmp nnan ole <2 x double> %x, %y
1494 %res = sext <2 x i1> %cmp to <2 x i64>
1495 ret <2 x i64> %res
1496}
1497
Thomas Livelyebd4c902018-09-12 17:56:00 +00001498; CHECK-LABEL: compare_one_v2f64:
1499; NO-SIMD128-NOT: f64x2
1500; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001501; SIMD128-NEXT: .functype compare_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001502; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1503; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1504; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1505; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1506; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1507; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001508define <2 x i1> @compare_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1509 %res = fcmp one <2 x double> %x, %y
1510 ret <2 x i1> %res
1511}
1512
Thomas Lively0200d622019-03-19 00:55:34 +00001513; CHECK-LABEL: compare_one_nnan_v2f64:
1514; NO-SIMD128-NOT: f64x2
1515; SIMD128-VM-NOT: f64x2
1516; SIMD128-NEXT: .functype compare_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1517; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1518; SIMD128-NEXT: return $pop[[R]]{{$}}
1519define <2 x i1> @compare_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1520 %res = fcmp nnan one <2 x double> %x, %y
1521 ret <2 x i1> %res
1522}
1523
Thomas Lively5ea17d42018-10-20 01:35:23 +00001524; CHECK-LABEL: compare_sext_one_v2f64:
1525; NO-SIMD128-NOT: f64x2
1526; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001527; SIMD128-NEXT: .functype compare_sext_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001528; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1529; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1530; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1531; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1532; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1533; SIMD128-NEXT: return $pop[[R]]{{$}}
1534define <2 x i64> @compare_sext_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1535 %cmp = fcmp one <2 x double> %x, %y
1536 %res = sext <2 x i1> %cmp to <2 x i64>
1537 ret <2 x i64> %res
1538}
1539
Thomas Lively0200d622019-03-19 00:55:34 +00001540; CHECK-LABEL: compare_sext_one_nnan_v2f64:
1541; NO-SIMD128-NOT: f64x2
1542; SIMD128-VM-NOT: f64x2
1543; SIMD128-NEXT: .functype compare_sext_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1544; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1545; SIMD128-NEXT: return $pop[[R]]{{$}}
1546define <2 x i64> @compare_sext_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1547 %cmp = fcmp nnan one <2 x double> %x, %y
1548 %res = sext <2 x i1> %cmp to <2 x i64>
1549 ret <2 x i64> %res
1550}
1551
Thomas Livelyebd4c902018-09-12 17:56:00 +00001552; CHECK-LABEL: compare_ord_v2f64:
1553; NO-SIMD128-NOT: f64x2
1554; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001555; SIMD128-NEXT: .functype compare_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001556; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1557; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1558; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1559; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001560define <2 x i1> @compare_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1561 %res = fcmp ord <2 x double> %x, %y
1562 ret <2 x i1> %res
1563}
1564
Thomas Lively0200d622019-03-19 00:55:34 +00001565; CHECK-LABEL: compare_ord_nnan_v2f64:
1566; NO-SIMD128-NOT: f64x2
1567; SIMD128-VM-NOT: f64x2
1568; SIMD128-NEXT: .functype compare_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1569; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1570; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1571; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1572; SIMD128-NEXT: return $pop[[R]]{{$}}
1573define <2 x i1> @compare_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1574 %res = fcmp nnan ord <2 x double> %x, %y
1575 ret <2 x i1> %res
1576}
1577
Thomas Lively5ea17d42018-10-20 01:35:23 +00001578; CHECK-LABEL: compare_sext_ord_v2f64:
1579; NO-SIMD128-NOT: f64x2
1580; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001581; SIMD128-NEXT: .functype compare_sext_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001582; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1583; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1584; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1585; SIMD128-NEXT: return $pop[[R]]{{$}}
1586define <2 x i64> @compare_sext_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1587 %cmp = fcmp ord <2 x double> %x, %y
1588 %res = sext <2 x i1> %cmp to <2 x i64>
1589 ret <2 x i64> %res
1590}
1591
Thomas Lively0200d622019-03-19 00:55:34 +00001592; CHECK-LABEL: compare_sext_ord_nnan_v2f64:
1593; NO-SIMD128-NOT: f64x2
1594; SIMD128-VM-NOT: f64x2
1595; SIMD128-NEXT: .functype compare_sext_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1596; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1597; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1598; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1599; SIMD128-NEXT: return $pop[[R]]{{$}}
1600define <2 x i64> @compare_sext_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1601 %cmp = fcmp nnan ord <2 x double> %x, %y
1602 %res = sext <2 x i1> %cmp to <2 x i64>
1603 ret <2 x i64> %res
1604}
1605
Thomas Livelyebd4c902018-09-12 17:56:00 +00001606; CHECK-LABEL: compare_ueq_v2f64:
1607; NO-SIMD128-NOT: f64x2
1608; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001609; SIMD128-NEXT: .functype compare_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001610; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1611; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1612; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1613; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1614; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1615; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001616define <2 x i1> @compare_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1617 %res = fcmp ueq <2 x double> %x, %y
1618 ret <2 x i1> %res
1619}
1620
Thomas Lively0200d622019-03-19 00:55:34 +00001621; CHECK-LABEL: compare_ueq_nnan_v2f64:
1622; NO-SIMD128-NOT: f64x2
1623; SIMD128-VM-NOT: f64x2
1624; SIMD128-NEXT: .functype compare_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1625; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1626; SIMD128-NEXT: return $pop[[R]]{{$}}
1627define <2 x i1> @compare_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1628 %res = fcmp nnan ueq <2 x double> %x, %y
1629 ret <2 x i1> %res
1630}
1631
Thomas Lively5ea17d42018-10-20 01:35:23 +00001632; CHECK-LABEL: compare_sext_ueq_v2f64:
1633; NO-SIMD128-NOT: f64x2
1634; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001635; SIMD128-NEXT: .functype compare_sext_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001636; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1637; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1638; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1639; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1640; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1641; SIMD128-NEXT: return $pop[[R]]{{$}}
1642define <2 x i64> @compare_sext_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1643 %cmp = fcmp ueq <2 x double> %x, %y
1644 %res = sext <2 x i1> %cmp to <2 x i64>
1645 ret <2 x i64> %res
1646}
1647
Thomas Lively0200d622019-03-19 00:55:34 +00001648; CHECK-LABEL: compare_sext_ueq_nnan_v2f64:
1649; NO-SIMD128-NOT: f64x2
1650; SIMD128-VM-NOT: f64x2
1651; SIMD128-NEXT: .functype compare_sext_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1652; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1653; SIMD128-NEXT: return $pop[[R]]{{$}}
1654define <2 x i64> @compare_sext_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1655 %cmp = fcmp nnan ueq <2 x double> %x, %y
1656 %res = sext <2 x i1> %cmp to <2 x i64>
1657 ret <2 x i64> %res
1658}
1659
Thomas Livelyebd4c902018-09-12 17:56:00 +00001660; CHECK-LABEL: compare_ugt_v2f64:
1661; NO-SIMD128-NOT: f64x2
1662; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001663; SIMD128-NEXT: .functype compare_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001664; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1665; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1666; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001667define <2 x i1> @compare_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1668 %res = fcmp ugt <2 x double> %x, %y
1669 ret <2 x i1> %res
1670}
1671
Thomas Lively0200d622019-03-19 00:55:34 +00001672; CHECK-LABEL: compare_ugt_nnan_v2f64:
1673; NO-SIMD128-NOT: f64x2
1674; SIMD128-VM-NOT: f64x2
1675; SIMD128-NEXT: .functype compare_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1676; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1677; SIMD128-NEXT: return $pop[[R]]{{$}}
1678define <2 x i1> @compare_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1679 %res = fcmp nnan ugt <2 x double> %x, %y
1680 ret <2 x i1> %res
1681}
1682
Thomas Lively5ea17d42018-10-20 01:35:23 +00001683; CHECK-LABEL: compare_sext_ugt_v2f64:
1684; NO-SIMD128-NOT: f64x2
1685; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001686; SIMD128-NEXT: .functype compare_sext_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001687; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1688; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1689; SIMD128-NEXT: return $pop[[R]]{{$}}
1690define <2 x i64> @compare_sext_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1691 %cmp = fcmp ugt <2 x double> %x, %y
1692 %res = sext <2 x i1> %cmp to <2 x i64>
1693 ret <2 x i64> %res
1694}
1695
Thomas Lively0200d622019-03-19 00:55:34 +00001696; CHECK-LABEL: compare_sext_ugt_nnan_v2f64:
1697; NO-SIMD128-NOT: f64x2
1698; SIMD128-VM-NOT: f64x2
1699; SIMD128-NEXT: .functype compare_sext_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1700; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1701; SIMD128-NEXT: return $pop[[R]]{{$}}
1702define <2 x i64> @compare_sext_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1703 %cmp = fcmp nnan ugt <2 x double> %x, %y
1704 %res = sext <2 x i1> %cmp to <2 x i64>
1705 ret <2 x i64> %res
1706}
1707
Thomas Livelyebd4c902018-09-12 17:56:00 +00001708; CHECK-LABEL: compare_uge_v2f64:
1709; NO-SIMD128-NOT: f64x2
1710; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001711; SIMD128-NEXT: .functype compare_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001712; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1713; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1714; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001715define <2 x i1> @compare_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1716 %res = fcmp uge <2 x double> %x, %y
1717 ret <2 x i1> %res
1718}
1719
Thomas Lively0200d622019-03-19 00:55:34 +00001720; CHECK-LABEL: compare_uge_nnan_v2f64:
1721; NO-SIMD128-NOT: f64x2
1722; SIMD128-VM-NOT: f64x2
1723; SIMD128-NEXT: .functype compare_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1724; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1725; SIMD128-NEXT: return $pop[[R]]{{$}}
1726define <2 x i1> @compare_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1727 %res = fcmp nnan uge <2 x double> %x, %y
1728 ret <2 x i1> %res
1729}
1730
Thomas Lively5ea17d42018-10-20 01:35:23 +00001731; CHECK-LABEL: compare_sext_uge_v2f64:
1732; NO-SIMD128-NOT: f64x2
1733; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001734; SIMD128-NEXT: .functype compare_sext_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001735; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1736; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1737; SIMD128-NEXT: return $pop[[R]]{{$}}
1738define <2 x i64> @compare_sext_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1739 %cmp = fcmp uge <2 x double> %x, %y
1740 %res = sext <2 x i1> %cmp to <2 x i64>
1741 ret <2 x i64> %res
1742}
1743
Thomas Lively0200d622019-03-19 00:55:34 +00001744; CHECK-LABEL: compare_sext_uge_nnan_v2f64:
1745; NO-SIMD128-NOT: f64x2
1746; SIMD128-VM-NOT: f64x2
1747; SIMD128-NEXT: .functype compare_sext_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1748; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1749; SIMD128-NEXT: return $pop[[R]]{{$}}
1750define <2 x i64> @compare_sext_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1751 %cmp = fcmp nnan uge <2 x double> %x, %y
1752 %res = sext <2 x i1> %cmp to <2 x i64>
1753 ret <2 x i64> %res
1754}
1755
Thomas Livelyebd4c902018-09-12 17:56:00 +00001756; CHECK-LABEL: compare_ult_v2f64:
1757; NO-SIMD128-NOT: f64x2
1758; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001759; SIMD128-NEXT: .functype compare_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001760; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1761; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1762; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001763define <2 x i1> @compare_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1764 %res = fcmp ult <2 x double> %x, %y
1765 ret <2 x i1> %res
1766}
1767
Thomas Lively0200d622019-03-19 00:55:34 +00001768; CHECK-LABEL: compare_ult_nnan_v2f64:
1769; NO-SIMD128-NOT: f64x2
1770; SIMD128-VM-NOT: f64x2
1771; SIMD128-NEXT: .functype compare_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1772; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1773; SIMD128-NEXT: return $pop[[R]]{{$}}
1774define <2 x i1> @compare_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1775 %res = fcmp nnan ult <2 x double> %x, %y
1776 ret <2 x i1> %res
1777}
1778
Thomas Lively5ea17d42018-10-20 01:35:23 +00001779; CHECK-LABEL: compare_sext_ult_v2f64:
1780; NO-SIMD128-NOT: f64x2
1781; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001782; SIMD128-NEXT: .functype compare_sext_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001783; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1784; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1785; SIMD128-NEXT: return $pop[[R]]{{$}}
1786define <2 x i64> @compare_sext_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1787 %cmp = fcmp ult <2 x double> %x, %y
1788 %res = sext <2 x i1> %cmp to <2 x i64>
1789 ret <2 x i64> %res
1790}
1791
Thomas Lively0200d622019-03-19 00:55:34 +00001792; CHECK-LABEL: compare_sext_ult_nnan_v2f64:
1793; NO-SIMD128-NOT: f64x2
1794; SIMD128-VM-NOT: f64x2
1795; SIMD128-NEXT: .functype compare_sext_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1796; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1797; SIMD128-NEXT: return $pop[[R]]{{$}}
1798define <2 x i64> @compare_sext_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1799 %cmp = fcmp nnan ult <2 x double> %x, %y
1800 %res = sext <2 x i1> %cmp to <2 x i64>
1801 ret <2 x i64> %res
1802}
1803
Thomas Livelyebd4c902018-09-12 17:56:00 +00001804; CHECK-LABEL: compare_ule_v2f64:
1805; NO-SIMD128-NOT: f64x2
1806; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001807; SIMD128-NEXT: .functype compare_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001808; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1809; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1810; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001811define <2 x i1> @compare_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1812 %res = fcmp ule <2 x double> %x, %y
1813 ret <2 x i1> %res
1814}
1815
Thomas Lively0200d622019-03-19 00:55:34 +00001816; CHECK-LABEL: compare_ule_nnan_v2f64:
1817; NO-SIMD128-NOT: f64x2
1818; SIMD128-VM-NOT: f64x2
1819; SIMD128-NEXT: .functype compare_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1820; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1821; SIMD128-NEXT: return $pop[[R]]{{$}}
1822define <2 x i1> @compare_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1823 %res = fcmp nnan ule <2 x double> %x, %y
1824 ret <2 x i1> %res
1825}
1826
Thomas Lively5ea17d42018-10-20 01:35:23 +00001827; CHECK-LABEL: compare_sext_ule_v2f64:
1828; NO-SIMD128-NOT: f64x2
1829; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001830; SIMD128-NEXT: .functype compare_sext_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001831; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1832; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1833; SIMD128-NEXT: return $pop[[R]]{{$}}
1834define <2 x i64> @compare_sext_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1835 %cmp = fcmp ule <2 x double> %x, %y
1836 %res = sext <2 x i1> %cmp to <2 x i64>
1837 ret <2 x i64> %res
1838}
1839
Thomas Lively0200d622019-03-19 00:55:34 +00001840; CHECK-LABEL: compare_sext_ule_nnan_v2f64:
1841; NO-SIMD128-NOT: f64x2
1842; SIMD128-VM-NOT: f64x2
1843; SIMD128-NEXT: .functype compare_sext_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1844; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1845; SIMD128-NEXT: return $pop[[R]]{{$}}
1846define <2 x i64> @compare_sext_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1847 %cmp = fcmp nnan ule <2 x double> %x, %y
1848 %res = sext <2 x i1> %cmp to <2 x i64>
1849 ret <2 x i64> %res
1850}
1851
Thomas Livelyebd4c902018-09-12 17:56:00 +00001852; CHECK-LABEL: compare_une_v2f64:
1853; NO-SIMD128-NOT: f64x2
1854; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001855; SIMD128-NEXT: .functype compare_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001856; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1857; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001858define <2 x i1> @compare_une_v2f64 (<2 x double> %x, <2 x double> %y) {
1859 %res = fcmp une <2 x double> %x, %y
1860 ret <2 x i1> %res
1861}
1862
Thomas Lively0200d622019-03-19 00:55:34 +00001863; CHECK-LABEL: compare_une_nnan_v2f64:
1864; NO-SIMD128-NOT: f64x2
1865; SIMD128-VM-NOT: f64x2
1866; SIMD128-NEXT: .functype compare_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
1867; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1868; SIMD128-NEXT: return $pop[[R]]{{$}}
1869define <2 x i1> @compare_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1870 %res = fcmp nnan une <2 x double> %x, %y
1871 ret <2 x i1> %res
1872}
1873
Thomas Lively5ea17d42018-10-20 01:35:23 +00001874; CHECK-LABEL: compare_sext_une_v2f64:
1875; NO-SIMD128-NOT: f64x2
1876; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001877; SIMD128-NEXT: .functype compare_sext_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001878; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1879; SIMD128-NEXT: return $pop[[R]]{{$}}
1880define <2 x i64> @compare_sext_une_v2f64 (<2 x double> %x, <2 x double> %y) {
1881 %cmp = fcmp une <2 x double> %x, %y
1882 %res = sext <2 x i1> %cmp to <2 x i64>
1883 ret <2 x i64> %res
1884}
1885
Thomas Lively0200d622019-03-19 00:55:34 +00001886; CHECK-LABEL: compare_sext_une_nnan_v2f64:
1887; NO-SIMD128-NOT: f64x2
1888; SIMD128-VM-NOT: f64x2
1889; SIMD128-NEXT: .functype compare_sext_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
1890; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1891; SIMD128-NEXT: return $pop[[R]]{{$}}
1892define <2 x i64> @compare_sext_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1893 %cmp = fcmp nnan une <2 x double> %x, %y
1894 %res = sext <2 x i1> %cmp to <2 x i64>
1895 ret <2 x i64> %res
1896}
1897
Thomas Livelyebd4c902018-09-12 17:56:00 +00001898; CHECK-LABEL: compare_uno_v2f64:
1899; NO-SIMD128-NOT: f64x2
1900; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001901; SIMD128-NEXT: .functype compare_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001902; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1903; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1904; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1905; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001906define <2 x i1> @compare_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
1907 %res = fcmp uno <2 x double> %x, %y
1908 ret <2 x i1> %res
1909}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001910
Thomas Lively0200d622019-03-19 00:55:34 +00001911; CHECK-LABEL: compare_uno_nnan_v2f64:
1912; NO-SIMD128-NOT: f64x2
1913; SIMD128-VM-NOT: f64x2
1914; SIMD128-NEXT: .functype compare_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
1915; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1916; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1917; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1918; SIMD128-NEXT: return $pop[[R]]{{$}}
1919define <2 x i1> @compare_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1920 %res = fcmp nnan uno <2 x double> %x, %y
1921 ret <2 x i1> %res
1922}
1923
Thomas Lively5ea17d42018-10-20 01:35:23 +00001924; CHECK-LABEL: compare_sext_uno_v2f64:
1925; NO-SIMD128-NOT: f64x2
1926; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001927; SIMD128-NEXT: .functype compare_sext_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001928; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1929; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1930; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1931; SIMD128-NEXT: return $pop[[R]]{{$}}
1932define <2 x i64> @compare_sext_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
1933 %cmp = fcmp uno <2 x double> %x, %y
1934 %res = sext <2 x i1> %cmp to <2 x i64>
1935 ret <2 x i64> %res
1936}
Thomas Lively0200d622019-03-19 00:55:34 +00001937
1938; CHECK-LABEL: compare_sext_uno_nnan_v2f64:
1939; NO-SIMD128-NOT: f64x2
1940; SIMD128-VM-NOT: f64x2
1941; SIMD128-NEXT: .functype compare_sext_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
1942; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1943; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1944; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1945; SIMD128-NEXT: return $pop[[R]]{{$}}
1946define <2 x i64> @compare_sext_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1947 %cmp = fcmp nnan uno <2 x double> %x, %y
1948 %res = sext <2 x i1> %cmp to <2 x i64>
1949 ret <2 x i64> %res
1950}