blob: 3b6af73eb15f83c60a1d0575e2f5ca8f7b76dacd [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 Livelyecb7daf2019-11-01 10:21:00 -0700640; CHECK-LABEL: compare_eq_v2i64:
641; SIMD128-NEXT: .functype compare_eq_v2i64 (v128, v128) -> (v128){{$}}
642define <2 x i1> @compare_eq_v2i64 (<2 x i64> %x, <2 x i64> %y) {
643 %res = icmp eq <2 x i64> %x, %y
644 ret <2 x i1> %res
645}
646
647; CHECK-LABEL: compare_sext_eq_v2i64:
648; SIMD128-NEXT: .functype compare_sext_eq_v2i64 (v128, v128) -> (v128){{$}}
649define <2 x i64> @compare_sext_eq_v2i64 (<2 x i64> %x, <2 x i64> %y) {
650 %cmp = icmp eq <2 x i64> %x, %y
651 %res = sext <2 x i1> %cmp to <2 x i64>
652 ret <2 x i64> %res
653}
654
655; CHECK-LABEL: compare_ne_v2i64:
656; SIMD128-NEXT: .functype compare_ne_v2i64 (v128, v128) -> (v128){{$}}
657define <2 x i1> @compare_ne_v2i64 (<2 x i64> %x, <2 x i64> %y) {
658 %res = icmp ne <2 x i64> %x, %y
659 ret <2 x i1> %res
660}
661
662; CHECK-LABEL: compare_sext_ne_v2i64:
663; SIMD128-NEXT: .functype compare_sext_ne_v2i64 (v128, v128) -> (v128){{$}}
664define <2 x i64> @compare_sext_ne_v2i64 (<2 x i64> %x, <2 x i64> %y) {
665 %cmp = icmp ne <2 x i64> %x, %y
666 %res = sext <2 x i1> %cmp to <2 x i64>
667 ret <2 x i64> %res
668}
669
670; CHECK-LABEL: compare_slt_v2i64:
671; SIMD128-NEXT: .functype compare_slt_v2i64 (v128, v128) -> (v128){{$}}
672define <2 x i1> @compare_slt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
673 %res = icmp slt <2 x i64> %x, %y
674 ret <2 x i1> %res
675}
676
677; CHECK-LABEL: compare_sext_slt_v2i64:
678; SIMD128-NEXT: .functype compare_sext_slt_v2i64 (v128, v128) -> (v128){{$}}
679define <2 x i64> @compare_sext_slt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
680 %cmp = icmp slt <2 x i64> %x, %y
681 %res = sext <2 x i1> %cmp to <2 x i64>
682 ret <2 x i64> %res
683}
684
685; CHECK-LABEL: compare_ult_v2i64:
686; SIMD128-NEXT: .functype compare_ult_v2i64 (v128, v128) -> (v128){{$}}
687define <2 x i1> @compare_ult_v2i64 (<2 x i64> %x, <2 x i64> %y) {
688 %res = icmp ult <2 x i64> %x, %y
689 ret <2 x i1> %res
690}
691
692; CHECK-LABEL: compare_sext_ult_v2i64:
693; SIMD128-NEXT: .functype compare_sext_ult_v2i64 (v128, v128) -> (v128){{$}}
694define <2 x i64> @compare_sext_ult_v2i64 (<2 x i64> %x, <2 x i64> %y) {
695 %cmp = icmp ult <2 x i64> %x, %y
696 %res = sext <2 x i1> %cmp to <2 x i64>
697 ret <2 x i64> %res
698}
699
700; CHECK-LABEL: compare_sle_v2i64:
701; SIMD128-NEXT: .functype compare_sle_v2i64 (v128, v128) -> (v128){{$}}
702define <2 x i1> @compare_sle_v2i64 (<2 x i64> %x, <2 x i64> %y) {
703 %res = icmp sle <2 x i64> %x, %y
704 ret <2 x i1> %res
705}
706
707; CHECK-LABEL: compare_sext_sle_v2i64:
708; SIMD128-NEXT: .functype compare_sext_sle_v2i64 (v128, v128) -> (v128){{$}}
709define <2 x i64> @compare_sext_sle_v2i64 (<2 x i64> %x, <2 x i64> %y) {
710 %cmp = icmp sle <2 x i64> %x, %y
711 %res = sext <2 x i1> %cmp to <2 x i64>
712 ret <2 x i64> %res
713}
714
715; CHECK-LABEL: compare_ule_v2i64:
716; SIMD128-NEXT: .functype compare_ule_v2i64 (v128, v128) -> (v128){{$}}
717define <2 x i1> @compare_ule_v2i64 (<2 x i64> %x, <2 x i64> %y) {
718 %res = icmp ule <2 x i64> %x, %y
719 ret <2 x i1> %res
720}
721
722; CHECK-LABEL: compare_sext_ule_v2i64:
723; SIMD128-NEXT: .functype compare_sext_ule_v2i64 (v128, v128) -> (v128){{$}}
724define <2 x i64> @compare_sext_ule_v2i64 (<2 x i64> %x, <2 x i64> %y) {
725 %cmp = icmp ule <2 x i64> %x, %y
726 %res = sext <2 x i1> %cmp to <2 x i64>
727 ret <2 x i64> %res
728}
729
730; CHECK-LABEL: compare_sgt_v2i64:
731; SIMD128-NEXT: .functype compare_sgt_v2i64 (v128, v128) -> (v128){{$}}
732define <2 x i1> @compare_sgt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
733 %res = icmp sgt <2 x i64> %x, %y
734 ret <2 x i1> %res
735}
736
737; CHECK-LABEL: compare_sext_sgt_v2i64:
738; SIMD128-NEXT: .functype compare_sext_sgt_v2i64 (v128, v128) -> (v128){{$}}
739define <2 x i64> @compare_sext_sgt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
740 %cmp = icmp sgt <2 x i64> %x, %y
741 %res = sext <2 x i1> %cmp to <2 x i64>
742 ret <2 x i64> %res
743}
744
745; CHECK-LABEL: compare_ugt_v2i64:
746; SIMD128-NEXT: .functype compare_ugt_v2i64 (v128, v128) -> (v128){{$}}
747define <2 x i1> @compare_ugt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
748 %res = icmp ugt <2 x i64> %x, %y
749 ret <2 x i1> %res
750}
751
752; CHECK-LABEL: compare_sext_ugt_v2i64:
753; SIMD128-NEXT: .functype compare_sext_ugt_v2i64 (v128, v128) -> (v128){{$}}
754define <2 x i64> @compare_sext_ugt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
755 %cmp = icmp ugt <2 x i64> %x, %y
756 %res = sext <2 x i1> %cmp to <2 x i64>
757 ret <2 x i64> %res
758}
759
760; CHECK-LABEL: compare_sge_v2i64:
761; SIMD128-NEXT: .functype compare_sge_v2i64 (v128, v128) -> (v128){{$}}
762define <2 x i1> @compare_sge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
763 %res = icmp sge <2 x i64> %x, %y
764 ret <2 x i1> %res
765}
766
767; CHECK-LABEL: compare_sext_sge_v2i64:
768; SIMD128-NEXT: .functype compare_sext_sge_v2i64 (v128, v128) -> (v128){{$}}
769define <2 x i64> @compare_sext_sge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
770 %cmp = icmp sge <2 x i64> %x, %y
771 %res = sext <2 x i1> %cmp to <2 x i64>
772 ret <2 x i64> %res
773}
774
775; CHECK-LABEL: compare_uge_v2i64:
776; SIMD128-NEXT: .functype compare_uge_v2i64 (v128, v128) -> (v128){{$}}
777define <2 x i1> @compare_uge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
778 %res = icmp uge <2 x i64> %x, %y
779 ret <2 x i1> %res
780}
781
782; CHECK-LABEL: compare_sext_uge_v2i64:
783; SIMD128-NEXT: .functype compare_sext_uge_v2i64 (v128, v128) -> (v128){{$}}
784define <2 x i64> @compare_sext_uge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
785 %cmp = icmp uge <2 x i64> %x, %y
786 %res = sext <2 x i1> %cmp to <2 x i64>
787 ret <2 x i64> %res
788}
789
Thomas Livelyebd4c902018-09-12 17:56:00 +0000790; CHECK-LABEL: compare_oeq_v4f32:
791; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000792; SIMD128-NEXT: .functype compare_oeq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000793; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
794; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000795define <4 x i1> @compare_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
796 %res = fcmp oeq <4 x float> %x, %y
797 ret <4 x i1> %res
798}
799
Thomas Lively0200d622019-03-19 00:55:34 +0000800; CHECK-LABEL: compare_oeq_nnan_v4f32:
801; NO-SIMD128-NOT: f32x4
802; SIMD128-NEXT: .functype compare_oeq_nnan_v4f32 (v128, v128) -> (v128){{$}}
803; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
804; SIMD128-NEXT: return $pop[[R]]{{$}}
805define <4 x i1> @compare_oeq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
806 %res = fcmp nnan oeq <4 x float> %x, %y
807 ret <4 x i1> %res
808}
809
Thomas Lively5ea17d42018-10-20 01:35:23 +0000810; CHECK-LABEL: compare_sext_oeq_v4f32:
811; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000812; SIMD128-NEXT: .functype compare_sext_oeq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000813; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
814; SIMD128-NEXT: return $pop[[R]]{{$}}
815define <4 x i32> @compare_sext_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
816 %cmp = fcmp oeq <4 x float> %x, %y
817 %res = sext <4 x i1> %cmp to <4 x i32>
818 ret <4 x i32> %res
819}
820
Thomas Lively0200d622019-03-19 00:55:34 +0000821; CHECK-LABEL: compare_sext_oeq_nnan_v4f32:
822; NO-SIMD128-NOT: f32x4
823; SIMD128-NEXT: .functype compare_sext_oeq_nnan_v4f32 (v128, v128) -> (v128){{$}}
824; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
825; SIMD128-NEXT: return $pop[[R]]{{$}}
826define <4 x i32> @compare_sext_oeq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
827 %cmp = fcmp nnan oeq <4 x float> %x, %y
828 %res = sext <4 x i1> %cmp to <4 x i32>
829 ret <4 x i32> %res
830}
831
Thomas Livelyebd4c902018-09-12 17:56:00 +0000832; CHECK-LABEL: compare_ogt_v4f32:
833; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000834; SIMD128-NEXT: .functype compare_ogt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000835; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
836; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000837define <4 x i1> @compare_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
838 %res = fcmp ogt <4 x float> %x, %y
839 ret <4 x i1> %res
840}
841
Thomas Lively0200d622019-03-19 00:55:34 +0000842; CHECK-LABEL: compare_ogt_nnan_v4f32:
843; NO-SIMD128-NOT: f32x4
844; SIMD128-NEXT: .functype compare_ogt_nnan_v4f32 (v128, v128) -> (v128){{$}}
845; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
846; SIMD128-NEXT: return $pop[[R]]{{$}}
847define <4 x i1> @compare_ogt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
848 %res = fcmp nnan ogt <4 x float> %x, %y
849 ret <4 x i1> %res
850}
851
Thomas Lively5ea17d42018-10-20 01:35:23 +0000852; CHECK-LABEL: compare_sext_ogt_v4f32:
853; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000854; SIMD128-NEXT: .functype compare_sext_ogt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000855; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
856; SIMD128-NEXT: return $pop[[R]]{{$}}
857define <4 x i32> @compare_sext_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
858 %cmp = fcmp ogt <4 x float> %x, %y
859 %res = sext <4 x i1> %cmp to <4 x i32>
860 ret <4 x i32> %res
861}
862
Thomas Lively0200d622019-03-19 00:55:34 +0000863; CHECK-LABEL: compare_sext_ogt_nnan_v4f32:
864; NO-SIMD128-NOT: f32x4
865; SIMD128-NEXT: .functype compare_sext_ogt_nnan_v4f32 (v128, v128) -> (v128){{$}}
866; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
867; SIMD128-NEXT: return $pop[[R]]{{$}}
868define <4 x i32> @compare_sext_ogt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
869 %cmp = fcmp nnan ogt <4 x float> %x, %y
870 %res = sext <4 x i1> %cmp to <4 x i32>
871 ret <4 x i32> %res
872}
873
Thomas Livelyebd4c902018-09-12 17:56:00 +0000874; CHECK-LABEL: compare_oge_v4f32:
875; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000876; SIMD128-NEXT: .functype compare_oge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000877; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
878; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000879define <4 x i1> @compare_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
880 %res = fcmp oge <4 x float> %x, %y
881 ret <4 x i1> %res
882}
883
Thomas Lively0200d622019-03-19 00:55:34 +0000884; CHECK-LABEL: compare_oge_nnan_v4f32:
885; NO-SIMD128-NOT: f32x4
886; SIMD128-NEXT: .functype compare_oge_nnan_v4f32 (v128, v128) -> (v128){{$}}
887; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
888; SIMD128-NEXT: return $pop[[R]]{{$}}
889define <4 x i1> @compare_oge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
890 %res = fcmp nnan oge <4 x float> %x, %y
891 ret <4 x i1> %res
892}
893
Thomas Lively5ea17d42018-10-20 01:35:23 +0000894; CHECK-LABEL: compare_sext_oge_v4f32:
895; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000896; SIMD128-NEXT: .functype compare_sext_oge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000897; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
898; SIMD128-NEXT: return $pop[[R]]{{$}}
899define <4 x i32> @compare_sext_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
900 %cmp = fcmp oge <4 x float> %x, %y
901 %res = sext <4 x i1> %cmp to <4 x i32>
902 ret <4 x i32> %res
903}
904
Thomas Lively0200d622019-03-19 00:55:34 +0000905; CHECK-LABEL: compare_sext_oge_nnan_v4f32:
906; NO-SIMD128-NOT: f32x4
907; SIMD128-NEXT: .functype compare_sext_oge_nnan_v4f32 (v128, v128) -> (v128){{$}}
908; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
909; SIMD128-NEXT: return $pop[[R]]{{$}}
910define <4 x i32> @compare_sext_oge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
911 %cmp = fcmp nnan oge <4 x float> %x, %y
912 %res = sext <4 x i1> %cmp to <4 x i32>
913 ret <4 x i32> %res
914}
915
Thomas Livelyebd4c902018-09-12 17:56:00 +0000916; CHECK-LABEL: compare_olt_v4f32:
917; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000918; SIMD128-NEXT: .functype compare_olt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000919; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
920; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000921define <4 x i1> @compare_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
922 %res = fcmp olt <4 x float> %x, %y
923 ret <4 x i1> %res
924}
925
Thomas Lively0200d622019-03-19 00:55:34 +0000926; CHECK-LABEL: compare_olt_nnan_v4f32:
927; NO-SIMD128-NOT: f32x4
928; SIMD128-NEXT: .functype compare_olt_nnan_v4f32 (v128, v128) -> (v128){{$}}
929; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
930; SIMD128-NEXT: return $pop[[R]]{{$}}
931define <4 x i1> @compare_olt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
932 %res = fcmp nnan olt <4 x float> %x, %y
933 ret <4 x i1> %res
934}
935
Thomas Lively5ea17d42018-10-20 01:35:23 +0000936; CHECK-LABEL: compare_sext_olt_v4f32:
937; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000938; SIMD128-NEXT: .functype compare_sext_olt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000939; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
940; SIMD128-NEXT: return $pop[[R]]{{$}}
941define <4 x i32> @compare_sext_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
942 %cmp = fcmp olt <4 x float> %x, %y
943 %res = sext <4 x i1> %cmp to <4 x i32>
944 ret <4 x i32> %res
945}
946
Thomas Lively0200d622019-03-19 00:55:34 +0000947; CHECK-LABEL: compare_sext_olt_nnan_v4f32:
948; NO-SIMD128-NOT: f32x4
949; SIMD128-NEXT: .functype compare_sext_olt_nnan_v4f32 (v128, v128) -> (v128){{$}}
950; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
951; SIMD128-NEXT: return $pop[[R]]{{$}}
952define <4 x i32> @compare_sext_olt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
953 %cmp = fcmp nnan olt <4 x float> %x, %y
954 %res = sext <4 x i1> %cmp to <4 x i32>
955 ret <4 x i32> %res
956}
957
Thomas Livelyebd4c902018-09-12 17:56:00 +0000958; CHECK-LABEL: compare_ole_v4f32:
959; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000960; SIMD128-NEXT: .functype compare_ole_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +0000961; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
962; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +0000963define <4 x i1> @compare_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
964 %res = fcmp ole <4 x float> %x, %y
965 ret <4 x i1> %res
966}
967
Thomas Lively0200d622019-03-19 00:55:34 +0000968; CHECK-LABEL: compare_ole_nnan_v4f32:
969; NO-SIMD128-NOT: f32x4
970; SIMD128-NEXT: .functype compare_ole_nnan_v4f32 (v128, v128) -> (v128){{$}}
971; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
972; SIMD128-NEXT: return $pop[[R]]{{$}}
973define <4 x i1> @compare_ole_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
974 %res = fcmp nnan ole <4 x float> %x, %y
975 ret <4 x i1> %res
976}
977
Thomas Lively5ea17d42018-10-20 01:35:23 +0000978; CHECK-LABEL: compare_sext_ole_v4f32:
979; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +0000980; SIMD128-NEXT: .functype compare_sext_ole_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +0000981; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
982; SIMD128-NEXT: return $pop[[R]]{{$}}
983define <4 x i32> @compare_sext_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
984 %cmp = fcmp ole <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_ole_nnan_v4f32:
990; NO-SIMD128-NOT: f32x4
991; SIMD128-NEXT: .functype compare_sext_ole_nnan_v4f32 (v128, v128) -> (v128){{$}}
992; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
993; SIMD128-NEXT: return $pop[[R]]{{$}}
994define <4 x i32> @compare_sext_ole_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
995 %cmp = fcmp nnan ole <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_one_v4f32:
1001; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001002; SIMD128-NEXT: .functype compare_one_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001003; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1004; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1005; SIMD128-NEXT: f32x4.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1006; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1007; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1008; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001009define <4 x i1> @compare_one_v4f32 (<4 x float> %x, <4 x float> %y) {
1010 %res = fcmp one <4 x float> %x, %y
1011 ret <4 x i1> %res
1012}
1013
Thomas Lively0200d622019-03-19 00:55:34 +00001014; CHECK-LABEL: compare_one_nnan_v4f32:
1015; NO-SIMD128-NOT: f32x4
1016; SIMD128-NEXT: .functype compare_one_nnan_v4f32 (v128, v128) -> (v128){{$}}
1017; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1018; SIMD128-NEXT: return $pop[[R]]{{$}}
1019define <4 x i1> @compare_one_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1020 %res = fcmp nnan one <4 x float> %x, %y
1021 ret <4 x i1> %res
1022}
1023
Thomas Lively5ea17d42018-10-20 01:35:23 +00001024; CHECK-LABEL: compare_sext_one_v4f32:
1025; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001026; SIMD128-NEXT: .functype compare_sext_one_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001027; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1028; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1029; SIMD128-NEXT: f32x4.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1030; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1031; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1032; SIMD128-NEXT: return $pop[[R]]{{$}}
1033define <4 x i32> @compare_sext_one_v4f32 (<4 x float> %x, <4 x float> %y) {
1034 %cmp = fcmp one <4 x float> %x, %y
1035 %res = sext <4 x i1> %cmp to <4 x i32>
1036 ret <4 x i32> %res
1037}
1038
Thomas Lively0200d622019-03-19 00:55:34 +00001039; CHECK-LABEL: compare_sext_one_nnan_v4f32:
1040; NO-SIMD128-NOT: f32x4
1041; SIMD128-NEXT: .functype compare_sext_one_nnan_v4f32 (v128, v128) -> (v128){{$}}
1042; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1043; SIMD128-NEXT: return $pop[[R]]{{$}}
1044define <4 x i32> @compare_sext_one_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1045 %cmp = fcmp nnan one <4 x float> %x, %y
1046 %res = sext <4 x i1> %cmp to <4 x i32>
1047 ret <4 x i32> %res
1048}
1049
Thomas Livelyebd4c902018-09-12 17:56:00 +00001050; CHECK-LABEL: compare_ord_v4f32:
1051; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001052; SIMD128-NEXT: .functype compare_ord_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001053; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1054; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1055; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1056; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001057define <4 x i1> @compare_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
1058 %res = fcmp ord <4 x float> %x, %y
1059 ret <4 x i1> %res
1060}
1061
Thomas Lively0200d622019-03-19 00:55:34 +00001062; CHECK-LABEL: compare_ord_nnan_v4f32:
1063; NO-SIMD128-NOT: f32x4
1064; SIMD128-NEXT: .functype compare_ord_nnan_v4f32 (v128, v128) -> (v128){{$}}
1065; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1066; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1067; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1068; SIMD128-NEXT: return $pop[[R]]{{$}}
1069define <4 x i1> @compare_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1070 %res = fcmp nnan ord <4 x float> %x, %y
1071 ret <4 x i1> %res
1072}
1073
Thomas Lively5ea17d42018-10-20 01:35:23 +00001074; CHECK-LABEL: compare_sext_ord_v4f32:
1075; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001076; SIMD128-NEXT: .functype compare_sext_ord_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001077; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1078; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1079; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1080; SIMD128-NEXT: return $pop[[R]]{{$}}
1081define <4 x i32> @compare_sext_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
1082 %cmp = fcmp ord <4 x float> %x, %y
1083 %res = sext <4 x i1> %cmp to <4 x i32>
1084 ret <4 x i32> %res
1085}
1086
Thomas Lively0200d622019-03-19 00:55:34 +00001087; CHECK-LABEL: compare_sext_ord_nnan_v4f32:
1088; NO-SIMD128-NOT: f32x4
1089; SIMD128-NEXT: .functype compare_sext_ord_nnan_v4f32 (v128, v128) -> (v128){{$}}
1090; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1091; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1092; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1093; SIMD128-NEXT: return $pop[[R]]{{$}}
1094define <4 x i32> @compare_sext_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1095 %cmp = fcmp nnan ord <4 x float> %x, %y
1096 %res = sext <4 x i1> %cmp to <4 x i32>
1097 ret <4 x i32> %res
1098}
1099
Thomas Livelyebd4c902018-09-12 17:56:00 +00001100; CHECK-LABEL: compare_ueq_v4f32:
1101; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001102; SIMD128-NEXT: .functype compare_ueq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001103; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1104; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1105; SIMD128-NEXT: f32x4.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1106; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1107; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1108; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001109define <4 x i1> @compare_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
1110 %res = fcmp ueq <4 x float> %x, %y
1111 ret <4 x i1> %res
1112}
1113
Thomas Lively0200d622019-03-19 00:55:34 +00001114; CHECK-LABEL: compare_ueq_nnan_v4f32:
1115; NO-SIMD128-NOT: f32x4
1116; SIMD128-NEXT: .functype compare_ueq_nnan_v4f32 (v128, v128) -> (v128){{$}}
1117; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1118; SIMD128-NEXT: return $pop[[R]]{{$}}
1119define <4 x i1> @compare_ueq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1120 %res = fcmp nnan ueq <4 x float> %x, %y
1121 ret <4 x i1> %res
1122}
1123
Thomas Lively5ea17d42018-10-20 01:35:23 +00001124; CHECK-LABEL: compare_sext_ueq_v4f32:
1125; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001126; SIMD128-NEXT: .functype compare_sext_ueq_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001127; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1128; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1129; SIMD128-NEXT: f32x4.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1130; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1131; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1132; SIMD128-NEXT: return $pop[[R]]
1133define <4 x i32> @compare_sext_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
1134 %cmp = fcmp ueq <4 x float> %x, %y
1135 %res = sext <4 x i1> %cmp to <4 x i32>
1136 ret <4 x i32> %res
1137}
1138
Thomas Lively0200d622019-03-19 00:55:34 +00001139; CHECK-LABEL: compare_sext_ueq_nnan_v4f32:
1140; NO-SIMD128-NOT: f32x4
1141; SIMD128-NEXT: .functype compare_sext_ueq_nnan_v4f32 (v128, v128) -> (v128){{$}}
1142; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1143; SIMD128-NEXT: return $pop[[R]]
1144define <4 x i32> @compare_sext_ueq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1145 %cmp = fcmp nnan ueq <4 x float> %x, %y
1146 %res = sext <4 x i1> %cmp to <4 x i32>
1147 ret <4 x i32> %res
1148}
1149
Thomas Livelyebd4c902018-09-12 17:56:00 +00001150; CHECK-LABEL: compare_ugt_v4f32:
1151; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001152; SIMD128-NEXT: .functype compare_ugt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001153; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1154; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1155; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001156define <4 x i1> @compare_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
1157 %res = fcmp ugt <4 x float> %x, %y
1158 ret <4 x i1> %res
1159}
1160
Thomas Lively0200d622019-03-19 00:55:34 +00001161; CHECK-LABEL: compare_ugt_nnan_v4f32:
1162; NO-SIMD128-NOT: f32x4
1163; SIMD128-NEXT: .functype compare_ugt_nnan_v4f32 (v128, v128) -> (v128){{$}}
1164; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1165; SIMD128-NEXT: return $pop[[R]]{{$}}
1166define <4 x i1> @compare_ugt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1167 %res = fcmp nnan ugt <4 x float> %x, %y
1168 ret <4 x i1> %res
1169}
1170
Thomas Lively5ea17d42018-10-20 01:35:23 +00001171; CHECK-LABEL: compare_sext_ugt_v4f32:
1172; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001173; SIMD128-NEXT: .functype compare_sext_ugt_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001174; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1175; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1176; SIMD128-NEXT: return $pop[[R]]{{$}}
1177define <4 x i32> @compare_sext_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
1178 %cmp = fcmp ugt <4 x float> %x, %y
1179 %res = sext <4 x i1> %cmp to <4 x i32>
1180 ret <4 x i32> %res
1181}
1182
Thomas Lively0200d622019-03-19 00:55:34 +00001183; CHECK-LABEL: compare_sext_ugt_nnan_v4f32:
1184; NO-SIMD128-NOT: f32x4
1185; SIMD128-NEXT: .functype compare_sext_ugt_nnan_v4f32 (v128, v128) -> (v128){{$}}
1186; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1187; SIMD128-NEXT: return $pop[[R]]{{$}}
1188define <4 x i32> @compare_sext_ugt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1189 %cmp = fcmp nnan ugt <4 x float> %x, %y
1190 %res = sext <4 x i1> %cmp to <4 x i32>
1191 ret <4 x i32> %res
1192}
1193
Thomas Livelyebd4c902018-09-12 17:56:00 +00001194; CHECK-LABEL: compare_uge_v4f32:
1195; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001196; SIMD128-NEXT: .functype compare_uge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001197; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1198; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1199; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001200define <4 x i1> @compare_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
1201 %res = fcmp uge <4 x float> %x, %y
1202 ret <4 x i1> %res
1203}
1204
Thomas Lively0200d622019-03-19 00:55:34 +00001205; CHECK-LABEL: compare_uge_nnan_v4f32:
1206; NO-SIMD128-NOT: f32x4
1207; SIMD128-NEXT: .functype compare_uge_nnan_v4f32 (v128, v128) -> (v128){{$}}
1208; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1209; SIMD128-NEXT: return $pop[[R]]{{$}}
1210define <4 x i1> @compare_uge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1211 %res = fcmp nnan uge <4 x float> %x, %y
1212 ret <4 x i1> %res
1213}
1214
Thomas Lively5ea17d42018-10-20 01:35:23 +00001215; CHECK-LABEL: compare_sext_uge_v4f32:
1216; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001217; SIMD128-NEXT: .functype compare_sext_uge_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001218; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1219; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1220; SIMD128-NEXT: return $pop[[R]]{{$}}
1221define <4 x i32> @compare_sext_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
1222 %cmp = fcmp uge <4 x float> %x, %y
1223 %res = sext <4 x i1> %cmp to <4 x i32>
1224 ret <4 x i32> %res
1225}
1226
Thomas Lively0200d622019-03-19 00:55:34 +00001227; CHECK-LABEL: compare_sext_uge_nnan_v4f32:
1228; NO-SIMD128-NOT: f32x4
1229; SIMD128-NEXT: .functype compare_sext_uge_nnan_v4f32 (v128, v128) -> (v128){{$}}
1230; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1231; SIMD128-NEXT: return $pop[[R]]{{$}}
1232define <4 x i32> @compare_sext_uge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1233 %cmp = fcmp nnan uge <4 x float> %x, %y
1234 %res = sext <4 x i1> %cmp to <4 x i32>
1235 ret <4 x i32> %res
1236}
1237
Thomas Livelyebd4c902018-09-12 17:56:00 +00001238; CHECK-LABEL: compare_ult_v4f32:
1239; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001240; SIMD128-NEXT: .functype compare_ult_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001241; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1242; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1243; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001244define <4 x i1> @compare_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
1245 %res = fcmp ult <4 x float> %x, %y
1246 ret <4 x i1> %res
1247}
1248
Thomas Lively0200d622019-03-19 00:55:34 +00001249; CHECK-LABEL: compare_ult_nnan_v4f32:
1250; NO-SIMD128-NOT: f32x4
1251; SIMD128-NEXT: .functype compare_ult_nnan_v4f32 (v128, v128) -> (v128){{$}}
1252; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1253; SIMD128-NEXT: return $pop[[R]]{{$}}
1254define <4 x i1> @compare_ult_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1255 %res = fcmp nnan ult <4 x float> %x, %y
1256 ret <4 x i1> %res
1257}
1258
Thomas Lively5ea17d42018-10-20 01:35:23 +00001259; CHECK-LABEL: compare_sext_ult_v4f32:
1260; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001261; SIMD128-NEXT: .functype compare_sext_ult_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001262; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1263; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1264; SIMD128-NEXT: return $pop[[R]]{{$}}
1265define <4 x i32> @compare_sext_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
1266 %cmp = fcmp ult <4 x float> %x, %y
1267 %res = sext <4 x i1> %cmp to <4 x i32>
1268 ret <4 x i32> %res
1269}
1270
Thomas Lively0200d622019-03-19 00:55:34 +00001271; CHECK-LABEL: compare_sext_ult_nnan_v4f32:
1272; NO-SIMD128-NOT: f32x4
1273; SIMD128-NEXT: .functype compare_sext_ult_nnan_v4f32 (v128, v128) -> (v128){{$}}
1274; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1275; SIMD128-NEXT: return $pop[[R]]{{$}}
1276define <4 x i32> @compare_sext_ult_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1277 %cmp = fcmp nnan ult <4 x float> %x, %y
1278 %res = sext <4 x i1> %cmp to <4 x i32>
1279 ret <4 x i32> %res
1280}
1281
Thomas Livelyebd4c902018-09-12 17:56:00 +00001282; CHECK-LABEL: compare_ule_v4f32:
1283; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001284; SIMD128-NEXT: .functype compare_ule_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001285; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1286; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1287; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001288define <4 x i1> @compare_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
1289 %res = fcmp ule <4 x float> %x, %y
1290 ret <4 x i1> %res
1291}
1292
Thomas Lively0200d622019-03-19 00:55:34 +00001293; CHECK-LABEL: compare_ule_nnan_v4f32:
1294; NO-SIMD128-NOT: f32x4
1295; SIMD128-NEXT: .functype compare_ule_nnan_v4f32 (v128, v128) -> (v128){{$}}
1296; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1297; SIMD128-NEXT: return $pop[[R]]{{$}}
1298define <4 x i1> @compare_ule_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1299 %res = fcmp nnan ule <4 x float> %x, %y
1300 ret <4 x i1> %res
1301}
1302
Thomas Lively5ea17d42018-10-20 01:35:23 +00001303; CHECK-LABEL: compare_sext_ule_v4f32:
1304; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001305; SIMD128-NEXT: .functype compare_sext_ule_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001306; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1307; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1308; SIMD128-NEXT: return $pop[[R]]{{$}}
1309define <4 x i32> @compare_sext_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
1310 %cmp = fcmp ule <4 x float> %x, %y
1311 %res = sext <4 x i1> %cmp to <4 x i32>
1312 ret <4 x i32> %res
1313}
1314
Thomas Lively0200d622019-03-19 00:55:34 +00001315; CHECK-LABEL: compare_sext_ule_nnan_v4f32:
1316; NO-SIMD128-NOT: f32x4
1317; SIMD128-NEXT: .functype compare_sext_ule_nnan_v4f32 (v128, v128) -> (v128){{$}}
1318; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1319; SIMD128-NEXT: return $pop[[R]]{{$}}
1320define <4 x i32> @compare_sext_ule_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1321 %cmp = fcmp nnan ule <4 x float> %x, %y
1322 %res = sext <4 x i1> %cmp to <4 x i32>
1323 ret <4 x i32> %res
1324}
1325
Thomas Livelyebd4c902018-09-12 17:56:00 +00001326; CHECK-LABEL: compare_une_v4f32:
1327; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001328; SIMD128-NEXT: .functype compare_une_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001329; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}{{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001330; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001331define <4 x i1> @compare_une_v4f32 (<4 x float> %x, <4 x float> %y) {
1332 %res = fcmp une <4 x float> %x, %y
1333 ret <4 x i1> %res
1334}
1335
Thomas Lively0200d622019-03-19 00:55:34 +00001336; CHECK-LABEL: compare_une_nnan_v4f32:
1337; NO-SIMD128-NOT: f32x4
1338; SIMD128-NEXT: .functype compare_une_nnan_v4f32 (v128, v128) -> (v128){{$}}
1339; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}{{$}}
1340; SIMD128-NEXT: return $pop[[R]]{{$}}
1341define <4 x i1> @compare_une_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1342 %res = fcmp nnan une <4 x float> %x, %y
1343 ret <4 x i1> %res
1344}
1345
Thomas Lively5ea17d42018-10-20 01:35:23 +00001346; CHECK-LABEL: compare_sext_une_v4f32:
1347; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001348; SIMD128-NEXT: .functype compare_sext_une_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001349; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1350; SIMD128-NEXT: return $pop[[R]]{{$}}
1351define <4 x i32> @compare_sext_une_v4f32 (<4 x float> %x, <4 x float> %y) {
1352 %cmp = fcmp une <4 x float> %x, %y
1353 %res = sext <4 x i1> %cmp to <4 x i32>
1354 ret <4 x i32> %res
1355}
1356
Thomas Lively0200d622019-03-19 00:55:34 +00001357; CHECK-LABEL: compare_sext_une_nnan_v4f32:
1358; NO-SIMD128-NOT: f32x4
1359; SIMD128-NEXT: .functype compare_sext_une_nnan_v4f32 (v128, v128) -> (v128){{$}}
1360; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1361; SIMD128-NEXT: return $pop[[R]]{{$}}
1362define <4 x i32> @compare_sext_une_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1363 %cmp = fcmp nnan une <4 x float> %x, %y
1364 %res = sext <4 x i1> %cmp to <4 x i32>
1365 ret <4 x i32> %res
1366}
1367
Thomas Livelyebd4c902018-09-12 17:56:00 +00001368; CHECK-LABEL: compare_uno_v4f32:
1369; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001370; SIMD128-NEXT: .functype compare_uno_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001371; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1372; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1373; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1374; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001375define <4 x i1> @compare_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
1376 %res = fcmp uno <4 x float> %x, %y
1377 ret <4 x i1> %res
1378}
1379
Thomas Lively0200d622019-03-19 00:55:34 +00001380; CHECK-LABEL: compare_uno_nnan_v4f32:
1381; NO-SIMD128-NOT: f32x4
1382; SIMD128-NEXT: .functype compare_uno_nnan_v4f32 (v128, v128) -> (v128){{$}}
1383; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1384; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1385; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1386; SIMD128-NEXT: return $pop[[R]]{{$}}
1387define <4 x i1> @compare_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1388 %res = fcmp nnan uno <4 x float> %x, %y
1389 ret <4 x i1> %res
1390}
1391
Thomas Lively5ea17d42018-10-20 01:35:23 +00001392; CHECK-LABEL: compare_sext_uno_v4f32:
1393; NO-SIMD128-NOT: f32x4
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001394; SIMD128-NEXT: .functype compare_sext_uno_v4f32 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001395; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1396; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1397; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1398; SIMD128-NEXT: return $pop[[R]]{{$}}
1399define <4 x i32> @compare_sext_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
1400 %cmp = fcmp uno <4 x float> %x, %y
1401 %res = sext <4 x i1> %cmp to <4 x i32>
1402 ret <4 x i32> %res
1403}
1404
Thomas Lively0200d622019-03-19 00:55:34 +00001405; CHECK-LABEL: compare_sext_uno_nnan_v4f32:
1406; NO-SIMD128-NOT: f32x4
1407; SIMD128-NEXT: .functype compare_sext_uno_nnan_v4f32 (v128, v128) -> (v128){{$}}
1408; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1409; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1410; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1411; SIMD128-NEXT: return $pop[[R]]{{$}}
1412define <4 x i32> @compare_sext_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1413 %cmp = fcmp nnan uno <4 x float> %x, %y
1414 %res = sext <4 x i1> %cmp to <4 x i32>
1415 ret <4 x i32> %res
1416}
1417
Thomas Livelyebd4c902018-09-12 17:56:00 +00001418; CHECK-LABEL: compare_oeq_v2f64:
1419; NO-SIMD128-NOT: f64x2
1420; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001421; SIMD128-NEXT: .functype compare_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001422; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1423; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001424define <2 x i1> @compare_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1425 %res = fcmp oeq <2 x double> %x, %y
1426 ret <2 x i1> %res
1427}
1428
Thomas Lively0200d622019-03-19 00:55:34 +00001429; CHECK-LABEL: compare_oeq_nnan_v2f64:
1430; NO-SIMD128-NOT: f64x2
1431; SIMD128-VM-NOT: f64x2
1432; SIMD128-NEXT: .functype compare_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1433; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1434; SIMD128-NEXT: return $pop[[R]]{{$}}
1435define <2 x i1> @compare_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1436 %res = fcmp nnan oeq <2 x double> %x, %y
1437 ret <2 x i1> %res
1438}
1439
Thomas Lively5ea17d42018-10-20 01:35:23 +00001440; CHECK-LABEL: compare_sext_oeq_v2f64:
1441; NO-SIMD128-NOT: f64x2
1442; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001443; SIMD128-NEXT: .functype compare_sext_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001444; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1445; SIMD128-NEXT: return $pop[[R]]{{$}}
1446define <2 x i64> @compare_sext_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1447 %cmp = fcmp oeq <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 Lively0200d622019-03-19 00:55:34 +00001452; CHECK-LABEL: compare_sext_oeq_nnan_v2f64:
1453; NO-SIMD128-NOT: f64x2
1454; SIMD128-VM-NOT: f64x2
1455; SIMD128-NEXT: .functype compare_sext_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1456; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1457; SIMD128-NEXT: return $pop[[R]]{{$}}
1458define <2 x i64> @compare_sext_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1459 %cmp = fcmp nnan oeq <2 x double> %x, %y
1460 %res = sext <2 x i1> %cmp to <2 x i64>
1461 ret <2 x i64> %res
1462}
1463
Thomas Livelyebd4c902018-09-12 17:56:00 +00001464; CHECK-LABEL: compare_ogt_v2f64:
1465; NO-SIMD128-NOT: f64x2
1466; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001467; SIMD128-NEXT: .functype compare_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001468; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1469; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001470define <2 x i1> @compare_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1471 %res = fcmp ogt <2 x double> %x, %y
1472 ret <2 x i1> %res
1473}
1474
Thomas Lively0200d622019-03-19 00:55:34 +00001475; CHECK-LABEL: compare_ogt_nnan_v2f64:
1476; NO-SIMD128-NOT: f64x2
1477; SIMD128-VM-NOT: f64x2
1478; SIMD128-NEXT: .functype compare_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1479; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1480; SIMD128-NEXT: return $pop[[R]]{{$}}
1481define <2 x i1> @compare_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1482 %res = fcmp nnan ogt <2 x double> %x, %y
1483 ret <2 x i1> %res
1484}
1485
Thomas Lively5ea17d42018-10-20 01:35:23 +00001486; CHECK-LABEL: compare_sext_ogt_v2f64:
1487; NO-SIMD128-NOT: f64x2
1488; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001489; SIMD128-NEXT: .functype compare_sext_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001490; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1491; SIMD128-NEXT: return $pop[[R]]{{$}}
1492define <2 x i64> @compare_sext_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1493 %cmp = fcmp ogt <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 Lively0200d622019-03-19 00:55:34 +00001498; CHECK-LABEL: compare_sext_ogt_nnan_v2f64:
1499; NO-SIMD128-NOT: f64x2
1500; SIMD128-VM-NOT: f64x2
1501; SIMD128-NEXT: .functype compare_sext_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1502; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1503; SIMD128-NEXT: return $pop[[R]]{{$}}
1504define <2 x i64> @compare_sext_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1505 %cmp = fcmp nnan ogt <2 x double> %x, %y
1506 %res = sext <2 x i1> %cmp to <2 x i64>
1507 ret <2 x i64> %res
1508}
1509
Thomas Livelyebd4c902018-09-12 17:56:00 +00001510; CHECK-LABEL: compare_oge_v2f64:
1511; NO-SIMD128-NOT: f64x2
1512; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001513; SIMD128-NEXT: .functype compare_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001514; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1515; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001516define <2 x i1> @compare_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1517 %res = fcmp oge <2 x double> %x, %y
1518 ret <2 x i1> %res
1519}
1520
Thomas Lively0200d622019-03-19 00:55:34 +00001521; CHECK-LABEL: compare_oge_nnan_v2f64:
1522; NO-SIMD128-NOT: f64x2
1523; SIMD128-VM-NOT: f64x2
1524; SIMD128-NEXT: .functype compare_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1525; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1526; SIMD128-NEXT: return $pop[[R]]{{$}}
1527define <2 x i1> @compare_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1528 %res = fcmp nnan oge <2 x double> %x, %y
1529 ret <2 x i1> %res
1530}
1531
Thomas Lively5ea17d42018-10-20 01:35:23 +00001532; CHECK-LABEL: compare_sext_oge_v2f64:
1533; NO-SIMD128-NOT: f64x2
1534; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001535; SIMD128-NEXT: .functype compare_sext_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001536; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1537; SIMD128-NEXT: return $pop[[R]]{{$}}
1538define <2 x i64> @compare_sext_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1539 %cmp = fcmp oge <2 x double> %x, %y
1540 %res = sext <2 x i1> %cmp to <2 x i64>
1541 ret <2 x i64> %res
1542}
1543
Thomas Lively0200d622019-03-19 00:55:34 +00001544; CHECK-LABEL: compare_sext_oge_nnan_v2f64:
1545; NO-SIMD128-NOT: f64x2
1546; SIMD128-VM-NOT: f64x2
1547; SIMD128-NEXT: .functype compare_sext_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1548; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1549; SIMD128-NEXT: return $pop[[R]]{{$}}
1550define <2 x i64> @compare_sext_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1551 %cmp = fcmp nnan oge <2 x double> %x, %y
1552 %res = sext <2 x i1> %cmp to <2 x i64>
1553 ret <2 x i64> %res
1554}
1555
Thomas Livelyebd4c902018-09-12 17:56:00 +00001556; CHECK-LABEL: compare_olt_v2f64:
1557; NO-SIMD128-NOT: f64x2
1558; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001559; SIMD128-NEXT: .functype compare_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001560; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1561; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001562define <2 x i1> @compare_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1563 %res = fcmp olt <2 x double> %x, %y
1564 ret <2 x i1> %res
1565}
1566
Thomas Lively0200d622019-03-19 00:55:34 +00001567; CHECK-LABEL: compare_olt_nnan_v2f64:
1568; NO-SIMD128-NOT: f64x2
1569; SIMD128-VM-NOT: f64x2
1570; SIMD128-NEXT: .functype compare_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1571; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1572; SIMD128-NEXT: return $pop[[R]]{{$}}
1573define <2 x i1> @compare_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1574 %res = fcmp nnan olt <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_olt_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_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001582; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1583; SIMD128-NEXT: return $pop[[R]]{{$}}
1584define <2 x i64> @compare_sext_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1585 %cmp = fcmp olt <2 x double> %x, %y
1586 %res = sext <2 x i1> %cmp to <2 x i64>
1587 ret <2 x i64> %res
1588}
1589
Thomas Lively0200d622019-03-19 00:55:34 +00001590; CHECK-LABEL: compare_sext_olt_nnan_v2f64:
1591; NO-SIMD128-NOT: f64x2
1592; SIMD128-VM-NOT: f64x2
1593; SIMD128-NEXT: .functype compare_sext_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1594; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1595; SIMD128-NEXT: return $pop[[R]]{{$}}
1596define <2 x i64> @compare_sext_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1597 %cmp = fcmp nnan olt <2 x double> %x, %y
1598 %res = sext <2 x i1> %cmp to <2 x i64>
1599 ret <2 x i64> %res
1600}
1601
Thomas Livelyebd4c902018-09-12 17:56:00 +00001602; CHECK-LABEL: compare_ole_v2f64:
1603; NO-SIMD128-NOT: f64x2
1604; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001605; SIMD128-NEXT: .functype compare_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001606; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1607; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001608define <2 x i1> @compare_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1609 %res = fcmp ole <2 x double> %x, %y
1610 ret <2 x i1> %res
1611}
1612
Thomas Lively0200d622019-03-19 00:55:34 +00001613; CHECK-LABEL: compare_ole_nnan_v2f64:
1614; NO-SIMD128-NOT: f64x2
1615; SIMD128-VM-NOT: f64x2
1616; SIMD128-NEXT: .functype compare_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1617; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1618; SIMD128-NEXT: return $pop[[R]]{{$}}
1619define <2 x i1> @compare_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1620 %res = fcmp nnan ole <2 x double> %x, %y
1621 ret <2 x i1> %res
1622}
1623
Thomas Lively5ea17d42018-10-20 01:35:23 +00001624; CHECK-LABEL: compare_sext_ole_v2f64:
1625; NO-SIMD128-NOT: f64x2
1626; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001627; SIMD128-NEXT: .functype compare_sext_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001628; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1629; SIMD128-NEXT: return $pop[[R]]{{$}}
1630define <2 x i64> @compare_sext_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1631 %cmp = fcmp ole <2 x double> %x, %y
1632 %res = sext <2 x i1> %cmp to <2 x i64>
1633 ret <2 x i64> %res
1634}
1635
Thomas Lively0200d622019-03-19 00:55:34 +00001636; CHECK-LABEL: compare_sext_ole_nnan_v2f64:
1637; NO-SIMD128-NOT: f64x2
1638; SIMD128-VM-NOT: f64x2
1639; SIMD128-NEXT: .functype compare_sext_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1640; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1641; SIMD128-NEXT: return $pop[[R]]{{$}}
1642define <2 x i64> @compare_sext_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1643 %cmp = fcmp nnan ole <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 Livelyebd4c902018-09-12 17:56:00 +00001648; CHECK-LABEL: compare_one_v2f64:
1649; NO-SIMD128-NOT: f64x2
1650; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001651; SIMD128-NEXT: .functype compare_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001652; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1653; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1654; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1655; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1656; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1657; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001658define <2 x i1> @compare_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1659 %res = fcmp one <2 x double> %x, %y
1660 ret <2 x i1> %res
1661}
1662
Thomas Lively0200d622019-03-19 00:55:34 +00001663; CHECK-LABEL: compare_one_nnan_v2f64:
1664; NO-SIMD128-NOT: f64x2
1665; SIMD128-VM-NOT: f64x2
1666; SIMD128-NEXT: .functype compare_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1667; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1668; SIMD128-NEXT: return $pop[[R]]{{$}}
1669define <2 x i1> @compare_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1670 %res = fcmp nnan one <2 x double> %x, %y
1671 ret <2 x i1> %res
1672}
1673
Thomas Lively5ea17d42018-10-20 01:35:23 +00001674; CHECK-LABEL: compare_sext_one_v2f64:
1675; NO-SIMD128-NOT: f64x2
1676; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001677; SIMD128-NEXT: .functype compare_sext_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001678; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1679; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1680; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1681; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1682; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1683; SIMD128-NEXT: return $pop[[R]]{{$}}
1684define <2 x i64> @compare_sext_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1685 %cmp = fcmp one <2 x double> %x, %y
1686 %res = sext <2 x i1> %cmp to <2 x i64>
1687 ret <2 x i64> %res
1688}
1689
Thomas Lively0200d622019-03-19 00:55:34 +00001690; CHECK-LABEL: compare_sext_one_nnan_v2f64:
1691; NO-SIMD128-NOT: f64x2
1692; SIMD128-VM-NOT: f64x2
1693; SIMD128-NEXT: .functype compare_sext_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1694; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1695; SIMD128-NEXT: return $pop[[R]]{{$}}
1696define <2 x i64> @compare_sext_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1697 %cmp = fcmp nnan one <2 x double> %x, %y
1698 %res = sext <2 x i1> %cmp to <2 x i64>
1699 ret <2 x i64> %res
1700}
1701
Thomas Livelyebd4c902018-09-12 17:56:00 +00001702; CHECK-LABEL: compare_ord_v2f64:
1703; NO-SIMD128-NOT: f64x2
1704; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001705; SIMD128-NEXT: .functype compare_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001706; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1707; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1708; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1709; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001710define <2 x i1> @compare_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1711 %res = fcmp ord <2 x double> %x, %y
1712 ret <2 x i1> %res
1713}
1714
Thomas Lively0200d622019-03-19 00:55:34 +00001715; CHECK-LABEL: compare_ord_nnan_v2f64:
1716; NO-SIMD128-NOT: f64x2
1717; SIMD128-VM-NOT: f64x2
1718; SIMD128-NEXT: .functype compare_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1719; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1720; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1721; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1722; SIMD128-NEXT: return $pop[[R]]{{$}}
1723define <2 x i1> @compare_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1724 %res = fcmp nnan ord <2 x double> %x, %y
1725 ret <2 x i1> %res
1726}
1727
Thomas Lively5ea17d42018-10-20 01:35:23 +00001728; CHECK-LABEL: compare_sext_ord_v2f64:
1729; NO-SIMD128-NOT: f64x2
1730; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001731; SIMD128-NEXT: .functype compare_sext_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001732; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1733; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1734; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1735; SIMD128-NEXT: return $pop[[R]]{{$}}
1736define <2 x i64> @compare_sext_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1737 %cmp = fcmp ord <2 x double> %x, %y
1738 %res = sext <2 x i1> %cmp to <2 x i64>
1739 ret <2 x i64> %res
1740}
1741
Thomas Lively0200d622019-03-19 00:55:34 +00001742; CHECK-LABEL: compare_sext_ord_nnan_v2f64:
1743; NO-SIMD128-NOT: f64x2
1744; SIMD128-VM-NOT: f64x2
1745; SIMD128-NEXT: .functype compare_sext_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1746; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1747; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1748; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1749; SIMD128-NEXT: return $pop[[R]]{{$}}
1750define <2 x i64> @compare_sext_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1751 %cmp = fcmp nnan ord <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_ueq_v2f64:
1757; NO-SIMD128-NOT: f64x2
1758; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001759; SIMD128-NEXT: .functype compare_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001760; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1761; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1762; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1763; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1764; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1765; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001766define <2 x i1> @compare_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1767 %res = fcmp ueq <2 x double> %x, %y
1768 ret <2 x i1> %res
1769}
1770
Thomas Lively0200d622019-03-19 00:55:34 +00001771; CHECK-LABEL: compare_ueq_nnan_v2f64:
1772; NO-SIMD128-NOT: f64x2
1773; SIMD128-VM-NOT: f64x2
1774; SIMD128-NEXT: .functype compare_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1775; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1776; SIMD128-NEXT: return $pop[[R]]{{$}}
1777define <2 x i1> @compare_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1778 %res = fcmp nnan ueq <2 x double> %x, %y
1779 ret <2 x i1> %res
1780}
1781
Thomas Lively5ea17d42018-10-20 01:35:23 +00001782; CHECK-LABEL: compare_sext_ueq_v2f64:
1783; NO-SIMD128-NOT: f64x2
1784; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001785; SIMD128-NEXT: .functype compare_sext_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001786; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1787; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1788; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1789; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1790; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1791; SIMD128-NEXT: return $pop[[R]]{{$}}
1792define <2 x i64> @compare_sext_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1793 %cmp = fcmp ueq <2 x double> %x, %y
1794 %res = sext <2 x i1> %cmp to <2 x i64>
1795 ret <2 x i64> %res
1796}
1797
Thomas Lively0200d622019-03-19 00:55:34 +00001798; CHECK-LABEL: compare_sext_ueq_nnan_v2f64:
1799; NO-SIMD128-NOT: f64x2
1800; SIMD128-VM-NOT: f64x2
1801; SIMD128-NEXT: .functype compare_sext_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1802; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1803; SIMD128-NEXT: return $pop[[R]]{{$}}
1804define <2 x i64> @compare_sext_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1805 %cmp = fcmp nnan ueq <2 x double> %x, %y
1806 %res = sext <2 x i1> %cmp to <2 x i64>
1807 ret <2 x i64> %res
1808}
1809
Thomas Livelyebd4c902018-09-12 17:56:00 +00001810; CHECK-LABEL: compare_ugt_v2f64:
1811; NO-SIMD128-NOT: f64x2
1812; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001813; SIMD128-NEXT: .functype compare_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001814; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1815; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1816; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001817define <2 x i1> @compare_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1818 %res = fcmp ugt <2 x double> %x, %y
1819 ret <2 x i1> %res
1820}
1821
Thomas Lively0200d622019-03-19 00:55:34 +00001822; CHECK-LABEL: compare_ugt_nnan_v2f64:
1823; NO-SIMD128-NOT: f64x2
1824; SIMD128-VM-NOT: f64x2
1825; SIMD128-NEXT: .functype compare_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1826; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1827; SIMD128-NEXT: return $pop[[R]]{{$}}
1828define <2 x i1> @compare_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1829 %res = fcmp nnan ugt <2 x double> %x, %y
1830 ret <2 x i1> %res
1831}
1832
Thomas Lively5ea17d42018-10-20 01:35:23 +00001833; CHECK-LABEL: compare_sext_ugt_v2f64:
1834; NO-SIMD128-NOT: f64x2
1835; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001836; SIMD128-NEXT: .functype compare_sext_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001837; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1838; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1839; SIMD128-NEXT: return $pop[[R]]{{$}}
1840define <2 x i64> @compare_sext_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1841 %cmp = fcmp ugt <2 x double> %x, %y
1842 %res = sext <2 x i1> %cmp to <2 x i64>
1843 ret <2 x i64> %res
1844}
1845
Thomas Lively0200d622019-03-19 00:55:34 +00001846; CHECK-LABEL: compare_sext_ugt_nnan_v2f64:
1847; NO-SIMD128-NOT: f64x2
1848; SIMD128-VM-NOT: f64x2
1849; SIMD128-NEXT: .functype compare_sext_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1850; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1851; SIMD128-NEXT: return $pop[[R]]{{$}}
1852define <2 x i64> @compare_sext_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1853 %cmp = fcmp nnan ugt <2 x double> %x, %y
1854 %res = sext <2 x i1> %cmp to <2 x i64>
1855 ret <2 x i64> %res
1856}
1857
Thomas Livelyebd4c902018-09-12 17:56:00 +00001858; CHECK-LABEL: compare_uge_v2f64:
1859; NO-SIMD128-NOT: f64x2
1860; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001861; SIMD128-NEXT: .functype compare_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001862; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1863; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1864; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001865define <2 x i1> @compare_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1866 %res = fcmp uge <2 x double> %x, %y
1867 ret <2 x i1> %res
1868}
1869
Thomas Lively0200d622019-03-19 00:55:34 +00001870; CHECK-LABEL: compare_uge_nnan_v2f64:
1871; NO-SIMD128-NOT: f64x2
1872; SIMD128-VM-NOT: f64x2
1873; SIMD128-NEXT: .functype compare_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1874; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1875; SIMD128-NEXT: return $pop[[R]]{{$}}
1876define <2 x i1> @compare_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1877 %res = fcmp nnan uge <2 x double> %x, %y
1878 ret <2 x i1> %res
1879}
1880
Thomas Lively5ea17d42018-10-20 01:35:23 +00001881; CHECK-LABEL: compare_sext_uge_v2f64:
1882; NO-SIMD128-NOT: f64x2
1883; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001884; SIMD128-NEXT: .functype compare_sext_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001885; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1886; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1887; SIMD128-NEXT: return $pop[[R]]{{$}}
1888define <2 x i64> @compare_sext_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1889 %cmp = fcmp uge <2 x double> %x, %y
1890 %res = sext <2 x i1> %cmp to <2 x i64>
1891 ret <2 x i64> %res
1892}
1893
Thomas Lively0200d622019-03-19 00:55:34 +00001894; CHECK-LABEL: compare_sext_uge_nnan_v2f64:
1895; NO-SIMD128-NOT: f64x2
1896; SIMD128-VM-NOT: f64x2
1897; SIMD128-NEXT: .functype compare_sext_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1898; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1899; SIMD128-NEXT: return $pop[[R]]{{$}}
1900define <2 x i64> @compare_sext_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1901 %cmp = fcmp nnan uge <2 x double> %x, %y
1902 %res = sext <2 x i1> %cmp to <2 x i64>
1903 ret <2 x i64> %res
1904}
1905
Thomas Livelyebd4c902018-09-12 17:56:00 +00001906; CHECK-LABEL: compare_ult_v2f64:
1907; NO-SIMD128-NOT: f64x2
1908; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001909; SIMD128-NEXT: .functype compare_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001910; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1911; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1912; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001913define <2 x i1> @compare_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1914 %res = fcmp ult <2 x double> %x, %y
1915 ret <2 x i1> %res
1916}
1917
Thomas Lively0200d622019-03-19 00:55:34 +00001918; CHECK-LABEL: compare_ult_nnan_v2f64:
1919; NO-SIMD128-NOT: f64x2
1920; SIMD128-VM-NOT: f64x2
1921; SIMD128-NEXT: .functype compare_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1922; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1923; SIMD128-NEXT: return $pop[[R]]{{$}}
1924define <2 x i1> @compare_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1925 %res = fcmp nnan ult <2 x double> %x, %y
1926 ret <2 x i1> %res
1927}
1928
Thomas Lively5ea17d42018-10-20 01:35:23 +00001929; CHECK-LABEL: compare_sext_ult_v2f64:
1930; NO-SIMD128-NOT: f64x2
1931; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001932; SIMD128-NEXT: .functype compare_sext_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001933; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1934; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1935; SIMD128-NEXT: return $pop[[R]]{{$}}
1936define <2 x i64> @compare_sext_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1937 %cmp = fcmp ult <2 x double> %x, %y
1938 %res = sext <2 x i1> %cmp to <2 x i64>
1939 ret <2 x i64> %res
1940}
1941
Thomas Lively0200d622019-03-19 00:55:34 +00001942; CHECK-LABEL: compare_sext_ult_nnan_v2f64:
1943; NO-SIMD128-NOT: f64x2
1944; SIMD128-VM-NOT: f64x2
1945; SIMD128-NEXT: .functype compare_sext_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1946; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1947; SIMD128-NEXT: return $pop[[R]]{{$}}
1948define <2 x i64> @compare_sext_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1949 %cmp = fcmp nnan ult <2 x double> %x, %y
1950 %res = sext <2 x i1> %cmp to <2 x i64>
1951 ret <2 x i64> %res
1952}
1953
Thomas Livelyebd4c902018-09-12 17:56:00 +00001954; CHECK-LABEL: compare_ule_v2f64:
1955; NO-SIMD128-NOT: f64x2
1956; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001957; SIMD128-NEXT: .functype compare_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001958; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1959; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1960; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001961define <2 x i1> @compare_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1962 %res = fcmp ule <2 x double> %x, %y
1963 ret <2 x i1> %res
1964}
1965
Thomas Lively0200d622019-03-19 00:55:34 +00001966; CHECK-LABEL: compare_ule_nnan_v2f64:
1967; NO-SIMD128-NOT: f64x2
1968; SIMD128-VM-NOT: f64x2
1969; SIMD128-NEXT: .functype compare_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1970; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1971; SIMD128-NEXT: return $pop[[R]]{{$}}
1972define <2 x i1> @compare_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1973 %res = fcmp nnan ule <2 x double> %x, %y
1974 ret <2 x i1> %res
1975}
1976
Thomas Lively5ea17d42018-10-20 01:35:23 +00001977; CHECK-LABEL: compare_sext_ule_v2f64:
1978; NO-SIMD128-NOT: f64x2
1979; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001980; SIMD128-NEXT: .functype compare_sext_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001981; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1982; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1983; SIMD128-NEXT: return $pop[[R]]{{$}}
1984define <2 x i64> @compare_sext_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1985 %cmp = fcmp ule <2 x double> %x, %y
1986 %res = sext <2 x i1> %cmp to <2 x i64>
1987 ret <2 x i64> %res
1988}
1989
Thomas Lively0200d622019-03-19 00:55:34 +00001990; CHECK-LABEL: compare_sext_ule_nnan_v2f64:
1991; NO-SIMD128-NOT: f64x2
1992; SIMD128-VM-NOT: f64x2
1993; SIMD128-NEXT: .functype compare_sext_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1994; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1995; SIMD128-NEXT: return $pop[[R]]{{$}}
1996define <2 x i64> @compare_sext_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1997 %cmp = fcmp nnan ule <2 x double> %x, %y
1998 %res = sext <2 x i1> %cmp to <2 x i64>
1999 ret <2 x i64> %res
2000}
2001
Thomas Livelyebd4c902018-09-12 17:56:00 +00002002; CHECK-LABEL: compare_une_v2f64:
2003; NO-SIMD128-NOT: f64x2
2004; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00002005; SIMD128-NEXT: .functype compare_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00002006; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
2007; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00002008define <2 x i1> @compare_une_v2f64 (<2 x double> %x, <2 x double> %y) {
2009 %res = fcmp une <2 x double> %x, %y
2010 ret <2 x i1> %res
2011}
2012
Thomas Lively0200d622019-03-19 00:55:34 +00002013; CHECK-LABEL: compare_une_nnan_v2f64:
2014; NO-SIMD128-NOT: f64x2
2015; SIMD128-VM-NOT: f64x2
2016; SIMD128-NEXT: .functype compare_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
2017; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
2018; SIMD128-NEXT: return $pop[[R]]{{$}}
2019define <2 x i1> @compare_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2020 %res = fcmp nnan une <2 x double> %x, %y
2021 ret <2 x i1> %res
2022}
2023
Thomas Lively5ea17d42018-10-20 01:35:23 +00002024; CHECK-LABEL: compare_sext_une_v2f64:
2025; NO-SIMD128-NOT: f64x2
2026; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00002027; SIMD128-NEXT: .functype compare_sext_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00002028; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
2029; SIMD128-NEXT: return $pop[[R]]{{$}}
2030define <2 x i64> @compare_sext_une_v2f64 (<2 x double> %x, <2 x double> %y) {
2031 %cmp = fcmp une <2 x double> %x, %y
2032 %res = sext <2 x i1> %cmp to <2 x i64>
2033 ret <2 x i64> %res
2034}
2035
Thomas Lively0200d622019-03-19 00:55:34 +00002036; CHECK-LABEL: compare_sext_une_nnan_v2f64:
2037; NO-SIMD128-NOT: f64x2
2038; SIMD128-VM-NOT: f64x2
2039; SIMD128-NEXT: .functype compare_sext_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
2040; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
2041; SIMD128-NEXT: return $pop[[R]]{{$}}
2042define <2 x i64> @compare_sext_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2043 %cmp = fcmp nnan une <2 x double> %x, %y
2044 %res = sext <2 x i1> %cmp to <2 x i64>
2045 ret <2 x i64> %res
2046}
2047
Thomas Livelyebd4c902018-09-12 17:56:00 +00002048; CHECK-LABEL: compare_uno_v2f64:
2049; NO-SIMD128-NOT: f64x2
2050; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00002051; SIMD128-NEXT: .functype compare_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00002052; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2053; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2054; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2055; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00002056define <2 x i1> @compare_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
2057 %res = fcmp uno <2 x double> %x, %y
2058 ret <2 x i1> %res
2059}
Thomas Lively5ea17d42018-10-20 01:35:23 +00002060
Thomas Lively0200d622019-03-19 00:55:34 +00002061; CHECK-LABEL: compare_uno_nnan_v2f64:
2062; NO-SIMD128-NOT: f64x2
2063; SIMD128-VM-NOT: f64x2
2064; SIMD128-NEXT: .functype compare_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
2065; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2066; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2067; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2068; SIMD128-NEXT: return $pop[[R]]{{$}}
2069define <2 x i1> @compare_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2070 %res = fcmp nnan uno <2 x double> %x, %y
2071 ret <2 x i1> %res
2072}
2073
Thomas Lively5ea17d42018-10-20 01:35:23 +00002074; CHECK-LABEL: compare_sext_uno_v2f64:
2075; NO-SIMD128-NOT: f64x2
2076; SIMD128-VM-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00002077; SIMD128-NEXT: .functype compare_sext_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00002078; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2079; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2080; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2081; SIMD128-NEXT: return $pop[[R]]{{$}}
2082define <2 x i64> @compare_sext_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
2083 %cmp = fcmp uno <2 x double> %x, %y
2084 %res = sext <2 x i1> %cmp to <2 x i64>
2085 ret <2 x i64> %res
2086}
Thomas Lively0200d622019-03-19 00:55:34 +00002087
2088; CHECK-LABEL: compare_sext_uno_nnan_v2f64:
2089; NO-SIMD128-NOT: f64x2
2090; SIMD128-VM-NOT: f64x2
2091; SIMD128-NEXT: .functype compare_sext_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
2092; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2093; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2094; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2095; SIMD128-NEXT: return $pop[[R]]{{$}}
2096define <2 x i64> @compare_sext_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2097 %cmp = fcmp nnan uno <2 x double> %x, %y
2098 %res = sext <2 x i1> %cmp to <2 x i64>
2099 ret <2 x i64> %res
2100}