1; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
2
3define double @selectccaf(double, double, double, double) {
4; CHECK-LABEL: selectccaf:
5; CHECK:       # %bb.0:
6; CHECK-NEXT:    or %s0, 0, %s3
7; CHECK-NEXT:    b.l.t (, %s10)
8  %5 = fcmp false double %0, %1
9  %6 = select i1 %5, double %2, double %3
10  ret double %6
11}
12
13define double @selectccat(double, double, double, double) {
14; CHECK-LABEL: selectccat:
15; CHECK:       # %bb.0:
16; CHECK-NEXT:    or %s0, 0, %s2
17; CHECK-NEXT:    b.l.t (, %s10)
18  %5 = fcmp true double %0, %1
19  %6 = select i1 %5, double %2, double %3
20  ret double %6
21}
22
23define double @selectccoeq(double, double, double, double) {
24; CHECK-LABEL: selectccoeq:
25; CHECK:       # %bb.0:
26; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
27; CHECK-NEXT:    cmov.d.eq %s3, %s2, %s0
28; CHECK-NEXT:    or %s0, 0, %s3
29; CHECK-NEXT:    b.l.t (, %s10)
30  %5 = fcmp oeq double %0, %1
31  %6 = select i1 %5, double %2, double %3
32  ret double %6
33}
34
35define double @selectccone(double, double, double, double) {
36; CHECK-LABEL: selectccone:
37; CHECK:       # %bb.0:
38; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
39; CHECK-NEXT:    cmov.d.ne %s3, %s2, %s0
40; CHECK-NEXT:    or %s0, 0, %s3
41; CHECK-NEXT:    b.l.t (, %s10)
42  %5 = fcmp one double %0, %1
43  %6 = select i1 %5, double %2, double %3
44  ret double %6
45}
46
47define double @selectccogt(double, double, double, double) {
48; CHECK-LABEL: selectccogt:
49; CHECK:       # %bb.0:
50; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
51; CHECK-NEXT:    cmov.d.gt %s3, %s2, %s0
52; CHECK-NEXT:    or %s0, 0, %s3
53; CHECK-NEXT:    b.l.t (, %s10)
54  %5 = fcmp ogt double %0, %1
55  %6 = select i1 %5, double %2, double %3
56  ret double %6
57}
58
59define double @selectccoge(double, double, double, double) {
60; CHECK-LABEL: selectccoge:
61; CHECK:       # %bb.0:
62; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
63; CHECK-NEXT:    cmov.d.ge %s3, %s2, %s0
64; CHECK-NEXT:    or %s0, 0, %s3
65; CHECK-NEXT:    b.l.t (, %s10)
66  %5 = fcmp oge double %0, %1
67  %6 = select i1 %5, double %2, double %3
68  ret double %6
69}
70
71define double @selectccolt(double, double, double, double) {
72; CHECK-LABEL: selectccolt:
73; CHECK:       # %bb.0:
74; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
75; CHECK-NEXT:    cmov.d.lt %s3, %s2, %s0
76; CHECK-NEXT:    or %s0, 0, %s3
77; CHECK-NEXT:    b.l.t (, %s10)
78  %5 = fcmp olt double %0, %1
79  %6 = select i1 %5, double %2, double %3
80  ret double %6
81}
82
83define double @selectccole(double, double, double, double) {
84; CHECK-LABEL: selectccole:
85; CHECK:       # %bb.0:
86; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
87; CHECK-NEXT:    cmov.d.le %s3, %s2, %s0
88; CHECK-NEXT:    or %s0, 0, %s3
89; CHECK-NEXT:    b.l.t (, %s10)
90  %5 = fcmp ole double %0, %1
91  %6 = select i1 %5, double %2, double %3
92  ret double %6
93}
94
95define double @selectccord(double, double, double, double) {
96; CHECK-LABEL: selectccord:
97; CHECK:       # %bb.0:
98; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
99; CHECK-NEXT:    cmov.d.num %s3, %s2, %s0
100; CHECK-NEXT:    or %s0, 0, %s3
101; CHECK-NEXT:    b.l.t (, %s10)
102  %5 = fcmp ord double %0, %1
103  %6 = select i1 %5, double %2, double %3
104  ret double %6
105}
106
107define double @selectccuno(double, double, double, double) {
108; CHECK-LABEL: selectccuno:
109; CHECK:       # %bb.0:
110; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
111; CHECK-NEXT:    cmov.d.nan %s3, %s2, %s0
112; CHECK-NEXT:    or %s0, 0, %s3
113; CHECK-NEXT:    b.l.t (, %s10)
114  %5 = fcmp uno double %0, %1
115  %6 = select i1 %5, double %2, double %3
116  ret double %6
117}
118
119define double @selectccueq(double, double, double, double) {
120; CHECK-LABEL: selectccueq:
121; CHECK:       # %bb.0:
122; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
123; CHECK-NEXT:    cmov.d.eqnan %s3, %s2, %s0
124; CHECK-NEXT:    or %s0, 0, %s3
125; CHECK-NEXT:    b.l.t (, %s10)
126  %5 = fcmp ueq double %0, %1
127  %6 = select i1 %5, double %2, double %3
128  ret double %6
129}
130
131define double @selectccune(double, double, double, double) {
132; CHECK-LABEL: selectccune:
133; CHECK:       # %bb.0:
134; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
135; CHECK-NEXT:    cmov.d.nenan %s3, %s2, %s0
136; CHECK-NEXT:    or %s0, 0, %s3
137; CHECK-NEXT:    b.l.t (, %s10)
138  %5 = fcmp une double %0, %1
139  %6 = select i1 %5, double %2, double %3
140  ret double %6
141}
142
143define double @selectccugt(double, double, double, double) {
144; CHECK-LABEL: selectccugt:
145; CHECK:       # %bb.0:
146; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
147; CHECK-NEXT:    cmov.d.gtnan %s3, %s2, %s0
148; CHECK-NEXT:    or %s0, 0, %s3
149; CHECK-NEXT:    b.l.t (, %s10)
150  %5 = fcmp ugt double %0, %1
151  %6 = select i1 %5, double %2, double %3
152  ret double %6
153}
154
155define double @selectccuge(double, double, double, double) {
156; CHECK-LABEL: selectccuge:
157; CHECK:       # %bb.0:
158; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
159; CHECK-NEXT:    cmov.d.genan %s3, %s2, %s0
160; CHECK-NEXT:    or %s0, 0, %s3
161; CHECK-NEXT:    b.l.t (, %s10)
162  %5 = fcmp uge double %0, %1
163  %6 = select i1 %5, double %2, double %3
164  ret double %6
165}
166
167define double @selectccult(double, double, double, double) {
168; CHECK-LABEL: selectccult:
169; CHECK:       # %bb.0:
170; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
171; CHECK-NEXT:    cmov.d.ltnan %s3, %s2, %s0
172; CHECK-NEXT:    or %s0, 0, %s3
173; CHECK-NEXT:    b.l.t (, %s10)
174  %5 = fcmp ult double %0, %1
175  %6 = select i1 %5, double %2, double %3
176  ret double %6
177}
178
179define double @selectccule(double, double, double, double) {
180; CHECK-LABEL: selectccule:
181; CHECK:       # %bb.0:
182; CHECK-NEXT:    fcmp.d %s0, %s0, %s1
183; CHECK-NEXT:    cmov.d.lenan %s3, %s2, %s0
184; CHECK-NEXT:    or %s0, 0, %s3
185; CHECK-NEXT:    b.l.t (, %s10)
186  %5 = fcmp ule double %0, %1
187  %6 = select i1 %5, double %2, double %3
188  ret double %6
189}
190