1 ; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
3 define zeroext i1 @setccaf(double, double) {
4 ; CHECK-LABEL: setccaf:
6 ; CHECK-NEXT: or %s0, 0, (0)1
7 ; CHECK-NEXT: b.l.t (, %s10)
8 %3 = fcmp false double %0, 0.0
12 define zeroext i1 @setccat(double, double) {
13 ; CHECK-LABEL: setccat:
15 ; CHECK-NEXT: or %s0, 1, (0)1
16 ; CHECK-NEXT: b.l.t (, %s10)
17 %3 = fcmp true double %0, 0.0
21 define zeroext i1 @setccoeq(double, double) {
22 ; CHECK-LABEL: setccoeq:
24 ; CHECK-NEXT: lea.sl %s1, 0
25 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
26 ; CHECK-NEXT: or %s1, 0, (0)1
27 ; CHECK-NEXT: cmov.d.eq %s1, (63)0, %s0
28 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
29 ; CHECK-NEXT: b.l.t (, %s10)
30 %3 = fcmp oeq double %0, 0.0
34 define zeroext i1 @setccone(double, double) {
35 ; CHECK-LABEL: setccone:
37 ; CHECK-NEXT: lea.sl %s1, 0
38 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
39 ; CHECK-NEXT: or %s1, 0, (0)1
40 ; CHECK-NEXT: cmov.d.ne %s1, (63)0, %s0
41 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
42 ; CHECK-NEXT: b.l.t (, %s10)
43 %3 = fcmp one double %0, 0.0
47 define zeroext i1 @setccogt(double, double) {
48 ; CHECK-LABEL: setccogt:
50 ; CHECK-NEXT: lea.sl %s1, 0
51 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
52 ; CHECK-NEXT: or %s1, 0, (0)1
53 ; CHECK-NEXT: cmov.d.gt %s1, (63)0, %s0
54 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
55 ; CHECK-NEXT: b.l.t (, %s10)
56 %3 = fcmp ogt double %0, 0.0
60 define zeroext i1 @setccoge(double, double) {
61 ; CHECK-LABEL: setccoge:
63 ; CHECK-NEXT: lea.sl %s1, 0
64 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
65 ; CHECK-NEXT: or %s1, 0, (0)1
66 ; CHECK-NEXT: cmov.d.ge %s1, (63)0, %s0
67 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
68 ; CHECK-NEXT: b.l.t (, %s10)
69 %3 = fcmp oge double %0, 0.0
73 define zeroext i1 @setccolt(double, double) {
74 ; CHECK-LABEL: setccolt:
76 ; CHECK-NEXT: lea.sl %s1, 0
77 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
78 ; CHECK-NEXT: or %s1, 0, (0)1
79 ; CHECK-NEXT: cmov.d.lt %s1, (63)0, %s0
80 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
81 ; CHECK-NEXT: b.l.t (, %s10)
82 %3 = fcmp olt double %0, 0.0
86 define zeroext i1 @setccole(double, double) {
87 ; CHECK-LABEL: setccole:
89 ; CHECK-NEXT: lea.sl %s1, 0
90 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
91 ; CHECK-NEXT: or %s1, 0, (0)1
92 ; CHECK-NEXT: cmov.d.le %s1, (63)0, %s0
93 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
94 ; CHECK-NEXT: b.l.t (, %s10)
95 %3 = fcmp ole double %0, 0.0
99 define zeroext i1 @setccord(double, double) {
100 ; CHECK-LABEL: setccord:
102 ; CHECK-NEXT: fcmp.d %s0, %s0, %s0
103 ; CHECK-NEXT: or %s1, 0, (0)1
104 ; CHECK-NEXT: cmov.d.num %s1, (63)0, %s0
105 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
106 ; CHECK-NEXT: b.l.t (, %s10)
107 %3 = fcmp ord double %0, 0.0
111 define zeroext i1 @setccuno(double, double) {
112 ; CHECK-LABEL: setccuno:
114 ; CHECK-NEXT: fcmp.d %s0, %s0, %s0
115 ; CHECK-NEXT: or %s1, 0, (0)1
116 ; CHECK-NEXT: cmov.d.nan %s1, (63)0, %s0
117 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
118 ; CHECK-NEXT: b.l.t (, %s10)
119 %3 = fcmp uno double %0, 0.0
123 define zeroext i1 @setccueq(double, double) {
124 ; CHECK-LABEL: setccueq:
126 ; CHECK-NEXT: lea.sl %s1, 0
127 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
128 ; CHECK-NEXT: or %s1, 0, (0)1
129 ; CHECK-NEXT: cmov.d.eqnan %s1, (63)0, %s0
130 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
131 ; CHECK-NEXT: b.l.t (, %s10)
132 %3 = fcmp ueq double %0, 0.0
136 define zeroext i1 @setccune(double, double) {
137 ; CHECK-LABEL: setccune:
139 ; CHECK-NEXT: lea.sl %s1, 0
140 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
141 ; CHECK-NEXT: or %s1, 0, (0)1
142 ; CHECK-NEXT: cmov.d.nenan %s1, (63)0, %s0
143 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
144 ; CHECK-NEXT: b.l.t (, %s10)
145 %3 = fcmp une double %0, 0.0
149 define zeroext i1 @setccugt(double, double) {
150 ; CHECK-LABEL: setccugt:
152 ; CHECK-NEXT: lea.sl %s1, 0
153 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
154 ; CHECK-NEXT: or %s1, 0, (0)1
155 ; CHECK-NEXT: cmov.d.gtnan %s1, (63)0, %s0
156 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
157 ; CHECK-NEXT: b.l.t (, %s10)
158 %3 = fcmp ugt double %0, 0.0
162 define zeroext i1 @setccuge(double, double) {
163 ; CHECK-LABEL: setccuge:
165 ; CHECK-NEXT: lea.sl %s1, 0
166 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
167 ; CHECK-NEXT: or %s1, 0, (0)1
168 ; CHECK-NEXT: cmov.d.genan %s1, (63)0, %s0
169 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
170 ; CHECK-NEXT: b.l.t (, %s10)
171 %3 = fcmp uge double %0, 0.0
175 define zeroext i1 @setccult(double, double) {
176 ; CHECK-LABEL: setccult:
178 ; CHECK-NEXT: lea.sl %s1, 0
179 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
180 ; CHECK-NEXT: or %s1, 0, (0)1
181 ; CHECK-NEXT: cmov.d.ltnan %s1, (63)0, %s0
182 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
183 ; CHECK-NEXT: b.l.t (, %s10)
184 %3 = fcmp ult double %0, 0.0
188 define zeroext i1 @setccule(double, double) {
189 ; CHECK-LABEL: setccule:
191 ; CHECK-NEXT: lea.sl %s1, 0
192 ; CHECK-NEXT: fcmp.d %s0, %s0, %s1
193 ; CHECK-NEXT: or %s1, 0, (0)1
194 ; CHECK-NEXT: cmov.d.lenan %s1, (63)0, %s0
195 ; CHECK-NEXT: adds.w.zx %s0, %s1, (0)1
196 ; CHECK-NEXT: b.l.t (, %s10)
197 %3 = fcmp ule double %0, 0.0