blob: 812dce4bfe791c046f714cdc8314939d5f8651e4 [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
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001420; SIMD128-NEXT: .functype compare_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001421; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1422; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001423define <2 x i1> @compare_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1424 %res = fcmp oeq <2 x double> %x, %y
1425 ret <2 x i1> %res
1426}
1427
Thomas Lively0200d622019-03-19 00:55:34 +00001428; CHECK-LABEL: compare_oeq_nnan_v2f64:
1429; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001430; SIMD128-NEXT: .functype compare_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1431; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1432; SIMD128-NEXT: return $pop[[R]]{{$}}
1433define <2 x i1> @compare_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1434 %res = fcmp nnan oeq <2 x double> %x, %y
1435 ret <2 x i1> %res
1436}
1437
Thomas Lively5ea17d42018-10-20 01:35:23 +00001438; CHECK-LABEL: compare_sext_oeq_v2f64:
1439; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001440; SIMD128-NEXT: .functype compare_sext_oeq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001441; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1442; SIMD128-NEXT: return $pop[[R]]{{$}}
1443define <2 x i64> @compare_sext_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1444 %cmp = fcmp oeq <2 x double> %x, %y
1445 %res = sext <2 x i1> %cmp to <2 x i64>
1446 ret <2 x i64> %res
1447}
1448
Thomas Lively0200d622019-03-19 00:55:34 +00001449; CHECK-LABEL: compare_sext_oeq_nnan_v2f64:
1450; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001451; SIMD128-NEXT: .functype compare_sext_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1452; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1453; SIMD128-NEXT: return $pop[[R]]{{$}}
1454define <2 x i64> @compare_sext_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1455 %cmp = fcmp nnan oeq <2 x double> %x, %y
1456 %res = sext <2 x i1> %cmp to <2 x i64>
1457 ret <2 x i64> %res
1458}
1459
Thomas Livelyebd4c902018-09-12 17:56:00 +00001460; CHECK-LABEL: compare_ogt_v2f64:
1461; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001462; SIMD128-NEXT: .functype compare_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001463; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1464; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001465define <2 x i1> @compare_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1466 %res = fcmp ogt <2 x double> %x, %y
1467 ret <2 x i1> %res
1468}
1469
Thomas Lively0200d622019-03-19 00:55:34 +00001470; CHECK-LABEL: compare_ogt_nnan_v2f64:
1471; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001472; SIMD128-NEXT: .functype compare_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1473; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1474; SIMD128-NEXT: return $pop[[R]]{{$}}
1475define <2 x i1> @compare_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1476 %res = fcmp nnan ogt <2 x double> %x, %y
1477 ret <2 x i1> %res
1478}
1479
Thomas Lively5ea17d42018-10-20 01:35:23 +00001480; CHECK-LABEL: compare_sext_ogt_v2f64:
1481; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001482; SIMD128-NEXT: .functype compare_sext_ogt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001483; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1484; SIMD128-NEXT: return $pop[[R]]{{$}}
1485define <2 x i64> @compare_sext_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1486 %cmp = fcmp ogt <2 x double> %x, %y
1487 %res = sext <2 x i1> %cmp to <2 x i64>
1488 ret <2 x i64> %res
1489}
1490
Thomas Lively0200d622019-03-19 00:55:34 +00001491; CHECK-LABEL: compare_sext_ogt_nnan_v2f64:
1492; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001493; SIMD128-NEXT: .functype compare_sext_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1494; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1495; SIMD128-NEXT: return $pop[[R]]{{$}}
1496define <2 x i64> @compare_sext_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1497 %cmp = fcmp nnan ogt <2 x double> %x, %y
1498 %res = sext <2 x i1> %cmp to <2 x i64>
1499 ret <2 x i64> %res
1500}
1501
Thomas Livelyebd4c902018-09-12 17:56:00 +00001502; CHECK-LABEL: compare_oge_v2f64:
1503; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001504; SIMD128-NEXT: .functype compare_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001505; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1506; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001507define <2 x i1> @compare_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1508 %res = fcmp oge <2 x double> %x, %y
1509 ret <2 x i1> %res
1510}
1511
Thomas Lively0200d622019-03-19 00:55:34 +00001512; CHECK-LABEL: compare_oge_nnan_v2f64:
1513; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001514; SIMD128-NEXT: .functype compare_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1515; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1516; SIMD128-NEXT: return $pop[[R]]{{$}}
1517define <2 x i1> @compare_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1518 %res = fcmp nnan oge <2 x double> %x, %y
1519 ret <2 x i1> %res
1520}
1521
Thomas Lively5ea17d42018-10-20 01:35:23 +00001522; CHECK-LABEL: compare_sext_oge_v2f64:
1523; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001524; SIMD128-NEXT: .functype compare_sext_oge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001525; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1526; SIMD128-NEXT: return $pop[[R]]{{$}}
1527define <2 x i64> @compare_sext_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1528 %cmp = fcmp oge <2 x double> %x, %y
1529 %res = sext <2 x i1> %cmp to <2 x i64>
1530 ret <2 x i64> %res
1531}
1532
Thomas Lively0200d622019-03-19 00:55:34 +00001533; CHECK-LABEL: compare_sext_oge_nnan_v2f64:
1534; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001535; SIMD128-NEXT: .functype compare_sext_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1536; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1537; SIMD128-NEXT: return $pop[[R]]{{$}}
1538define <2 x i64> @compare_sext_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1539 %cmp = fcmp nnan 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 Livelyebd4c902018-09-12 17:56:00 +00001544; CHECK-LABEL: compare_olt_v2f64:
1545; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001546; SIMD128-NEXT: .functype compare_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001547; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1548; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001549define <2 x i1> @compare_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1550 %res = fcmp olt <2 x double> %x, %y
1551 ret <2 x i1> %res
1552}
1553
Thomas Lively0200d622019-03-19 00:55:34 +00001554; CHECK-LABEL: compare_olt_nnan_v2f64:
1555; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001556; SIMD128-NEXT: .functype compare_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1557; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1558; SIMD128-NEXT: return $pop[[R]]{{$}}
1559define <2 x i1> @compare_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1560 %res = fcmp nnan olt <2 x double> %x, %y
1561 ret <2 x i1> %res
1562}
1563
Thomas Lively5ea17d42018-10-20 01:35:23 +00001564; CHECK-LABEL: compare_sext_olt_v2f64:
1565; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001566; SIMD128-NEXT: .functype compare_sext_olt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001567; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1568; SIMD128-NEXT: return $pop[[R]]{{$}}
1569define <2 x i64> @compare_sext_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1570 %cmp = fcmp olt <2 x double> %x, %y
1571 %res = sext <2 x i1> %cmp to <2 x i64>
1572 ret <2 x i64> %res
1573}
1574
Thomas Lively0200d622019-03-19 00:55:34 +00001575; CHECK-LABEL: compare_sext_olt_nnan_v2f64:
1576; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001577; SIMD128-NEXT: .functype compare_sext_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1578; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1579; SIMD128-NEXT: return $pop[[R]]{{$}}
1580define <2 x i64> @compare_sext_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1581 %cmp = fcmp nnan olt <2 x double> %x, %y
1582 %res = sext <2 x i1> %cmp to <2 x i64>
1583 ret <2 x i64> %res
1584}
1585
Thomas Livelyebd4c902018-09-12 17:56:00 +00001586; CHECK-LABEL: compare_ole_v2f64:
1587; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001588; SIMD128-NEXT: .functype compare_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001589; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1590; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001591define <2 x i1> @compare_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1592 %res = fcmp ole <2 x double> %x, %y
1593 ret <2 x i1> %res
1594}
1595
Thomas Lively0200d622019-03-19 00:55:34 +00001596; CHECK-LABEL: compare_ole_nnan_v2f64:
1597; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001598; SIMD128-NEXT: .functype compare_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1599; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1600; SIMD128-NEXT: return $pop[[R]]{{$}}
1601define <2 x i1> @compare_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1602 %res = fcmp nnan ole <2 x double> %x, %y
1603 ret <2 x i1> %res
1604}
1605
Thomas Lively5ea17d42018-10-20 01:35:23 +00001606; CHECK-LABEL: compare_sext_ole_v2f64:
1607; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001608; SIMD128-NEXT: .functype compare_sext_ole_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001609; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1610; SIMD128-NEXT: return $pop[[R]]{{$}}
1611define <2 x i64> @compare_sext_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1612 %cmp = fcmp ole <2 x double> %x, %y
1613 %res = sext <2 x i1> %cmp to <2 x i64>
1614 ret <2 x i64> %res
1615}
1616
Thomas Lively0200d622019-03-19 00:55:34 +00001617; CHECK-LABEL: compare_sext_ole_nnan_v2f64:
1618; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001619; SIMD128-NEXT: .functype compare_sext_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1620; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1621; SIMD128-NEXT: return $pop[[R]]{{$}}
1622define <2 x i64> @compare_sext_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1623 %cmp = fcmp nnan ole <2 x double> %x, %y
1624 %res = sext <2 x i1> %cmp to <2 x i64>
1625 ret <2 x i64> %res
1626}
1627
Thomas Livelyebd4c902018-09-12 17:56:00 +00001628; CHECK-LABEL: compare_one_v2f64:
1629; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001630; SIMD128-NEXT: .functype compare_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001631; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1632; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1633; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1634; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1635; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1636; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001637define <2 x i1> @compare_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1638 %res = fcmp one <2 x double> %x, %y
1639 ret <2 x i1> %res
1640}
1641
Thomas Lively0200d622019-03-19 00:55:34 +00001642; CHECK-LABEL: compare_one_nnan_v2f64:
1643; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001644; SIMD128-NEXT: .functype compare_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1645; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1646; SIMD128-NEXT: return $pop[[R]]{{$}}
1647define <2 x i1> @compare_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1648 %res = fcmp nnan one <2 x double> %x, %y
1649 ret <2 x i1> %res
1650}
1651
Thomas Lively5ea17d42018-10-20 01:35:23 +00001652; CHECK-LABEL: compare_sext_one_v2f64:
1653; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001654; SIMD128-NEXT: .functype compare_sext_one_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001655; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $1{{$}}
1656; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $0, $0{{$}}
1657; SIMD128-NEXT: f64x2.eq $push[[T2:[0-9]+]]=, $1, $1{{$}}
1658; SIMD128-NEXT: v128.and $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1659; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1660; SIMD128-NEXT: return $pop[[R]]{{$}}
1661define <2 x i64> @compare_sext_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1662 %cmp = fcmp one <2 x double> %x, %y
1663 %res = sext <2 x i1> %cmp to <2 x i64>
1664 ret <2 x i64> %res
1665}
1666
Thomas Lively0200d622019-03-19 00:55:34 +00001667; CHECK-LABEL: compare_sext_one_nnan_v2f64:
1668; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001669; SIMD128-NEXT: .functype compare_sext_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1670; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1671; SIMD128-NEXT: return $pop[[R]]{{$}}
1672define <2 x i64> @compare_sext_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1673 %cmp = fcmp nnan one <2 x double> %x, %y
1674 %res = sext <2 x i1> %cmp to <2 x i64>
1675 ret <2 x i64> %res
1676}
1677
Thomas Livelyebd4c902018-09-12 17:56:00 +00001678; CHECK-LABEL: compare_ord_v2f64:
1679; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001680; SIMD128-NEXT: .functype compare_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001681; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1682; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1683; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1684; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001685define <2 x i1> @compare_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1686 %res = fcmp ord <2 x double> %x, %y
1687 ret <2 x i1> %res
1688}
1689
Thomas Lively0200d622019-03-19 00:55:34 +00001690; CHECK-LABEL: compare_ord_nnan_v2f64:
1691; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001692; SIMD128-NEXT: .functype compare_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1693; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1694; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1695; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1696; SIMD128-NEXT: return $pop[[R]]{{$}}
1697define <2 x i1> @compare_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1698 %res = fcmp nnan ord <2 x double> %x, %y
1699 ret <2 x i1> %res
1700}
1701
Thomas Lively5ea17d42018-10-20 01:35:23 +00001702; CHECK-LABEL: compare_sext_ord_v2f64:
1703; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001704; SIMD128-NEXT: .functype compare_sext_ord_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001705; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1706; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1707; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1708; SIMD128-NEXT: return $pop[[R]]{{$}}
1709define <2 x i64> @compare_sext_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1710 %cmp = fcmp ord <2 x double> %x, %y
1711 %res = sext <2 x i1> %cmp to <2 x i64>
1712 ret <2 x i64> %res
1713}
1714
Thomas Lively0200d622019-03-19 00:55:34 +00001715; CHECK-LABEL: compare_sext_ord_nnan_v2f64:
1716; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001717; SIMD128-NEXT: .functype compare_sext_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1718; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1719; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1720; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1721; SIMD128-NEXT: return $pop[[R]]{{$}}
1722define <2 x i64> @compare_sext_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1723 %cmp = fcmp nnan ord <2 x double> %x, %y
1724 %res = sext <2 x i1> %cmp to <2 x i64>
1725 ret <2 x i64> %res
1726}
1727
Thomas Livelyebd4c902018-09-12 17:56:00 +00001728; CHECK-LABEL: compare_ueq_v2f64:
1729; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001730; SIMD128-NEXT: .functype compare_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001731; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1732; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1733; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1734; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1735; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1736; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001737define <2 x i1> @compare_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1738 %res = fcmp ueq <2 x double> %x, %y
1739 ret <2 x i1> %res
1740}
1741
Thomas Lively0200d622019-03-19 00:55:34 +00001742; CHECK-LABEL: compare_ueq_nnan_v2f64:
1743; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001744; SIMD128-NEXT: .functype compare_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1745; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1746; SIMD128-NEXT: return $pop[[R]]{{$}}
1747define <2 x i1> @compare_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1748 %res = fcmp nnan ueq <2 x double> %x, %y
1749 ret <2 x i1> %res
1750}
1751
Thomas Lively5ea17d42018-10-20 01:35:23 +00001752; CHECK-LABEL: compare_sext_ueq_v2f64:
1753; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001754; SIMD128-NEXT: .functype compare_sext_ueq_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001755; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $1{{$}}
1756; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $0, $0{{$}}
1757; SIMD128-NEXT: f64x2.ne $push[[T2:[0-9]+]]=, $1, $1{{$}}
1758; SIMD128-NEXT: v128.or $push[[T3:[0-9]+]]=, $pop[[T1]], $pop[[T2]]{{$}}
1759; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T3]]{{$}}
1760; SIMD128-NEXT: return $pop[[R]]{{$}}
1761define <2 x i64> @compare_sext_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1762 %cmp = fcmp ueq <2 x double> %x, %y
1763 %res = sext <2 x i1> %cmp to <2 x i64>
1764 ret <2 x i64> %res
1765}
1766
Thomas Lively0200d622019-03-19 00:55:34 +00001767; CHECK-LABEL: compare_sext_ueq_nnan_v2f64:
1768; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001769; SIMD128-NEXT: .functype compare_sext_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1770; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1771; SIMD128-NEXT: return $pop[[R]]{{$}}
1772define <2 x i64> @compare_sext_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1773 %cmp = fcmp nnan ueq <2 x double> %x, %y
1774 %res = sext <2 x i1> %cmp to <2 x i64>
1775 ret <2 x i64> %res
1776}
1777
Thomas Livelyebd4c902018-09-12 17:56:00 +00001778; CHECK-LABEL: compare_ugt_v2f64:
1779; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001780; SIMD128-NEXT: .functype compare_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001781; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1782; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1783; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001784define <2 x i1> @compare_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1785 %res = fcmp ugt <2 x double> %x, %y
1786 ret <2 x i1> %res
1787}
1788
Thomas Lively0200d622019-03-19 00:55:34 +00001789; CHECK-LABEL: compare_ugt_nnan_v2f64:
1790; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001791; SIMD128-NEXT: .functype compare_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1792; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1793; SIMD128-NEXT: return $pop[[R]]{{$}}
1794define <2 x i1> @compare_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1795 %res = fcmp nnan ugt <2 x double> %x, %y
1796 ret <2 x i1> %res
1797}
1798
Thomas Lively5ea17d42018-10-20 01:35:23 +00001799; CHECK-LABEL: compare_sext_ugt_v2f64:
1800; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001801; SIMD128-NEXT: .functype compare_sext_ugt_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001802; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1803; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1804; SIMD128-NEXT: return $pop[[R]]{{$}}
1805define <2 x i64> @compare_sext_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1806 %cmp = fcmp ugt <2 x double> %x, %y
1807 %res = sext <2 x i1> %cmp to <2 x i64>
1808 ret <2 x i64> %res
1809}
1810
Thomas Lively0200d622019-03-19 00:55:34 +00001811; CHECK-LABEL: compare_sext_ugt_nnan_v2f64:
1812; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001813; SIMD128-NEXT: .functype compare_sext_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1814; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1815; SIMD128-NEXT: return $pop[[R]]{{$}}
1816define <2 x i64> @compare_sext_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1817 %cmp = fcmp nnan ugt <2 x double> %x, %y
1818 %res = sext <2 x i1> %cmp to <2 x i64>
1819 ret <2 x i64> %res
1820}
1821
Thomas Livelyebd4c902018-09-12 17:56:00 +00001822; CHECK-LABEL: compare_uge_v2f64:
1823; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001824; SIMD128-NEXT: .functype compare_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001825; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1826; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1827; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001828define <2 x i1> @compare_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1829 %res = fcmp uge <2 x double> %x, %y
1830 ret <2 x i1> %res
1831}
1832
Thomas Lively0200d622019-03-19 00:55:34 +00001833; CHECK-LABEL: compare_uge_nnan_v2f64:
1834; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001835; SIMD128-NEXT: .functype compare_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1836; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1837; SIMD128-NEXT: return $pop[[R]]{{$}}
1838define <2 x i1> @compare_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1839 %res = fcmp nnan uge <2 x double> %x, %y
1840 ret <2 x i1> %res
1841}
1842
Thomas Lively5ea17d42018-10-20 01:35:23 +00001843; CHECK-LABEL: compare_sext_uge_v2f64:
1844; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001845; SIMD128-NEXT: .functype compare_sext_uge_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001846; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1847; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1848; SIMD128-NEXT: return $pop[[R]]{{$}}
1849define <2 x i64> @compare_sext_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1850 %cmp = fcmp uge <2 x double> %x, %y
1851 %res = sext <2 x i1> %cmp to <2 x i64>
1852 ret <2 x i64> %res
1853}
1854
Thomas Lively0200d622019-03-19 00:55:34 +00001855; CHECK-LABEL: compare_sext_uge_nnan_v2f64:
1856; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001857; SIMD128-NEXT: .functype compare_sext_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1858; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1859; SIMD128-NEXT: return $pop[[R]]{{$}}
1860define <2 x i64> @compare_sext_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1861 %cmp = fcmp nnan uge <2 x double> %x, %y
1862 %res = sext <2 x i1> %cmp to <2 x i64>
1863 ret <2 x i64> %res
1864}
1865
Thomas Livelyebd4c902018-09-12 17:56:00 +00001866; CHECK-LABEL: compare_ult_v2f64:
1867; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001868; SIMD128-NEXT: .functype compare_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001869; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1870; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1871; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001872define <2 x i1> @compare_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1873 %res = fcmp ult <2 x double> %x, %y
1874 ret <2 x i1> %res
1875}
1876
Thomas Lively0200d622019-03-19 00:55:34 +00001877; CHECK-LABEL: compare_ult_nnan_v2f64:
1878; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001879; SIMD128-NEXT: .functype compare_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1880; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1881; SIMD128-NEXT: return $pop[[R]]{{$}}
1882define <2 x i1> @compare_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1883 %res = fcmp nnan ult <2 x double> %x, %y
1884 ret <2 x i1> %res
1885}
1886
Thomas Lively5ea17d42018-10-20 01:35:23 +00001887; CHECK-LABEL: compare_sext_ult_v2f64:
1888; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001889; SIMD128-NEXT: .functype compare_sext_ult_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001890; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1891; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1892; SIMD128-NEXT: return $pop[[R]]{{$}}
1893define <2 x i64> @compare_sext_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1894 %cmp = fcmp ult <2 x double> %x, %y
1895 %res = sext <2 x i1> %cmp to <2 x i64>
1896 ret <2 x i64> %res
1897}
1898
Thomas Lively0200d622019-03-19 00:55:34 +00001899; CHECK-LABEL: compare_sext_ult_nnan_v2f64:
1900; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001901; SIMD128-NEXT: .functype compare_sext_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1902; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1903; SIMD128-NEXT: return $pop[[R]]{{$}}
1904define <2 x i64> @compare_sext_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1905 %cmp = fcmp nnan ult <2 x double> %x, %y
1906 %res = sext <2 x i1> %cmp to <2 x i64>
1907 ret <2 x i64> %res
1908}
1909
Thomas Livelyebd4c902018-09-12 17:56:00 +00001910; CHECK-LABEL: compare_ule_v2f64:
1911; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001912; SIMD128-NEXT: .functype compare_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001913; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1914; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1915; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001916define <2 x i1> @compare_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1917 %res = fcmp ule <2 x double> %x, %y
1918 ret <2 x i1> %res
1919}
1920
Thomas Lively0200d622019-03-19 00:55:34 +00001921; CHECK-LABEL: compare_ule_nnan_v2f64:
1922; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001923; SIMD128-NEXT: .functype compare_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1924; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1925; SIMD128-NEXT: return $pop[[R]]{{$}}
1926define <2 x i1> @compare_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1927 %res = fcmp nnan ule <2 x double> %x, %y
1928 ret <2 x i1> %res
1929}
1930
Thomas Lively5ea17d42018-10-20 01:35:23 +00001931; CHECK-LABEL: compare_sext_ule_v2f64:
1932; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001933; SIMD128-NEXT: .functype compare_sext_ule_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001934; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1935; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1936; SIMD128-NEXT: return $pop[[R]]{{$}}
1937define <2 x i64> @compare_sext_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1938 %cmp = fcmp ule <2 x double> %x, %y
1939 %res = sext <2 x i1> %cmp to <2 x i64>
1940 ret <2 x i64> %res
1941}
1942
Thomas Lively0200d622019-03-19 00:55:34 +00001943; CHECK-LABEL: compare_sext_ule_nnan_v2f64:
1944; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001945; SIMD128-NEXT: .functype compare_sext_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1946; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1947; SIMD128-NEXT: return $pop[[R]]{{$}}
1948define <2 x i64> @compare_sext_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1949 %cmp = fcmp nnan ule <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_une_v2f64:
1955; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001956; SIMD128-NEXT: .functype compare_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively66f3dc02018-09-15 01:12:48 +00001957; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1958; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00001959define <2 x i1> @compare_une_v2f64 (<2 x double> %x, <2 x double> %y) {
1960 %res = fcmp une <2 x double> %x, %y
1961 ret <2 x i1> %res
1962}
1963
Thomas Lively0200d622019-03-19 00:55:34 +00001964; CHECK-LABEL: compare_une_nnan_v2f64:
1965; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001966; SIMD128-NEXT: .functype compare_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
1967; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1968; SIMD128-NEXT: return $pop[[R]]{{$}}
1969define <2 x i1> @compare_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1970 %res = fcmp nnan une <2 x double> %x, %y
1971 ret <2 x i1> %res
1972}
1973
Thomas Lively5ea17d42018-10-20 01:35:23 +00001974; CHECK-LABEL: compare_sext_une_v2f64:
1975; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001976; SIMD128-NEXT: .functype compare_sext_une_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001977; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1978; SIMD128-NEXT: return $pop[[R]]{{$}}
1979define <2 x i64> @compare_sext_une_v2f64 (<2 x double> %x, <2 x double> %y) {
1980 %cmp = fcmp une <2 x double> %x, %y
1981 %res = sext <2 x i1> %cmp to <2 x i64>
1982 ret <2 x i64> %res
1983}
1984
Thomas Lively0200d622019-03-19 00:55:34 +00001985; CHECK-LABEL: compare_sext_une_nnan_v2f64:
1986; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00001987; SIMD128-NEXT: .functype compare_sext_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
1988; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1989; SIMD128-NEXT: return $pop[[R]]{{$}}
1990define <2 x i64> @compare_sext_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1991 %cmp = fcmp nnan une <2 x double> %x, %y
1992 %res = sext <2 x i1> %cmp to <2 x i64>
1993 ret <2 x i64> %res
1994}
1995
Thomas Livelyebd4c902018-09-12 17:56:00 +00001996; CHECK-LABEL: compare_uno_v2f64:
1997; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00001998; SIMD128-NEXT: .functype compare_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00001999; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2000; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2001; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2002; SIMD128-NEXT: return $pop[[R]]{{$}}
Thomas Livelyebd4c902018-09-12 17:56:00 +00002003define <2 x i1> @compare_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
2004 %res = fcmp uno <2 x double> %x, %y
2005 ret <2 x i1> %res
2006}
Thomas Lively5ea17d42018-10-20 01:35:23 +00002007
Thomas Lively0200d622019-03-19 00:55:34 +00002008; CHECK-LABEL: compare_uno_nnan_v2f64:
2009; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00002010; SIMD128-NEXT: .functype compare_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
2011; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2012; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2013; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2014; SIMD128-NEXT: return $pop[[R]]{{$}}
2015define <2 x i1> @compare_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2016 %res = fcmp nnan uno <2 x double> %x, %y
2017 ret <2 x i1> %res
2018}
2019
Thomas Lively5ea17d42018-10-20 01:35:23 +00002020; CHECK-LABEL: compare_sext_uno_v2f64:
2021; NO-SIMD128-NOT: f64x2
Wouter van Oortmerssen49482f82018-11-19 17:10:36 +00002022; SIMD128-NEXT: .functype compare_sext_uno_v2f64 (v128, v128) -> (v128){{$}}
Thomas Lively5ea17d42018-10-20 01:35:23 +00002023; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2024; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2025; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2026; SIMD128-NEXT: return $pop[[R]]{{$}}
2027define <2 x i64> @compare_sext_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
2028 %cmp = fcmp uno <2 x double> %x, %y
2029 %res = sext <2 x i1> %cmp to <2 x i64>
2030 ret <2 x i64> %res
2031}
Thomas Lively0200d622019-03-19 00:55:34 +00002032
2033; CHECK-LABEL: compare_sext_uno_nnan_v2f64:
2034; NO-SIMD128-NOT: f64x2
Thomas Lively0200d622019-03-19 00:55:34 +00002035; SIMD128-NEXT: .functype compare_sext_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
2036; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2037; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2038; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2039; SIMD128-NEXT: return $pop[[R]]{{$}}
2040define <2 x i64> @compare_sext_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2041 %cmp = fcmp nnan uno <2 x double> %x, %y
2042 %res = sext <2 x i1> %cmp to <2 x i64>
2043 ret <2 x i64> %res
2044}