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