1 ; RUN: llc < %s -mtriple=arm-eabi -mattr=+v8.2a,+neon,+fullfp16 -float-abi=hard | FileCheck %s
2 ; RUN: llc < %s -mtriple=thumbv7a -mattr=+v8.2a,+neon,+fullfp16 -float-abi=hard | FileCheck %s
8 define <4 x half> @test1(<4 x half> %A, <4 x half> %B) {
10 ; CHECK: vmaxnm.f16 d0, d0, d1
12 %tmp3 = fcmp fast ogt <4 x half> %A, %B
13 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
17 define <4 x half> @test2(<4 x half> %A, <4 x half> %B) {
19 ; CHECK: vminnm.f16 d0, d0, d1
21 %tmp3 = fcmp fast ogt <4 x half> %A, %B
22 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
26 define <4 x half> @test3(<4 x half> %A, <4 x half> %B) {
28 ; CHECK: vminnm.f16 d0, d0, d1
30 %tmp3 = fcmp fast oge <4 x half> %A, %B
31 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
35 define <4 x half> @test4(<4 x half> %A, <4 x half> %B) {
37 ; CHECK: vmaxnm.f16 d0, d0, d1
39 %tmp3 = fcmp fast oge <4 x half> %A, %B
40 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
44 define <4 x half> @test5(<4 x half> %A, <4 x half> %B) {
46 ; CHECK: vminnm.f16 d0, d0, d1
48 %tmp3 = fcmp fast olt <4 x half> %A, %B
49 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
53 define <4 x half> @test6(<4 x half> %A, <4 x half> %B) {
55 ; CHECK: vmaxnm.f16 d0, d0, d1
57 %tmp3 = fcmp fast olt <4 x half> %A, %B
58 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
62 define <4 x half> @test7(<4 x half> %A, <4 x half> %B) {
64 ; CHECK: vminnm.f16 d0, d0, d1
66 %tmp3 = fcmp fast ole <4 x half> %A, %B
67 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
71 define <4 x half> @test8(<4 x half> %A, <4 x half> %B) {
73 ; CHECK: vmaxnm.f16 d0, d0, d1
75 %tmp3 = fcmp fast ole <4 x half> %A, %B
76 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
82 define <4 x half> @test11(<4 x half> %A, <4 x half> %B) {
83 ; CHECK-LABEL: test11:
84 ; CHECK: vmaxnm.f16 d0, d0, d1
86 %tmp3 = fcmp fast ugt <4 x half> %A, %B
87 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
91 define <4 x half> @test12(<4 x half> %A, <4 x half> %B) {
92 ; CHECK-LABEL: test12:
93 ; CHECK: vminnm.f16 d0, d0, d1
95 %tmp3 = fcmp fast ugt <4 x half> %A, %B
96 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
100 define <4 x half> @test13(<4 x half> %A, <4 x half> %B) {
101 ; CHECK-LABEL: test13:
102 ; CHECK: vminnm.f16 d0, d0, d1
104 %tmp3 = fcmp fast uge <4 x half> %A, %B
105 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
109 define <4 x half> @test14(<4 x half> %A, <4 x half> %B) {
110 ; CHECK-LABEL: test14:
111 ; CHECK: vmaxnm.f16 d0, d0, d1
113 %tmp3 = fcmp fast uge <4 x half> %A, %B
114 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
118 define <4 x half> @test15(<4 x half> %A, <4 x half> %B) {
119 ; CHECK-LABEL: test15:
120 ; CHECK: vminnm.f16 d0, d0, d1
122 %tmp3 = fcmp fast ult <4 x half> %A, %B
123 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
127 define <4 x half> @test16(<4 x half> %A, <4 x half> %B) {
128 ; CHECK-LABEL: test16:
129 ; CHECK: vmaxnm.f16 d0, d0, d1
131 %tmp3 = fcmp fast ult <4 x half> %A, %B
132 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
136 define <4 x half> @test17(<4 x half> %A, <4 x half> %B) {
137 ; CHECK-LABEL: test17:
138 ; CHECK: vminnm.f16 d0, d0, d1
140 %tmp3 = fcmp fast ule <4 x half> %A, %B
141 %tmp4 = select <4 x i1> %tmp3, <4 x half> %A, <4 x half> %B
145 define <4 x half> @test18(<4 x half> %A, <4 x half> %B) {
146 ; CHECK-LABEL: test18:
147 ; CHECK: vmaxnm.f16 d0, d0, d1
149 %tmp3 = fcmp fast ule <4 x half> %A, %B
150 %tmp4 = select <4 x i1> %tmp3, <4 x half> %B, <4 x half> %A
158 define <8 x half> @test201(<8 x half> %A, <8 x half> %B) {
159 ; CHECK-LABEL: test201:
160 ; CHECK: vmaxnm.f16 q0, q0, q1
162 %tmp3 = fcmp fast ogt <8 x half> %A, %B
163 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
167 define <8 x half> @test202(<8 x half> %A, <8 x half> %B) {
168 ; CHECK-LABEL: test202:
169 ; CHECK: vminnm.f16 q0, q0, q1
171 %tmp3 = fcmp fast ogt <8 x half> %A, %B
172 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A
176 define <8 x half> @test203(<8 x half> %A, <8 x half> %B) {
177 ; CHECK-LABEL: test203:
178 ; CHECK: vmaxnm.f16 q0, q0, q1
180 %tmp3 = fcmp fast oge <8 x half> %A, %B
181 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
185 define <8 x half> @test204(<8 x half> %A, <8 x half> %B) {
186 ; CHECK-LABEL: test204:
187 ; CHECK: vminnm.f16 q0, q0, q1
189 %tmp3 = fcmp fast oge <8 x half> %A, %B
190 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A
194 define <8 x half> @test205(<8 x half> %A, <8 x half> %B) {
195 ; CHECK-LABEL: test205:
196 ; CHECK: vminnm.f16 q0, q0, q1
198 %tmp3 = fcmp fast olt <8 x half> %A, %B
199 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
203 define <8 x half> @test206(<8 x half> %A, <8 x half> %B) {
204 ; CHECK-LABEL: test206:
205 ; CHECK: vmaxnm.f16 q0, q0, q1
207 %tmp3 = fcmp fast olt <8 x half> %A, %B
208 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A
212 define <8 x half> @test207(<8 x half> %A, <8 x half> %B) {
213 ; CHECK-LABEL: test207:
214 ; CHECK: vminnm.f16 q0, q0, q1
216 %tmp3 = fcmp fast ole <8 x half> %A, %B
217 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
221 define <8 x half> @test208(<8 x half> %A, <8 x half> %B) {
222 ; CHECK-LABEL: test208:
223 ; CHECK: vmaxnm.f16 q0, q0, q1
225 %tmp3 = fcmp fast ole <8 x half> %A, %B
226 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A
232 define <8 x half> @test209(<8 x half> %A, <8 x half> %B) {
233 ; CHECK-LABEL: test209:
234 ; CHECK: vmaxnm.f16 q0, q0, q1
236 %tmp3 = fcmp fast ugt <8 x half> %A, %B
237 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
241 define <8 x half> @test210(<8 x half> %A, <8 x half> %B) {
242 ; CHECK-LABEL: test210:
243 ; CHECK: vminnm.f16 q0, q0, q1
245 %tmp3 = fcmp fast ugt <8 x half> %A, %B
246 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A
250 define <8 x half> @test211(<8 x half> %A, <8 x half> %B) {
251 ; CHECK-LABEL: test211:
252 ; CHECK: vmaxnm.f16 q0, q0, q1
254 %tmp3 = fcmp fast uge <8 x half> %A, %B
255 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
259 define <8 x half> @test214(<8 x half> %A, <8 x half> %B) {
260 ; CHECK-LABEL: test214:
261 ; CHECK: vminnm.f16 q0, q0, q1
263 %tmp3 = fcmp fast uge <8 x half> %A, %B
264 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A
268 define <8 x half> @test215(<8 x half> %A, <8 x half> %B) {
269 ; CHECK-LABEL: test215:
270 ; CHECK: vminnm.f16 q0, q0, q1
272 %tmp3 = fcmp fast ult <8 x half> %A, %B
273 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
277 define <8 x half> @test216(<8 x half> %A, <8 x half> %B) {
278 ; CHECK-LABEL: test216:
279 ; CHECK: vmaxnm.f16 q0, q0, q1
281 %tmp3 = fcmp fast ult <8 x half> %A, %B
282 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A
286 define <8 x half> @test217(<8 x half> %A, <8 x half> %B) {
287 ; CHECK-LABEL: test217:
288 ; CHECK: vminnm.f16 q0, q0, q1
290 %tmp3 = fcmp fast ule <8 x half> %A, %B
291 %tmp4 = select <8 x i1> %tmp3, <8 x half> %A, <8 x half> %B
295 define <8 x half> @test218(<8 x half> %A, <8 x half> %B) {
296 ; CHECK-LABEL: test218:
297 ; CHECK: vmaxnm.f16 q0, q0, q1
299 %tmp3 = fcmp fast ule <8 x half> %A, %B
300 %tmp4 = select <8 x i1> %tmp3, <8 x half> %B, <8 x half> %A