1 ; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
3 define float @selectccaf(float, float, float, float) {
4 ; CHECK-LABEL: selectccaf:
6 ; CHECK-NEXT: or %s0, 0, %s3
7 ; CHECK-NEXT: b.l.t (, %s10)
8 %5 = fcmp false float %0, 0.0
9 %6 = select i1 %5, float %2, float %3
13 define float @selectccat(float, float, float, float) {
14 ; CHECK-LABEL: selectccat:
16 ; CHECK-NEXT: or %s0, 0, %s2
17 ; CHECK-NEXT: b.l.t (, %s10)
18 %5 = fcmp true float %0, 0.0
19 %6 = select i1 %5, float %2, float %3
23 define float @selectccoeq(float, float, float, float) {
24 ; CHECK-LABEL: selectccoeq:
26 ; CHECK-NEXT: lea.sl %s1, 0
27 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
28 ; CHECK-NEXT: cmov.s.eq %s3, %s2, %s0
29 ; CHECK-NEXT: or %s0, 0, %s3
30 ; CHECK-NEXT: b.l.t (, %s10)
31 %5 = fcmp oeq float %0, 0.0
32 %6 = select i1 %5, float %2, float %3
36 define float @selectccone(float, float, float, float) {
37 ; CHECK-LABEL: selectccone:
39 ; CHECK-NEXT: lea.sl %s1, 0
40 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
41 ; CHECK-NEXT: cmov.s.ne %s3, %s2, %s0
42 ; CHECK-NEXT: or %s0, 0, %s3
43 ; CHECK-NEXT: b.l.t (, %s10)
44 %5 = fcmp one float %0, 0.0
45 %6 = select i1 %5, float %2, float %3
49 define float @selectccogt(float, float, float, float) {
50 ; CHECK-LABEL: selectccogt:
52 ; CHECK-NEXT: lea.sl %s1, 0
53 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
54 ; CHECK-NEXT: cmov.s.gt %s3, %s2, %s0
55 ; CHECK-NEXT: or %s0, 0, %s3
56 ; CHECK-NEXT: b.l.t (, %s10)
57 %5 = fcmp ogt float %0, 0.0
58 %6 = select i1 %5, float %2, float %3
62 define float @selectccoge(float, float, float, float) {
63 ; CHECK-LABEL: selectccoge:
65 ; CHECK-NEXT: lea.sl %s1, 0
66 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
67 ; CHECK-NEXT: cmov.s.ge %s3, %s2, %s0
68 ; CHECK-NEXT: or %s0, 0, %s3
69 ; CHECK-NEXT: b.l.t (, %s10)
70 %5 = fcmp oge float %0, 0.0
71 %6 = select i1 %5, float %2, float %3
75 define float @selectccolt(float, float, float, float) {
76 ; CHECK-LABEL: selectccolt:
78 ; CHECK-NEXT: lea.sl %s1, 0
79 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
80 ; CHECK-NEXT: cmov.s.lt %s3, %s2, %s0
81 ; CHECK-NEXT: or %s0, 0, %s3
82 ; CHECK-NEXT: b.l.t (, %s10)
83 %5 = fcmp olt float %0, 0.0
84 %6 = select i1 %5, float %2, float %3
88 define float @selectccole(float, float, float, float) {
89 ; CHECK-LABEL: selectccole:
91 ; CHECK-NEXT: lea.sl %s1, 0
92 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
93 ; CHECK-NEXT: cmov.s.le %s3, %s2, %s0
94 ; CHECK-NEXT: or %s0, 0, %s3
95 ; CHECK-NEXT: b.l.t (, %s10)
96 %5 = fcmp ole float %0, 0.0
97 %6 = select i1 %5, float %2, float %3
101 define float @selectccord(float, float, float, float) {
102 ; CHECK-LABEL: selectccord:
104 ; CHECK-NEXT: fcmp.s %s0, %s0, %s0
105 ; CHECK-NEXT: cmov.s.num %s3, %s2, %s0
106 ; CHECK-NEXT: or %s0, 0, %s3
107 ; CHECK-NEXT: b.l.t (, %s10)
108 %5 = fcmp ord float %0, 0.0
109 %6 = select i1 %5, float %2, float %3
113 define float @selectccuno(float, float, float, float) {
114 ; CHECK-LABEL: selectccuno:
116 ; CHECK-NEXT: fcmp.s %s0, %s0, %s0
117 ; CHECK-NEXT: cmov.s.nan %s3, %s2, %s0
118 ; CHECK-NEXT: or %s0, 0, %s3
119 ; CHECK-NEXT: b.l.t (, %s10)
120 %5 = fcmp uno float %0, 0.0
121 %6 = select i1 %5, float %2, float %3
125 define float @selectccueq(float, float, float, float) {
126 ; CHECK-LABEL: selectccueq:
128 ; CHECK-NEXT: lea.sl %s1, 0
129 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
130 ; CHECK-NEXT: cmov.s.eqnan %s3, %s2, %s0
131 ; CHECK-NEXT: or %s0, 0, %s3
132 ; CHECK-NEXT: b.l.t (, %s10)
133 %5 = fcmp ueq float %0, 0.0
134 %6 = select i1 %5, float %2, float %3
138 define float @selectccune(float, float, float, float) {
139 ; CHECK-LABEL: selectccune:
141 ; CHECK-NEXT: lea.sl %s1, 0
142 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
143 ; CHECK-NEXT: cmov.s.nenan %s3, %s2, %s0
144 ; CHECK-NEXT: or %s0, 0, %s3
145 ; CHECK-NEXT: b.l.t (, %s10)
146 %5 = fcmp une float %0, 0.0
147 %6 = select i1 %5, float %2, float %3
151 define float @selectccugt(float, float, float, float) {
152 ; CHECK-LABEL: selectccugt:
154 ; CHECK-NEXT: lea.sl %s1, 0
155 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
156 ; CHECK-NEXT: cmov.s.gtnan %s3, %s2, %s0
157 ; CHECK-NEXT: or %s0, 0, %s3
158 ; CHECK-NEXT: b.l.t (, %s10)
159 %5 = fcmp ugt float %0, 0.0
160 %6 = select i1 %5, float %2, float %3
164 define float @selectccuge(float, float, float, float) {
165 ; CHECK-LABEL: selectccuge:
167 ; CHECK-NEXT: lea.sl %s1, 0
168 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
169 ; CHECK-NEXT: cmov.s.genan %s3, %s2, %s0
170 ; CHECK-NEXT: or %s0, 0, %s3
171 ; CHECK-NEXT: b.l.t (, %s10)
172 %5 = fcmp uge float %0, 0.0
173 %6 = select i1 %5, float %2, float %3
177 define float @selectccult(float, float, float, float) {
178 ; CHECK-LABEL: selectccult:
180 ; CHECK-NEXT: lea.sl %s1, 0
181 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
182 ; CHECK-NEXT: cmov.s.ltnan %s3, %s2, %s0
183 ; CHECK-NEXT: or %s0, 0, %s3
184 ; CHECK-NEXT: b.l.t (, %s10)
185 %5 = fcmp ult float %0, 0.0
186 %6 = select i1 %5, float %2, float %3
190 define float @selectccule(float, float, float, float) {
191 ; CHECK-LABEL: selectccule:
193 ; CHECK-NEXT: lea.sl %s1, 0
194 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
195 ; CHECK-NEXT: cmov.s.lenan %s3, %s2, %s0
196 ; CHECK-NEXT: or %s0, 0, %s3
197 ; CHECK-NEXT: b.l.t (, %s10)
198 %5 = fcmp ule float %0, 0.0
199 %6 = select i1 %5, float %2, float %3