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, %1
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, %1
19 %6 = select i1 %5, float %2, float %3
23 define float @selectccoeq(float, float, float, float) {
24 ; CHECK-LABEL: selectccoeq:
26 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
27 ; CHECK-NEXT: cmov.s.eq %s3, %s2, %s0
28 ; CHECK-NEXT: or %s0, 0, %s3
29 ; CHECK-NEXT: b.l.t (, %s10)
30 %5 = fcmp oeq float %0, %1
31 %6 = select i1 %5, float %2, float %3
35 define float @selectccone(float, float, float, float) {
36 ; CHECK-LABEL: selectccone:
38 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
39 ; CHECK-NEXT: cmov.s.ne %s3, %s2, %s0
40 ; CHECK-NEXT: or %s0, 0, %s3
41 ; CHECK-NEXT: b.l.t (, %s10)
42 %5 = fcmp one float %0, %1
43 %6 = select i1 %5, float %2, float %3
47 define float @selectccogt(float, float, float, float) {
48 ; CHECK-LABEL: selectccogt:
50 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
51 ; CHECK-NEXT: cmov.s.gt %s3, %s2, %s0
52 ; CHECK-NEXT: or %s0, 0, %s3
53 ; CHECK-NEXT: b.l.t (, %s10)
54 %5 = fcmp ogt float %0, %1
55 %6 = select i1 %5, float %2, float %3
59 define float @selectccoge(float, float, float, float) {
60 ; CHECK-LABEL: selectccoge:
62 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
63 ; CHECK-NEXT: cmov.s.ge %s3, %s2, %s0
64 ; CHECK-NEXT: or %s0, 0, %s3
65 ; CHECK-NEXT: b.l.t (, %s10)
66 %5 = fcmp oge float %0, %1
67 %6 = select i1 %5, float %2, float %3
71 define float @selectccolt(float, float, float, float) {
72 ; CHECK-LABEL: selectccolt:
74 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
75 ; CHECK-NEXT: cmov.s.lt %s3, %s2, %s0
76 ; CHECK-NEXT: or %s0, 0, %s3
77 ; CHECK-NEXT: b.l.t (, %s10)
78 %5 = fcmp olt float %0, %1
79 %6 = select i1 %5, float %2, float %3
83 define float @selectccole(float, float, float, float) {
84 ; CHECK-LABEL: selectccole:
86 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
87 ; CHECK-NEXT: cmov.s.le %s3, %s2, %s0
88 ; CHECK-NEXT: or %s0, 0, %s3
89 ; CHECK-NEXT: b.l.t (, %s10)
90 %5 = fcmp ole float %0, %1
91 %6 = select i1 %5, float %2, float %3
95 define float @selectccord(float, float, float, float) {
96 ; CHECK-LABEL: selectccord:
98 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
99 ; CHECK-NEXT: cmov.s.num %s3, %s2, %s0
100 ; CHECK-NEXT: or %s0, 0, %s3
101 ; CHECK-NEXT: b.l.t (, %s10)
102 %5 = fcmp ord float %0, %1
103 %6 = select i1 %5, float %2, float %3
107 define float @selectccuno(float, float, float, float) {
108 ; CHECK-LABEL: selectccuno:
110 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
111 ; CHECK-NEXT: cmov.s.nan %s3, %s2, %s0
112 ; CHECK-NEXT: or %s0, 0, %s3
113 ; CHECK-NEXT: b.l.t (, %s10)
114 %5 = fcmp uno float %0, %1
115 %6 = select i1 %5, float %2, float %3
119 define float @selectccueq(float, float, float, float) {
120 ; CHECK-LABEL: selectccueq:
122 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
123 ; CHECK-NEXT: cmov.s.eqnan %s3, %s2, %s0
124 ; CHECK-NEXT: or %s0, 0, %s3
125 ; CHECK-NEXT: b.l.t (, %s10)
126 %5 = fcmp ueq float %0, %1
127 %6 = select i1 %5, float %2, float %3
131 define float @selectccune(float, float, float, float) {
132 ; CHECK-LABEL: selectccune:
134 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
135 ; CHECK-NEXT: cmov.s.nenan %s3, %s2, %s0
136 ; CHECK-NEXT: or %s0, 0, %s3
137 ; CHECK-NEXT: b.l.t (, %s10)
138 %5 = fcmp une float %0, %1
139 %6 = select i1 %5, float %2, float %3
143 define float @selectccugt(float, float, float, float) {
144 ; CHECK-LABEL: selectccugt:
146 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
147 ; CHECK-NEXT: cmov.s.gtnan %s3, %s2, %s0
148 ; CHECK-NEXT: or %s0, 0, %s3
149 ; CHECK-NEXT: b.l.t (, %s10)
150 %5 = fcmp ugt float %0, %1
151 %6 = select i1 %5, float %2, float %3
155 define float @selectccuge(float, float, float, float) {
156 ; CHECK-LABEL: selectccuge:
158 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
159 ; CHECK-NEXT: cmov.s.genan %s3, %s2, %s0
160 ; CHECK-NEXT: or %s0, 0, %s3
161 ; CHECK-NEXT: b.l.t (, %s10)
162 %5 = fcmp uge float %0, %1
163 %6 = select i1 %5, float %2, float %3
167 define float @selectccult(float, float, float, float) {
168 ; CHECK-LABEL: selectccult:
170 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
171 ; CHECK-NEXT: cmov.s.ltnan %s3, %s2, %s0
172 ; CHECK-NEXT: or %s0, 0, %s3
173 ; CHECK-NEXT: b.l.t (, %s10)
174 %5 = fcmp ult float %0, %1
175 %6 = select i1 %5, float %2, float %3
179 define float @selectccule(float, float, float, float) {
180 ; CHECK-LABEL: selectccule:
182 ; CHECK-NEXT: fcmp.s %s0, %s0, %s1
183 ; CHECK-NEXT: cmov.s.lenan %s3, %s2, %s0
184 ; CHECK-NEXT: or %s0, 0, %s3
185 ; CHECK-NEXT: b.l.t (, %s10)
186 %5 = fcmp ule float %0, %1
187 %6 = select i1 %5, float %2, float %3