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: cmov.d.eq %s3, %s2, %s0
27 ; CHECK-NEXT: or %s0, 0, %s3
28 ; CHECK-NEXT: b.l.t (, %s10)
29 %5 = fcmp oeq double %0, 0.0
30 %6 = select i1 %5, double %2, double %3
34 define double @selectccone(double, double, double, double) {
35 ; CHECK-LABEL: selectccone:
37 ; CHECK-NEXT: cmov.d.ne %s3, %s2, %s0
38 ; CHECK-NEXT: or %s0, 0, %s3
39 ; CHECK-NEXT: b.l.t (, %s10)
40 %5 = fcmp one double %0, 0.0
41 %6 = select i1 %5, double %2, double %3
45 define double @selectccogt(double, double, double, double) {
46 ; CHECK-LABEL: selectccogt:
48 ; CHECK-NEXT: cmov.d.gt %s3, %s2, %s0
49 ; CHECK-NEXT: or %s0, 0, %s3
50 ; CHECK-NEXT: b.l.t (, %s10)
51 %5 = fcmp ogt double %0, 0.0
52 %6 = select i1 %5, double %2, double %3
56 define double @selectccoge(double, double, double, double) {
57 ; CHECK-LABEL: selectccoge:
59 ; CHECK-NEXT: cmov.d.ge %s3, %s2, %s0
60 ; CHECK-NEXT: or %s0, 0, %s3
61 ; CHECK-NEXT: b.l.t (, %s10)
62 %5 = fcmp oge double %0, 0.0
63 %6 = select i1 %5, double %2, double %3
67 define double @selectccolt(double, double, double, double) {
68 ; CHECK-LABEL: selectccolt:
70 ; CHECK-NEXT: cmov.d.lt %s3, %s2, %s0
71 ; CHECK-NEXT: or %s0, 0, %s3
72 ; CHECK-NEXT: b.l.t (, %s10)
73 %5 = fcmp olt double %0, 0.0
74 %6 = select i1 %5, double %2, double %3
78 define double @selectccole(double, double, double, double) {
79 ; CHECK-LABEL: selectccole:
81 ; CHECK-NEXT: cmov.d.le %s3, %s2, %s0
82 ; CHECK-NEXT: or %s0, 0, %s3
83 ; CHECK-NEXT: b.l.t (, %s10)
84 %5 = fcmp ole double %0, 0.0
85 %6 = select i1 %5, double %2, double %3
89 define double @selectccord(double, double, double, double) {
90 ; CHECK-LABEL: selectccord:
92 ; CHECK-NEXT: fcmp.d %s0, %s0, %s0
93 ; CHECK-NEXT: cmov.d.num %s3, %s2, %s0
94 ; CHECK-NEXT: or %s0, 0, %s3
95 ; CHECK-NEXT: b.l.t (, %s10)
96 %5 = fcmp ord double %0, 0.0
97 %6 = select i1 %5, double %2, double %3
101 define double @selectccuno(double, double, double, double) {
102 ; CHECK-LABEL: selectccuno:
104 ; CHECK-NEXT: fcmp.d %s0, %s0, %s0
105 ; CHECK-NEXT: cmov.d.nan %s3, %s2, %s0
106 ; CHECK-NEXT: or %s0, 0, %s3
107 ; CHECK-NEXT: b.l.t (, %s10)
108 %5 = fcmp uno double %0, 0.0
109 %6 = select i1 %5, double %2, double %3
113 define double @selectccueq(double, double, double, double) {
114 ; CHECK-LABEL: selectccueq:
116 ; CHECK-NEXT: cmov.d.eqnan %s3, %s2, %s0
117 ; CHECK-NEXT: or %s0, 0, %s3
118 ; CHECK-NEXT: b.l.t (, %s10)
119 %5 = fcmp ueq double %0, 0.0
120 %6 = select i1 %5, double %2, double %3
124 define double @selectccune(double, double, double, double) {
125 ; CHECK-LABEL: selectccune:
127 ; CHECK-NEXT: cmov.d.nenan %s3, %s2, %s0
128 ; CHECK-NEXT: or %s0, 0, %s3
129 ; CHECK-NEXT: b.l.t (, %s10)
130 %5 = fcmp une double %0, 0.0
131 %6 = select i1 %5, double %2, double %3
135 define double @selectccugt(double, double, double, double) {
136 ; CHECK-LABEL: selectccugt:
138 ; CHECK-NEXT: cmov.d.gtnan %s3, %s2, %s0
139 ; CHECK-NEXT: or %s0, 0, %s3
140 ; CHECK-NEXT: b.l.t (, %s10)
141 %5 = fcmp ugt double %0, 0.0
142 %6 = select i1 %5, double %2, double %3
146 define double @selectccuge(double, double, double, double) {
147 ; CHECK-LABEL: selectccuge:
149 ; CHECK-NEXT: cmov.d.genan %s3, %s2, %s0
150 ; CHECK-NEXT: or %s0, 0, %s3
151 ; CHECK-NEXT: b.l.t (, %s10)
152 %5 = fcmp uge double %0, 0.0
153 %6 = select i1 %5, double %2, double %3
157 define double @selectccult(double, double, double, double) {
158 ; CHECK-LABEL: selectccult:
160 ; CHECK-NEXT: cmov.d.ltnan %s3, %s2, %s0
161 ; CHECK-NEXT: or %s0, 0, %s3
162 ; CHECK-NEXT: b.l.t (, %s10)
163 %5 = fcmp ult double %0, 0.0
164 %6 = select i1 %5, double %2, double %3
168 define double @selectccule(double, double, double, double) {
169 ; CHECK-LABEL: selectccule:
171 ; CHECK-NEXT: cmov.d.lenan %s3, %s2, %s0
172 ; CHECK-NEXT: or %s0, 0, %s3
173 ; CHECK-NEXT: b.l.t (, %s10)
174 %5 = fcmp ule double %0, 0.0
175 %6 = select i1 %5, double %2, double %3