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