1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=hexagon -mattr=+hvxv69,+hvx-length128b,+hvx-qfloat < %s | FileCheck %s
3 ; RUN: llc -march=hexagon -mattr=+hvxv69,+hvx-length128b,+hvx-ieee-fp < %s | FileCheck %s
7 define <64 x half> @test_00(<64 x half> %v0, <64 x half> %v1) #0 {
8 ; CHECK-LABEL: test_00:
11 ; CHECK-NEXT: v0.hf = vmin(v1.hf,v0.hf)
12 ; CHECK-NEXT: jumpr r31
14 %t0 = fcmp olt <64 x half> %v0, %v1
15 %t1 = select <64 x i1> %t0, <64 x half> %v0, <64 x half> %v1
19 define <64 x half> @test_01(<64 x half> %v0, <64 x half> %v1) #0 {
20 ; CHECK-LABEL: test_01:
23 ; CHECK-NEXT: q0 = vcmp.gt(v0.hf,v1.hf)
26 ; CHECK-NEXT: v0 = vmux(q0,v1,v0)
27 ; CHECK-NEXT: jumpr r31
29 %t0 = fcmp ole <64 x half> %v0, %v1
30 %t1 = select <64 x i1> %t0, <64 x half> %v0, <64 x half> %v1
34 define <64 x half> @test_02(<64 x half> %v0, <64 x half> %v1) #0 {
35 ; CHECK-LABEL: test_02:
38 ; CHECK-NEXT: v0.hf = vmin(v0.hf,v1.hf)
39 ; CHECK-NEXT: jumpr r31
41 %t0 = fcmp ogt <64 x half> %v0, %v1
42 %t1 = select <64 x i1> %t0, <64 x half> %v1, <64 x half> %v0
46 define <64 x half> @test_03(<64 x half> %v0, <64 x half> %v1) #0 {
47 ; CHECK-LABEL: test_03:
50 ; CHECK-NEXT: q0 = vcmp.gt(v1.hf,v0.hf)
53 ; CHECK-NEXT: v0 = vmux(q0,v0,v1)
54 ; CHECK-NEXT: jumpr r31
56 %t0 = fcmp oge <64 x half> %v0, %v1
57 %t1 = select <64 x i1> %t0, <64 x half> %v1, <64 x half> %v0
61 define <32 x float> @test_10(<32 x float> %v0, <32 x float> %v1) #0 {
62 ; CHECK-LABEL: test_10:
65 ; CHECK-NEXT: v0.sf = vmin(v1.sf,v0.sf)
66 ; CHECK-NEXT: jumpr r31
68 %t0 = fcmp olt <32 x float> %v0, %v1
69 %t1 = select <32 x i1> %t0, <32 x float> %v0, <32 x float> %v1
73 define <32 x float> @test_11(<32 x float> %v0, <32 x float> %v1) #0 {
74 ; CHECK-LABEL: test_11:
77 ; CHECK-NEXT: q0 = vcmp.gt(v0.sf,v1.sf)
80 ; CHECK-NEXT: v0 = vmux(q0,v1,v0)
81 ; CHECK-NEXT: jumpr r31
83 %t0 = fcmp ole <32 x float> %v0, %v1
84 %t1 = select <32 x i1> %t0, <32 x float> %v0, <32 x float> %v1
88 define <32 x float> @test_12(<32 x float> %v0, <32 x float> %v1) #0 {
89 ; CHECK-LABEL: test_12:
92 ; CHECK-NEXT: v0.sf = vmin(v0.sf,v1.sf)
93 ; CHECK-NEXT: jumpr r31
95 %t0 = fcmp ogt <32 x float> %v0, %v1
96 %t1 = select <32 x i1> %t0, <32 x float> %v1, <32 x float> %v0
100 define <32 x float> @test_13(<32 x float> %v0, <32 x float> %v1) #0 {
101 ; CHECK-LABEL: test_13:
104 ; CHECK-NEXT: q0 = vcmp.gt(v1.sf,v0.sf)
107 ; CHECK-NEXT: v0 = vmux(q0,v0,v1)
108 ; CHECK-NEXT: jumpr r31
110 %t0 = fcmp oge <32 x float> %v0, %v1
111 %t1 = select <32 x i1> %t0, <32 x float> %v1, <32 x float> %v0
117 define <64 x half> @test_20(<64 x half> %v0, <64 x half> %v1) #0 {
118 ; CHECK-LABEL: test_20:
121 ; CHECK-NEXT: v0.hf = vmax(v1.hf,v0.hf)
122 ; CHECK-NEXT: jumpr r31
124 %t0 = fcmp olt <64 x half> %v0, %v1
125 %t1 = select <64 x i1> %t0, <64 x half> %v1, <64 x half> %v0
129 define <64 x half> @test_21(<64 x half> %v0, <64 x half> %v1) #0 {
130 ; CHECK-LABEL: test_21:
133 ; CHECK-NEXT: q0 = vcmp.gt(v0.hf,v1.hf)
136 ; CHECK-NEXT: v0 = vmux(q0,v0,v1)
137 ; CHECK-NEXT: jumpr r31
139 %t0 = fcmp ole <64 x half> %v0, %v1
140 %t1 = select <64 x i1> %t0, <64 x half> %v1, <64 x half> %v0
144 define <64 x half> @test_22(<64 x half> %v0, <64 x half> %v1) #0 {
145 ; CHECK-LABEL: test_22:
148 ; CHECK-NEXT: v0.hf = vmax(v0.hf,v1.hf)
149 ; CHECK-NEXT: jumpr r31
151 %t0 = fcmp ogt <64 x half> %v0, %v1
152 %t1 = select <64 x i1> %t0, <64 x half> %v0, <64 x half> %v1
156 define <64 x half> @test_23(<64 x half> %v0, <64 x half> %v1) #0 {
157 ; CHECK-LABEL: test_23:
160 ; CHECK-NEXT: q0 = vcmp.gt(v1.hf,v0.hf)
163 ; CHECK-NEXT: v0 = vmux(q0,v1,v0)
164 ; CHECK-NEXT: jumpr r31
166 %t0 = fcmp oge <64 x half> %v0, %v1
167 %t1 = select <64 x i1> %t0, <64 x half> %v0, <64 x half> %v1
171 define <32 x float> @test_30(<32 x float> %v0, <32 x float> %v1) #0 {
172 ; CHECK-LABEL: test_30:
175 ; CHECK-NEXT: v0.sf = vmax(v1.sf,v0.sf)
176 ; CHECK-NEXT: jumpr r31
178 %t0 = fcmp olt <32 x float> %v0, %v1
179 %t1 = select <32 x i1> %t0, <32 x float> %v1, <32 x float> %v0
183 define <32 x float> @test_31(<32 x float> %v0, <32 x float> %v1) #0 {
184 ; CHECK-LABEL: test_31:
187 ; CHECK-NEXT: q0 = vcmp.gt(v0.sf,v1.sf)
190 ; CHECK-NEXT: v0 = vmux(q0,v0,v1)
191 ; CHECK-NEXT: jumpr r31
193 %t0 = fcmp ole <32 x float> %v0, %v1
194 %t1 = select <32 x i1> %t0, <32 x float> %v1, <32 x float> %v0
198 define <32 x float> @test_32(<32 x float> %v0, <32 x float> %v1) #0 {
199 ; CHECK-LABEL: test_32:
202 ; CHECK-NEXT: v0.sf = vmax(v0.sf,v1.sf)
203 ; CHECK-NEXT: jumpr r31
205 %t0 = fcmp ogt <32 x float> %v0, %v1
206 %t1 = select <32 x i1> %t0, <32 x float> %v0, <32 x float> %v1
210 define <32 x float> @test_33(<32 x float> %v0, <32 x float> %v1) #0 {
211 ; CHECK-LABEL: test_33:
214 ; CHECK-NEXT: q0 = vcmp.gt(v1.sf,v0.sf)
217 ; CHECK-NEXT: v0 = vmux(q0,v1,v0)
218 ; CHECK-NEXT: jumpr r31
220 %t0 = fcmp oge <32 x float> %v0, %v1
221 %t1 = select <32 x i1> %t0, <32 x float> %v0, <32 x float> %v1
225 attributes #0 = { readnone nounwind "target-cpu"="hexagonv69" }