llvm.org GIT mirror llvm / e243598
[GlobalIsel][X86] Support for G_FCMP Differential Revision: https://reviews.llvm.org/D49172 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341193 91177308-0d34-0410-b5e6-96231b3b80d8 Alexander Ivchenko 1 year, 11 months ago
6 changed file(s) with 3917 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8888 MachineFunction &MF) const;
8989 bool selectCmp(MachineInstr &I, MachineRegisterInfo &MRI,
9090 MachineFunction &MF) const;
91 bool selectFCmp(MachineInstr &I, MachineRegisterInfo &MRI,
92 MachineFunction &MF) const;
9193 bool selectUadde(MachineInstr &I, MachineRegisterInfo &MRI,
9294 MachineFunction &MF) const;
9395 bool selectCopy(MachineInstr &I, MachineRegisterInfo &MRI) const;
361363 return selectAnyext(I, MRI, MF);
362364 case TargetOpcode::G_ICMP:
363365 return selectCmp(I, MRI, MF);
366 case TargetOpcode::G_FCMP:
367 return selectFCmp(I, MRI, MF);
364368 case TargetOpcode::G_UADDE:
365369 return selectUadde(I, MRI, MF);
366370 case TargetOpcode::G_UNMERGE_VALUES:
966970 return true;
967971 }
968972
973 bool X86InstructionSelector::selectFCmp(MachineInstr &I,
974 MachineRegisterInfo &MRI,
975 MachineFunction &MF) const {
976 assert((I.getOpcode() == TargetOpcode::G_FCMP) && "unexpected instruction");
977
978 unsigned LhsReg = I.getOperand(2).getReg();
979 unsigned RhsReg = I.getOperand(3).getReg();
980 CmpInst::Predicate Predicate =
981 (CmpInst::Predicate)I.getOperand(1).getPredicate();
982
983 // FCMP_OEQ and FCMP_UNE cannot be checked with a single instruction.
984 static const uint16_t SETFOpcTable[2][3] = {
985 {X86::SETEr, X86::SETNPr, X86::AND8rr},
986 {X86::SETNEr, X86::SETPr, X86::OR8rr}};
987 const uint16_t *SETFOpc = nullptr;
988 switch (Predicate) {
989 default:
990 break;
991 case CmpInst::FCMP_OEQ:
992 SETFOpc = &SETFOpcTable[0][0];
993 break;
994 case CmpInst::FCMP_UNE:
995 SETFOpc = &SETFOpcTable[1][0];
996 break;
997 }
998
999 // Compute the opcode for the CMP instruction.
1000 unsigned OpCmp;
1001 LLT Ty = MRI.getType(LhsReg);
1002 switch (Ty.getSizeInBits()) {
1003 default:
1004 return false;
1005 case 32:
1006 OpCmp = X86::UCOMISSrr;
1007 break;
1008 case 64:
1009 OpCmp = X86::UCOMISDrr;
1010 break;
1011 }
1012
1013 unsigned ResultReg = I.getOperand(0).getReg();
1014 RBI.constrainGenericRegister(
1015 ResultReg,
1016 *getRegClass(LLT::scalar(8), *RBI.getRegBank(ResultReg, MRI, TRI)), MRI);
1017 if (SETFOpc) {
1018 MachineInstr &CmpInst =
1019 *BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(OpCmp))
1020 .addReg(LhsReg)
1021 .addReg(RhsReg);
1022
1023 unsigned FlagReg1 = MRI.createVirtualRegister(&X86::GR8RegClass);
1024 unsigned FlagReg2 = MRI.createVirtualRegister(&X86::GR8RegClass);
1025 MachineInstr &Set1 = *BuildMI(*I.getParent(), I, I.getDebugLoc(),
1026 TII.get(SETFOpc[0]), FlagReg1);
1027 MachineInstr &Set2 = *BuildMI(*I.getParent(), I, I.getDebugLoc(),
1028 TII.get(SETFOpc[1]), FlagReg2);
1029 MachineInstr &Set3 = *BuildMI(*I.getParent(), I, I.getDebugLoc(),
1030 TII.get(SETFOpc[2]), ResultReg)
1031 .addReg(FlagReg1)
1032 .addReg(FlagReg2);
1033 constrainSelectedInstRegOperands(CmpInst, TII, TRI, RBI);
1034 constrainSelectedInstRegOperands(Set1, TII, TRI, RBI);
1035 constrainSelectedInstRegOperands(Set2, TII, TRI, RBI);
1036 constrainSelectedInstRegOperands(Set3, TII, TRI, RBI);
1037
1038 I.eraseFromParent();
1039 return true;
1040 }
1041
1042 X86::CondCode CC;
1043 bool SwapArgs;
1044 std::tie(CC, SwapArgs) = X86::getX86ConditionCode(Predicate);
1045 assert(CC <= X86::LAST_VALID_COND && "Unexpected condition code.");
1046 unsigned Opc = X86::getSETFromCond(CC);
1047
1048 if (SwapArgs)
1049 std::swap(LhsReg, RhsReg);
1050
1051 // Emit a compare of LHS/RHS.
1052 MachineInstr &CmpInst =
1053 *BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(OpCmp))
1054 .addReg(LhsReg)
1055 .addReg(RhsReg);
1056
1057 MachineInstr &Set =
1058 *BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(Opc), ResultReg);
1059 constrainSelectedInstRegOperands(CmpInst, TII, TRI, RBI);
1060 constrainSelectedInstRegOperands(Set, TII, TRI, RBI);
1061 I.eraseFromParent();
1062 return true;
1063 }
1064
9691065 bool X86InstructionSelector::selectUadde(MachineInstr &I,
9701066 MachineRegisterInfo &MRI,
9711067 MachineFunction &MF) const {
221221 // Comparison
222222 setAction({G_ICMP, 1, s64}, Legal);
223223
224 getActionDefinitionsBuilder(G_FCMP)
225 .legalForCartesianProduct({s8}, {s32, s64})
226 .clampScalar(0, s8, s8)
227 .clampScalar(1, s32, s64)
228 .widenScalarToNextPow2(1);
229
224230 // Shifts and SDIV
225231 getActionDefinitionsBuilder({G_SHL, G_LSHR, G_ASHR, G_SDIV})
226232 .legalFor({s8, s16, s32, s64})
208208 OpRegBankIdx[1] = getPartialMappingIdx(Ty1, /* isFP */ false);
209209 break;
210210 }
211 case TargetOpcode::G_FCMP: {
212 LLT Ty1 = MRI.getType(MI.getOperand(2).getReg());
213 LLT Ty2 = MRI.getType(MI.getOperand(3).getReg());
214 (void)Ty2;
215 assert(Ty1.getSizeInBits() == Ty2.getSizeInBits() &&
216 "Mismatched operand sizes for G_FCMP");
217
218 unsigned Size = Ty1.getSizeInBits();
219 assert((Size == 32 || Size == 64) && "Unsupported size for G_FCMP");
220
221 auto FpRegBank = getPartialMappingIdx(Ty1, /* isFP */ true);
222 OpRegBankIdx = {PMI_GPR8,
223 /* Predicate */ PMI_None, FpRegBank, FpRegBank};
224 break;
225 }
211226 case TargetOpcode::G_TRUNC:
212227 case TargetOpcode::G_ANYEXT: {
213228 auto &Op0 = MI.getOperand(0);
263263 entry:
264264 %conv = sitofp i64 %a to double
265265 ret double %conv
266 }
267
268 define i1 @fcmp_float_oeq(float %x, float %y) {
269 %1 = fcmp oeq float %x, %y
270 ret i1 %1
271 }
272
273 define i1 @fcmp_float_ogt(float %x, float %y) {
274 %1 = fcmp ogt float %x, %y
275 ret i1 %1
276 }
277
278 define i1 @fcmp_float_oge(float %x, float %y) {
279 %1 = fcmp oge float %x, %y
280 ret i1 %1
281 }
282
283 define i1 @fcmp_float_olt(float %x, float %y) {
284 %1 = fcmp olt float %x, %y
285 ret i1 %1
286 }
287
288 define i1 @fcmp_float_ole(float %x, float %y) {
289 %1 = fcmp ole float %x, %y
290 ret i1 %1
291 }
292
293 define i1 @fcmp_float_one(float %x, float %y) {
294 %1 = fcmp one float %x, %y
295 ret i1 %1
296 }
297
298 define i1 @fcmp_float_ord(float %x, float %y) {
299 %1 = fcmp ord float %x, %y
300 ret i1 %1
301 }
302
303 define i1 @fcmp_float_uno(float %x, float %y) {
304 %1 = fcmp uno float %x, %y
305 ret i1 %1
306 }
307
308 define i1 @fcmp_float_ueq(float %x, float %y) {
309 %1 = fcmp ueq float %x, %y
310 ret i1 %1
311 }
312
313 define i1 @fcmp_float_ugt(float %x, float %y) {
314 %1 = fcmp ugt float %x, %y
315 ret i1 %1
316 }
317
318 define i1 @fcmp_float_uge(float %x, float %y) {
319 %1 = fcmp uge float %x, %y
320 ret i1 %1
321 }
322
323 define i1 @fcmp_float_ult(float %x, float %y) {
324 %1 = fcmp ult float %x, %y
325 ret i1 %1
326 }
327
328 define i1 @fcmp_float_ule(float %x, float %y) {
329 %1 = fcmp ule float %x, %y
330 ret i1 %1
331 }
332
333 define i1 @fcmp_float_une(float %x, float %y) {
334 %1 = fcmp une float %x, %y
335 ret i1 %1
336 }
337
338 define i1 @fcmp_double_oeq(double %x, double %y) {
339 %1 = fcmp oeq double %x, %y
340 ret i1 %1
341 }
342
343 define i1 @fcmp_double_ogt(double %x, double %y) {
344 %1 = fcmp ogt double %x, %y
345 ret i1 %1
346 }
347
348 define i1 @fcmp_double_oge(double %x, double %y) {
349 %1 = fcmp oge double %x, %y
350 ret i1 %1
351 }
352
353 define i1 @fcmp_double_olt(double %x, double %y) {
354 %1 = fcmp olt double %x, %y
355 ret i1 %1
356 }
357
358 define i1 @fcmp_double_ole(double %x, double %y) {
359 %1 = fcmp ole double %x, %y
360 ret i1 %1
361 }
362
363 define i1 @fcmp_double_one(double %x, double %y) {
364 %1 = fcmp one double %x, %y
365 ret i1 %1
366 }
367
368 define i1 @fcmp_double_ord(double %x, double %y) {
369 %1 = fcmp ord double %x, %y
370 ret i1 %1
371 }
372
373 define i1 @fcmp_double_uno(double %x, double %y) {
374 %1 = fcmp uno double %x, %y
375 ret i1 %1
376 }
377
378 define i1 @fcmp_double_ueq(double %x, double %y) {
379 %1 = fcmp ueq double %x, %y
380 ret i1 %1
381 }
382
383 define i1 @fcmp_double_ugt(double %x, double %y) {
384 %1 = fcmp ugt double %x, %y
385 ret i1 %1
386 }
387
388 define i1 @fcmp_double_uge(double %x, double %y) {
389 %1 = fcmp uge double %x, %y
390 ret i1 %1
391 }
392
393 define i1 @fcmp_double_ult(double %x, double %y) {
394 %1 = fcmp ult double %x, %y
395 ret i1 %1
396 }
397
398 define i1 @fcmp_double_ule(double %x, double %y) {
399 %1 = fcmp ule double %x, %y
400 ret i1 %1
401 }
402
403 define i1 @fcmp_double_une(double %x, double %y) {
404 %1 = fcmp une double %x, %y
405 ret i1 %1
266406 }
267407
268408 ...
19782118 RET 0, implicit $xmm0
19792119
19802120 ...
2121 ---
2122 name: fcmp_float_oeq
2123 alignment: 4
2124 legalized: true
2125 tracksRegLiveness: true
2126 registers:
2127 - { id: 0, class: _ }
2128 - { id: 1, class: _ }
2129 - { id: 2, class: _ }
2130 - { id: 3, class: _ }
2131 - { id: 4, class: _ }
2132 - { id: 5, class: _ }
2133 - { id: 6, class: _ }
2134 body: |
2135 bb.1 (%ir-block.0):
2136 liveins: $xmm0, $xmm1
2137
2138 ; FAST-LABEL: name: fcmp_float_oeq
2139 ; FAST: liveins: $xmm0, $xmm1
2140 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2141 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2142 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2143 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2144 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s32), [[TRUNC1]]
2145 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2146 ; FAST: $al = COPY [[COPY2]](s8)
2147 ; FAST: RET 0, implicit $al
2148 ; GREEDY-LABEL: name: fcmp_float_oeq
2149 ; GREEDY: liveins: $xmm0, $xmm1
2150 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2151 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2152 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2153 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2154 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s32), [[TRUNC1]]
2155 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2156 ; GREEDY: $al = COPY [[COPY2]](s8)
2157 ; GREEDY: RET 0, implicit $al
2158 %2:_(s128) = COPY $xmm0
2159 %0:_(s32) = G_TRUNC %2(s128)
2160 %3:_(s128) = COPY $xmm1
2161 %1:_(s32) = G_TRUNC %3(s128)
2162 %6:_(s8) = G_FCMP floatpred(oeq), %0(s32), %1
2163 %5:_(s8) = COPY %6(s8)
2164 $al = COPY %5(s8)
2165 RET 0, implicit $al
2166
2167 ...
2168 ---
2169 name: fcmp_float_ogt
2170 alignment: 4
2171 legalized: true
2172 tracksRegLiveness: true
2173 registers:
2174 - { id: 0, class: _ }
2175 - { id: 1, class: _ }
2176 - { id: 2, class: _ }
2177 - { id: 3, class: _ }
2178 - { id: 4, class: _ }
2179 - { id: 5, class: _ }
2180 - { id: 6, class: _ }
2181 body: |
2182 bb.1 (%ir-block.0):
2183 liveins: $xmm0, $xmm1
2184
2185 ; FAST-LABEL: name: fcmp_float_ogt
2186 ; FAST: liveins: $xmm0, $xmm1
2187 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2188 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2189 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2190 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2191 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s32), [[TRUNC1]]
2192 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2193 ; FAST: $al = COPY [[COPY2]](s8)
2194 ; FAST: RET 0, implicit $al
2195 ; GREEDY-LABEL: name: fcmp_float_ogt
2196 ; GREEDY: liveins: $xmm0, $xmm1
2197 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2198 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2199 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2200 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2201 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s32), [[TRUNC1]]
2202 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2203 ; GREEDY: $al = COPY [[COPY2]](s8)
2204 ; GREEDY: RET 0, implicit $al
2205 %2:_(s128) = COPY $xmm0
2206 %0:_(s32) = G_TRUNC %2(s128)
2207 %3:_(s128) = COPY $xmm1
2208 %1:_(s32) = G_TRUNC %3(s128)
2209 %6:_(s8) = G_FCMP floatpred(ogt), %0(s32), %1
2210 %5:_(s8) = COPY %6(s8)
2211 $al = COPY %5(s8)
2212 RET 0, implicit $al
2213
2214 ...
2215 ---
2216 name: fcmp_float_oge
2217 alignment: 4
2218 legalized: true
2219 tracksRegLiveness: true
2220 registers:
2221 - { id: 0, class: _ }
2222 - { id: 1, class: _ }
2223 - { id: 2, class: _ }
2224 - { id: 3, class: _ }
2225 - { id: 4, class: _ }
2226 - { id: 5, class: _ }
2227 - { id: 6, class: _ }
2228 body: |
2229 bb.1 (%ir-block.0):
2230 liveins: $xmm0, $xmm1
2231
2232 ; FAST-LABEL: name: fcmp_float_oge
2233 ; FAST: liveins: $xmm0, $xmm1
2234 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2235 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2236 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2237 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2238 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oge), [[TRUNC]](s32), [[TRUNC1]]
2239 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2240 ; FAST: $al = COPY [[COPY2]](s8)
2241 ; FAST: RET 0, implicit $al
2242 ; GREEDY-LABEL: name: fcmp_float_oge
2243 ; GREEDY: liveins: $xmm0, $xmm1
2244 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2245 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2246 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2247 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2248 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oge), [[TRUNC]](s32), [[TRUNC1]]
2249 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2250 ; GREEDY: $al = COPY [[COPY2]](s8)
2251 ; GREEDY: RET 0, implicit $al
2252 %2:_(s128) = COPY $xmm0
2253 %0:_(s32) = G_TRUNC %2(s128)
2254 %3:_(s128) = COPY $xmm1
2255 %1:_(s32) = G_TRUNC %3(s128)
2256 %6:_(s8) = G_FCMP floatpred(oge), %0(s32), %1
2257 %5:_(s8) = COPY %6(s8)
2258 $al = COPY %5(s8)
2259 RET 0, implicit $al
2260
2261 ...
2262 ---
2263 name: fcmp_float_olt
2264 alignment: 4
2265 legalized: true
2266 tracksRegLiveness: true
2267 registers:
2268 - { id: 0, class: _ }
2269 - { id: 1, class: _ }
2270 - { id: 2, class: _ }
2271 - { id: 3, class: _ }
2272 - { id: 4, class: _ }
2273 - { id: 5, class: _ }
2274 - { id: 6, class: _ }
2275 body: |
2276 bb.1 (%ir-block.0):
2277 liveins: $xmm0, $xmm1
2278
2279 ; FAST-LABEL: name: fcmp_float_olt
2280 ; FAST: liveins: $xmm0, $xmm1
2281 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2282 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2283 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2284 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2285 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(olt), [[TRUNC]](s32), [[TRUNC1]]
2286 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2287 ; FAST: $al = COPY [[COPY2]](s8)
2288 ; FAST: RET 0, implicit $al
2289 ; GREEDY-LABEL: name: fcmp_float_olt
2290 ; GREEDY: liveins: $xmm0, $xmm1
2291 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2292 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2293 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2294 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2295 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(olt), [[TRUNC]](s32), [[TRUNC1]]
2296 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2297 ; GREEDY: $al = COPY [[COPY2]](s8)
2298 ; GREEDY: RET 0, implicit $al
2299 %2:_(s128) = COPY $xmm0
2300 %0:_(s32) = G_TRUNC %2(s128)
2301 %3:_(s128) = COPY $xmm1
2302 %1:_(s32) = G_TRUNC %3(s128)
2303 %6:_(s8) = G_FCMP floatpred(olt), %0(s32), %1
2304 %5:_(s8) = COPY %6(s8)
2305 $al = COPY %5(s8)
2306 RET 0, implicit $al
2307
2308 ...
2309 ---
2310 name: fcmp_float_ole
2311 alignment: 4
2312 legalized: true
2313 tracksRegLiveness: true
2314 registers:
2315 - { id: 0, class: _ }
2316 - { id: 1, class: _ }
2317 - { id: 2, class: _ }
2318 - { id: 3, class: _ }
2319 - { id: 4, class: _ }
2320 - { id: 5, class: _ }
2321 - { id: 6, class: _ }
2322 body: |
2323 bb.1 (%ir-block.0):
2324 liveins: $xmm0, $xmm1
2325
2326 ; FAST-LABEL: name: fcmp_float_ole
2327 ; FAST: liveins: $xmm0, $xmm1
2328 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2329 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2330 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2331 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2332 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ole), [[TRUNC]](s32), [[TRUNC1]]
2333 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2334 ; FAST: $al = COPY [[COPY2]](s8)
2335 ; FAST: RET 0, implicit $al
2336 ; GREEDY-LABEL: name: fcmp_float_ole
2337 ; GREEDY: liveins: $xmm0, $xmm1
2338 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2339 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2340 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2341 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2342 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ole), [[TRUNC]](s32), [[TRUNC1]]
2343 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2344 ; GREEDY: $al = COPY [[COPY2]](s8)
2345 ; GREEDY: RET 0, implicit $al
2346 %2:_(s128) = COPY $xmm0
2347 %0:_(s32) = G_TRUNC %2(s128)
2348 %3:_(s128) = COPY $xmm1
2349 %1:_(s32) = G_TRUNC %3(s128)
2350 %6:_(s8) = G_FCMP floatpred(ole), %0(s32), %1
2351 %5:_(s8) = COPY %6(s8)
2352 $al = COPY %5(s8)
2353 RET 0, implicit $al
2354
2355 ...
2356 ---
2357 name: fcmp_float_one
2358 alignment: 4
2359 legalized: true
2360 tracksRegLiveness: true
2361 registers:
2362 - { id: 0, class: _ }
2363 - { id: 1, class: _ }
2364 - { id: 2, class: _ }
2365 - { id: 3, class: _ }
2366 - { id: 4, class: _ }
2367 - { id: 5, class: _ }
2368 - { id: 6, class: _ }
2369 body: |
2370 bb.1 (%ir-block.0):
2371 liveins: $xmm0, $xmm1
2372
2373 ; FAST-LABEL: name: fcmp_float_one
2374 ; FAST: liveins: $xmm0, $xmm1
2375 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2376 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2377 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2378 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2379 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(one), [[TRUNC]](s32), [[TRUNC1]]
2380 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2381 ; FAST: $al = COPY [[COPY2]](s8)
2382 ; FAST: RET 0, implicit $al
2383 ; GREEDY-LABEL: name: fcmp_float_one
2384 ; GREEDY: liveins: $xmm0, $xmm1
2385 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2386 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2387 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2388 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2389 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(one), [[TRUNC]](s32), [[TRUNC1]]
2390 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2391 ; GREEDY: $al = COPY [[COPY2]](s8)
2392 ; GREEDY: RET 0, implicit $al
2393 %2:_(s128) = COPY $xmm0
2394 %0:_(s32) = G_TRUNC %2(s128)
2395 %3:_(s128) = COPY $xmm1
2396 %1:_(s32) = G_TRUNC %3(s128)
2397 %6:_(s8) = G_FCMP floatpred(one), %0(s32), %1
2398 %5:_(s8) = COPY %6(s8)
2399 $al = COPY %5(s8)
2400 RET 0, implicit $al
2401
2402 ...
2403 ---
2404 name: fcmp_float_ord
2405 alignment: 4
2406 legalized: true
2407 tracksRegLiveness: true
2408 registers:
2409 - { id: 0, class: _ }
2410 - { id: 1, class: _ }
2411 - { id: 2, class: _ }
2412 - { id: 3, class: _ }
2413 - { id: 4, class: _ }
2414 - { id: 5, class: _ }
2415 - { id: 6, class: _ }
2416 body: |
2417 bb.1 (%ir-block.0):
2418 liveins: $xmm0, $xmm1
2419
2420 ; FAST-LABEL: name: fcmp_float_ord
2421 ; FAST: liveins: $xmm0, $xmm1
2422 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2423 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2424 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2425 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2426 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ord), [[TRUNC]](s32), [[TRUNC1]]
2427 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2428 ; FAST: $al = COPY [[COPY2]](s8)
2429 ; FAST: RET 0, implicit $al
2430 ; GREEDY-LABEL: name: fcmp_float_ord
2431 ; GREEDY: liveins: $xmm0, $xmm1
2432 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2433 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2434 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2435 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2436 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ord), [[TRUNC]](s32), [[TRUNC1]]
2437 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2438 ; GREEDY: $al = COPY [[COPY2]](s8)
2439 ; GREEDY: RET 0, implicit $al
2440 %2:_(s128) = COPY $xmm0
2441 %0:_(s32) = G_TRUNC %2(s128)
2442 %3:_(s128) = COPY $xmm1
2443 %1:_(s32) = G_TRUNC %3(s128)
2444 %6:_(s8) = G_FCMP floatpred(ord), %0(s32), %1
2445 %5:_(s8) = COPY %6(s8)
2446 $al = COPY %5(s8)
2447 RET 0, implicit $al
2448
2449 ...
2450 ---
2451 name: fcmp_float_uno
2452 alignment: 4
2453 legalized: true
2454 tracksRegLiveness: true
2455 registers:
2456 - { id: 0, class: _ }
2457 - { id: 1, class: _ }
2458 - { id: 2, class: _ }
2459 - { id: 3, class: _ }
2460 - { id: 4, class: _ }
2461 - { id: 5, class: _ }
2462 - { id: 6, class: _ }
2463 body: |
2464 bb.1 (%ir-block.0):
2465 liveins: $xmm0, $xmm1
2466
2467 ; FAST-LABEL: name: fcmp_float_uno
2468 ; FAST: liveins: $xmm0, $xmm1
2469 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2470 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2471 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2472 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2473 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uno), [[TRUNC]](s32), [[TRUNC1]]
2474 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2475 ; FAST: $al = COPY [[COPY2]](s8)
2476 ; FAST: RET 0, implicit $al
2477 ; GREEDY-LABEL: name: fcmp_float_uno
2478 ; GREEDY: liveins: $xmm0, $xmm1
2479 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2480 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2481 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2482 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2483 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uno), [[TRUNC]](s32), [[TRUNC1]]
2484 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2485 ; GREEDY: $al = COPY [[COPY2]](s8)
2486 ; GREEDY: RET 0, implicit $al
2487 %2:_(s128) = COPY $xmm0
2488 %0:_(s32) = G_TRUNC %2(s128)
2489 %3:_(s128) = COPY $xmm1
2490 %1:_(s32) = G_TRUNC %3(s128)
2491 %6:_(s8) = G_FCMP floatpred(uno), %0(s32), %1
2492 %5:_(s8) = COPY %6(s8)
2493 $al = COPY %5(s8)
2494 RET 0, implicit $al
2495
2496 ...
2497 ---
2498 name: fcmp_float_ueq
2499 alignment: 4
2500 legalized: true
2501 tracksRegLiveness: true
2502 registers:
2503 - { id: 0, class: _ }
2504 - { id: 1, class: _ }
2505 - { id: 2, class: _ }
2506 - { id: 3, class: _ }
2507 - { id: 4, class: _ }
2508 - { id: 5, class: _ }
2509 - { id: 6, class: _ }
2510 body: |
2511 bb.1 (%ir-block.0):
2512 liveins: $xmm0, $xmm1
2513
2514 ; FAST-LABEL: name: fcmp_float_ueq
2515 ; FAST: liveins: $xmm0, $xmm1
2516 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2517 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2518 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2519 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2520 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s32), [[TRUNC1]]
2521 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2522 ; FAST: $al = COPY [[COPY2]](s8)
2523 ; FAST: RET 0, implicit $al
2524 ; GREEDY-LABEL: name: fcmp_float_ueq
2525 ; GREEDY: liveins: $xmm0, $xmm1
2526 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2527 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2528 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2529 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2530 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s32), [[TRUNC1]]
2531 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2532 ; GREEDY: $al = COPY [[COPY2]](s8)
2533 ; GREEDY: RET 0, implicit $al
2534 %2:_(s128) = COPY $xmm0
2535 %0:_(s32) = G_TRUNC %2(s128)
2536 %3:_(s128) = COPY $xmm1
2537 %1:_(s32) = G_TRUNC %3(s128)
2538 %6:_(s8) = G_FCMP floatpred(ueq), %0(s32), %1
2539 %5:_(s8) = COPY %6(s8)
2540 $al = COPY %5(s8)
2541 RET 0, implicit $al
2542
2543 ...
2544 ---
2545 name: fcmp_float_ugt
2546 alignment: 4
2547 legalized: true
2548 tracksRegLiveness: true
2549 registers:
2550 - { id: 0, class: _ }
2551 - { id: 1, class: _ }
2552 - { id: 2, class: _ }
2553 - { id: 3, class: _ }
2554 - { id: 4, class: _ }
2555 - { id: 5, class: _ }
2556 - { id: 6, class: _ }
2557 body: |
2558 bb.1 (%ir-block.0):
2559 liveins: $xmm0, $xmm1
2560
2561 ; FAST-LABEL: name: fcmp_float_ugt
2562 ; FAST: liveins: $xmm0, $xmm1
2563 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2564 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2565 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2566 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2567 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s32), [[TRUNC1]]
2568 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2569 ; FAST: $al = COPY [[COPY2]](s8)
2570 ; FAST: RET 0, implicit $al
2571 ; GREEDY-LABEL: name: fcmp_float_ugt
2572 ; GREEDY: liveins: $xmm0, $xmm1
2573 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2574 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2575 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2576 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2577 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s32), [[TRUNC1]]
2578 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2579 ; GREEDY: $al = COPY [[COPY2]](s8)
2580 ; GREEDY: RET 0, implicit $al
2581 %2:_(s128) = COPY $xmm0
2582 %0:_(s32) = G_TRUNC %2(s128)
2583 %3:_(s128) = COPY $xmm1
2584 %1:_(s32) = G_TRUNC %3(s128)
2585 %6:_(s8) = G_FCMP floatpred(ugt), %0(s32), %1
2586 %5:_(s8) = COPY %6(s8)
2587 $al = COPY %5(s8)
2588 RET 0, implicit $al
2589
2590 ...
2591 ---
2592 name: fcmp_float_uge
2593 alignment: 4
2594 legalized: true
2595 tracksRegLiveness: true
2596 registers:
2597 - { id: 0, class: _ }
2598 - { id: 1, class: _ }
2599 - { id: 2, class: _ }
2600 - { id: 3, class: _ }
2601 - { id: 4, class: _ }
2602 - { id: 5, class: _ }
2603 - { id: 6, class: _ }
2604 body: |
2605 bb.1 (%ir-block.0):
2606 liveins: $xmm0, $xmm1
2607
2608 ; FAST-LABEL: name: fcmp_float_uge
2609 ; FAST: liveins: $xmm0, $xmm1
2610 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2611 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2612 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2613 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2614 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uge), [[TRUNC]](s32), [[TRUNC1]]
2615 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2616 ; FAST: $al = COPY [[COPY2]](s8)
2617 ; FAST: RET 0, implicit $al
2618 ; GREEDY-LABEL: name: fcmp_float_uge
2619 ; GREEDY: liveins: $xmm0, $xmm1
2620 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2621 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2622 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2623 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2624 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uge), [[TRUNC]](s32), [[TRUNC1]]
2625 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2626 ; GREEDY: $al = COPY [[COPY2]](s8)
2627 ; GREEDY: RET 0, implicit $al
2628 %2:_(s128) = COPY $xmm0
2629 %0:_(s32) = G_TRUNC %2(s128)
2630 %3:_(s128) = COPY $xmm1
2631 %1:_(s32) = G_TRUNC %3(s128)
2632 %6:_(s8) = G_FCMP floatpred(uge), %0(s32), %1
2633 %5:_(s8) = COPY %6(s8)
2634 $al = COPY %5(s8)
2635 RET 0, implicit $al
2636
2637 ...
2638 ---
2639 name: fcmp_float_ult
2640 alignment: 4
2641 legalized: true
2642 tracksRegLiveness: true
2643 registers:
2644 - { id: 0, class: _ }
2645 - { id: 1, class: _ }
2646 - { id: 2, class: _ }
2647 - { id: 3, class: _ }
2648 - { id: 4, class: _ }
2649 - { id: 5, class: _ }
2650 - { id: 6, class: _ }
2651 body: |
2652 bb.1 (%ir-block.0):
2653 liveins: $xmm0, $xmm1
2654
2655 ; FAST-LABEL: name: fcmp_float_ult
2656 ; FAST: liveins: $xmm0, $xmm1
2657 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2658 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2659 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2660 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2661 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ult), [[TRUNC]](s32), [[TRUNC1]]
2662 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2663 ; FAST: $al = COPY [[COPY2]](s8)
2664 ; FAST: RET 0, implicit $al
2665 ; GREEDY-LABEL: name: fcmp_float_ult
2666 ; GREEDY: liveins: $xmm0, $xmm1
2667 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2668 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2669 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2670 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2671 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ult), [[TRUNC]](s32), [[TRUNC1]]
2672 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2673 ; GREEDY: $al = COPY [[COPY2]](s8)
2674 ; GREEDY: RET 0, implicit $al
2675 %2:_(s128) = COPY $xmm0
2676 %0:_(s32) = G_TRUNC %2(s128)
2677 %3:_(s128) = COPY $xmm1
2678 %1:_(s32) = G_TRUNC %3(s128)
2679 %6:_(s8) = G_FCMP floatpred(ult), %0(s32), %1
2680 %5:_(s8) = COPY %6(s8)
2681 $al = COPY %5(s8)
2682 RET 0, implicit $al
2683
2684 ...
2685 ---
2686 name: fcmp_float_ule
2687 alignment: 4
2688 legalized: true
2689 tracksRegLiveness: true
2690 registers:
2691 - { id: 0, class: _ }
2692 - { id: 1, class: _ }
2693 - { id: 2, class: _ }
2694 - { id: 3, class: _ }
2695 - { id: 4, class: _ }
2696 - { id: 5, class: _ }
2697 - { id: 6, class: _ }
2698 body: |
2699 bb.1 (%ir-block.0):
2700 liveins: $xmm0, $xmm1
2701
2702 ; FAST-LABEL: name: fcmp_float_ule
2703 ; FAST: liveins: $xmm0, $xmm1
2704 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2705 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2706 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2707 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2708 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ule), [[TRUNC]](s32), [[TRUNC1]]
2709 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2710 ; FAST: $al = COPY [[COPY2]](s8)
2711 ; FAST: RET 0, implicit $al
2712 ; GREEDY-LABEL: name: fcmp_float_ule
2713 ; GREEDY: liveins: $xmm0, $xmm1
2714 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2715 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2716 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2717 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2718 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ule), [[TRUNC]](s32), [[TRUNC1]]
2719 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2720 ; GREEDY: $al = COPY [[COPY2]](s8)
2721 ; GREEDY: RET 0, implicit $al
2722 %2:_(s128) = COPY $xmm0
2723 %0:_(s32) = G_TRUNC %2(s128)
2724 %3:_(s128) = COPY $xmm1
2725 %1:_(s32) = G_TRUNC %3(s128)
2726 %6:_(s8) = G_FCMP floatpred(ule), %0(s32), %1
2727 %5:_(s8) = COPY %6(s8)
2728 $al = COPY %5(s8)
2729 RET 0, implicit $al
2730
2731 ...
2732 ---
2733 name: fcmp_float_une
2734 alignment: 4
2735 legalized: true
2736 tracksRegLiveness: true
2737 registers:
2738 - { id: 0, class: _ }
2739 - { id: 1, class: _ }
2740 - { id: 2, class: _ }
2741 - { id: 3, class: _ }
2742 - { id: 4, class: _ }
2743 - { id: 5, class: _ }
2744 - { id: 6, class: _ }
2745 body: |
2746 bb.1 (%ir-block.0):
2747 liveins: $xmm0, $xmm1
2748
2749 ; FAST-LABEL: name: fcmp_float_une
2750 ; FAST: liveins: $xmm0, $xmm1
2751 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2752 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2753 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2754 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2755 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(une), [[TRUNC]](s32), [[TRUNC1]]
2756 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2757 ; FAST: $al = COPY [[COPY2]](s8)
2758 ; FAST: RET 0, implicit $al
2759 ; GREEDY-LABEL: name: fcmp_float_une
2760 ; GREEDY: liveins: $xmm0, $xmm1
2761 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2762 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY]](s128)
2763 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2764 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s32) = G_TRUNC [[COPY1]](s128)
2765 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(une), [[TRUNC]](s32), [[TRUNC1]]
2766 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2767 ; GREEDY: $al = COPY [[COPY2]](s8)
2768 ; GREEDY: RET 0, implicit $al
2769 %2:_(s128) = COPY $xmm0
2770 %0:_(s32) = G_TRUNC %2(s128)
2771 %3:_(s128) = COPY $xmm1
2772 %1:_(s32) = G_TRUNC %3(s128)
2773 %6:_(s8) = G_FCMP floatpred(une), %0(s32), %1
2774 %5:_(s8) = COPY %6(s8)
2775 $al = COPY %5(s8)
2776 RET 0, implicit $al
2777
2778 ...
2779 ---
2780 name: fcmp_double_oeq
2781 alignment: 4
2782 legalized: true
2783 tracksRegLiveness: true
2784 registers:
2785 - { id: 0, class: _ }
2786 - { id: 1, class: _ }
2787 - { id: 2, class: _ }
2788 - { id: 3, class: _ }
2789 - { id: 4, class: _ }
2790 - { id: 5, class: _ }
2791 - { id: 6, class: _ }
2792 body: |
2793 bb.1 (%ir-block.0):
2794 liveins: $xmm0, $xmm1
2795
2796 ; FAST-LABEL: name: fcmp_double_oeq
2797 ; FAST: liveins: $xmm0, $xmm1
2798 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2799 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2800 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2801 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2802 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s64), [[TRUNC1]]
2803 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2804 ; FAST: $al = COPY [[COPY2]](s8)
2805 ; FAST: RET 0, implicit $al
2806 ; GREEDY-LABEL: name: fcmp_double_oeq
2807 ; GREEDY: liveins: $xmm0, $xmm1
2808 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2809 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2810 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2811 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2812 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s64), [[TRUNC1]]
2813 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2814 ; GREEDY: $al = COPY [[COPY2]](s8)
2815 ; GREEDY: RET 0, implicit $al
2816 %2:_(s128) = COPY $xmm0
2817 %0:_(s64) = G_TRUNC %2(s128)
2818 %3:_(s128) = COPY $xmm1
2819 %1:_(s64) = G_TRUNC %3(s128)
2820 %6:_(s8) = G_FCMP floatpred(oeq), %0(s64), %1
2821 %5:_(s8) = COPY %6(s8)
2822 $al = COPY %5(s8)
2823 RET 0, implicit $al
2824
2825 ...
2826 ---
2827 name: fcmp_double_ogt
2828 alignment: 4
2829 legalized: true
2830 tracksRegLiveness: true
2831 registers:
2832 - { id: 0, class: _ }
2833 - { id: 1, class: _ }
2834 - { id: 2, class: _ }
2835 - { id: 3, class: _ }
2836 - { id: 4, class: _ }
2837 - { id: 5, class: _ }
2838 - { id: 6, class: _ }
2839 body: |
2840 bb.1 (%ir-block.0):
2841 liveins: $xmm0, $xmm1
2842
2843 ; FAST-LABEL: name: fcmp_double_ogt
2844 ; FAST: liveins: $xmm0, $xmm1
2845 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2846 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2847 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2848 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2849 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s64), [[TRUNC1]]
2850 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2851 ; FAST: $al = COPY [[COPY2]](s8)
2852 ; FAST: RET 0, implicit $al
2853 ; GREEDY-LABEL: name: fcmp_double_ogt
2854 ; GREEDY: liveins: $xmm0, $xmm1
2855 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2856 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2857 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2858 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2859 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s64), [[TRUNC1]]
2860 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2861 ; GREEDY: $al = COPY [[COPY2]](s8)
2862 ; GREEDY: RET 0, implicit $al
2863 %2:_(s128) = COPY $xmm0
2864 %0:_(s64) = G_TRUNC %2(s128)
2865 %3:_(s128) = COPY $xmm1
2866 %1:_(s64) = G_TRUNC %3(s128)
2867 %6:_(s8) = G_FCMP floatpred(ogt), %0(s64), %1
2868 %5:_(s8) = COPY %6(s8)
2869 $al = COPY %5(s8)
2870 RET 0, implicit $al
2871
2872 ...
2873 ---
2874 name: fcmp_double_oge
2875 alignment: 4
2876 legalized: true
2877 tracksRegLiveness: true
2878 registers:
2879 - { id: 0, class: _ }
2880 - { id: 1, class: _ }
2881 - { id: 2, class: _ }
2882 - { id: 3, class: _ }
2883 - { id: 4, class: _ }
2884 - { id: 5, class: _ }
2885 - { id: 6, class: _ }
2886 body: |
2887 bb.1 (%ir-block.0):
2888 liveins: $xmm0, $xmm1
2889
2890 ; FAST-LABEL: name: fcmp_double_oge
2891 ; FAST: liveins: $xmm0, $xmm1
2892 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2893 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2894 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2895 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2896 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oge), [[TRUNC]](s64), [[TRUNC1]]
2897 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2898 ; FAST: $al = COPY [[COPY2]](s8)
2899 ; FAST: RET 0, implicit $al
2900 ; GREEDY-LABEL: name: fcmp_double_oge
2901 ; GREEDY: liveins: $xmm0, $xmm1
2902 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2903 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2904 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2905 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2906 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(oge), [[TRUNC]](s64), [[TRUNC1]]
2907 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2908 ; GREEDY: $al = COPY [[COPY2]](s8)
2909 ; GREEDY: RET 0, implicit $al
2910 %2:_(s128) = COPY $xmm0
2911 %0:_(s64) = G_TRUNC %2(s128)
2912 %3:_(s128) = COPY $xmm1
2913 %1:_(s64) = G_TRUNC %3(s128)
2914 %6:_(s8) = G_FCMP floatpred(oge), %0(s64), %1
2915 %5:_(s8) = COPY %6(s8)
2916 $al = COPY %5(s8)
2917 RET 0, implicit $al
2918
2919 ...
2920 ---
2921 name: fcmp_double_olt
2922 alignment: 4
2923 legalized: true
2924 tracksRegLiveness: true
2925 registers:
2926 - { id: 0, class: _ }
2927 - { id: 1, class: _ }
2928 - { id: 2, class: _ }
2929 - { id: 3, class: _ }
2930 - { id: 4, class: _ }
2931 - { id: 5, class: _ }
2932 - { id: 6, class: _ }
2933 body: |
2934 bb.1 (%ir-block.0):
2935 liveins: $xmm0, $xmm1
2936
2937 ; FAST-LABEL: name: fcmp_double_olt
2938 ; FAST: liveins: $xmm0, $xmm1
2939 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2940 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2941 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2942 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2943 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(olt), [[TRUNC]](s64), [[TRUNC1]]
2944 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2945 ; FAST: $al = COPY [[COPY2]](s8)
2946 ; FAST: RET 0, implicit $al
2947 ; GREEDY-LABEL: name: fcmp_double_olt
2948 ; GREEDY: liveins: $xmm0, $xmm1
2949 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2950 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2951 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2952 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2953 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(olt), [[TRUNC]](s64), [[TRUNC1]]
2954 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2955 ; GREEDY: $al = COPY [[COPY2]](s8)
2956 ; GREEDY: RET 0, implicit $al
2957 %2:_(s128) = COPY $xmm0
2958 %0:_(s64) = G_TRUNC %2(s128)
2959 %3:_(s128) = COPY $xmm1
2960 %1:_(s64) = G_TRUNC %3(s128)
2961 %6:_(s8) = G_FCMP floatpred(olt), %0(s64), %1
2962 %5:_(s8) = COPY %6(s8)
2963 $al = COPY %5(s8)
2964 RET 0, implicit $al
2965
2966 ...
2967 ---
2968 name: fcmp_double_ole
2969 alignment: 4
2970 legalized: true
2971 tracksRegLiveness: true
2972 registers:
2973 - { id: 0, class: _ }
2974 - { id: 1, class: _ }
2975 - { id: 2, class: _ }
2976 - { id: 3, class: _ }
2977 - { id: 4, class: _ }
2978 - { id: 5, class: _ }
2979 - { id: 6, class: _ }
2980 body: |
2981 bb.1 (%ir-block.0):
2982 liveins: $xmm0, $xmm1
2983
2984 ; FAST-LABEL: name: fcmp_double_ole
2985 ; FAST: liveins: $xmm0, $xmm1
2986 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2987 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2988 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2989 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
2990 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ole), [[TRUNC]](s64), [[TRUNC1]]
2991 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
2992 ; FAST: $al = COPY [[COPY2]](s8)
2993 ; FAST: RET 0, implicit $al
2994 ; GREEDY-LABEL: name: fcmp_double_ole
2995 ; GREEDY: liveins: $xmm0, $xmm1
2996 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
2997 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
2998 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
2999 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3000 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ole), [[TRUNC]](s64), [[TRUNC1]]
3001 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3002 ; GREEDY: $al = COPY [[COPY2]](s8)
3003 ; GREEDY: RET 0, implicit $al
3004 %2:_(s128) = COPY $xmm0
3005 %0:_(s64) = G_TRUNC %2(s128)
3006 %3:_(s128) = COPY $xmm1
3007 %1:_(s64) = G_TRUNC %3(s128)
3008 %6:_(s8) = G_FCMP floatpred(ole), %0(s64), %1
3009 %5:_(s8) = COPY %6(s8)
3010 $al = COPY %5(s8)
3011 RET 0, implicit $al
3012
3013 ...
3014 ---
3015 name: fcmp_double_one
3016 alignment: 4
3017 legalized: true
3018 tracksRegLiveness: true
3019 registers:
3020 - { id: 0, class: _ }
3021 - { id: 1, class: _ }
3022 - { id: 2, class: _ }
3023 - { id: 3, class: _ }
3024 - { id: 4, class: _ }
3025 - { id: 5, class: _ }
3026 - { id: 6, class: _ }
3027 body: |
3028 bb.1 (%ir-block.0):
3029 liveins: $xmm0, $xmm1
3030
3031 ; FAST-LABEL: name: fcmp_double_one
3032 ; FAST: liveins: $xmm0, $xmm1
3033 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3034 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3035 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3036 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3037 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(one), [[TRUNC]](s64), [[TRUNC1]]
3038 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3039 ; FAST: $al = COPY [[COPY2]](s8)
3040 ; FAST: RET 0, implicit $al
3041 ; GREEDY-LABEL: name: fcmp_double_one
3042 ; GREEDY: liveins: $xmm0, $xmm1
3043 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3044 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3045 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3046 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3047 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(one), [[TRUNC]](s64), [[TRUNC1]]
3048 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3049 ; GREEDY: $al = COPY [[COPY2]](s8)
3050 ; GREEDY: RET 0, implicit $al
3051 %2:_(s128) = COPY $xmm0
3052 %0:_(s64) = G_TRUNC %2(s128)
3053 %3:_(s128) = COPY $xmm1
3054 %1:_(s64) = G_TRUNC %3(s128)
3055 %6:_(s8) = G_FCMP floatpred(one), %0(s64), %1
3056 %5:_(s8) = COPY %6(s8)
3057 $al = COPY %5(s8)
3058 RET 0, implicit $al
3059
3060 ...
3061 ---
3062 name: fcmp_double_ord
3063 alignment: 4
3064 legalized: true
3065 tracksRegLiveness: true
3066 registers:
3067 - { id: 0, class: _ }
3068 - { id: 1, class: _ }
3069 - { id: 2, class: _ }
3070 - { id: 3, class: _ }
3071 - { id: 4, class: _ }
3072 - { id: 5, class: _ }
3073 - { id: 6, class: _ }
3074 body: |
3075 bb.1 (%ir-block.0):
3076 liveins: $xmm0, $xmm1
3077
3078 ; FAST-LABEL: name: fcmp_double_ord
3079 ; FAST: liveins: $xmm0, $xmm1
3080 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3081 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3082 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3083 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3084 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ord), [[TRUNC]](s64), [[TRUNC1]]
3085 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3086 ; FAST: $al = COPY [[COPY2]](s8)
3087 ; FAST: RET 0, implicit $al
3088 ; GREEDY-LABEL: name: fcmp_double_ord
3089 ; GREEDY: liveins: $xmm0, $xmm1
3090 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3091 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3092 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3093 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3094 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ord), [[TRUNC]](s64), [[TRUNC1]]
3095 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3096 ; GREEDY: $al = COPY [[COPY2]](s8)
3097 ; GREEDY: RET 0, implicit $al
3098 %2:_(s128) = COPY $xmm0
3099 %0:_(s64) = G_TRUNC %2(s128)
3100 %3:_(s128) = COPY $xmm1
3101 %1:_(s64) = G_TRUNC %3(s128)
3102 %6:_(s8) = G_FCMP floatpred(ord), %0(s64), %1
3103 %5:_(s8) = COPY %6(s8)
3104 $al = COPY %5(s8)
3105 RET 0, implicit $al
3106
3107 ...
3108 ---
3109 name: fcmp_double_uno
3110 alignment: 4
3111 legalized: true
3112 tracksRegLiveness: true
3113 registers:
3114 - { id: 0, class: _ }
3115 - { id: 1, class: _ }
3116 - { id: 2, class: _ }
3117 - { id: 3, class: _ }
3118 - { id: 4, class: _ }
3119 - { id: 5, class: _ }
3120 - { id: 6, class: _ }
3121 body: |
3122 bb.1 (%ir-block.0):
3123 liveins: $xmm0, $xmm1
3124
3125 ; FAST-LABEL: name: fcmp_double_uno
3126 ; FAST: liveins: $xmm0, $xmm1
3127 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3128 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3129 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3130 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3131 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uno), [[TRUNC]](s64), [[TRUNC1]]
3132 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3133 ; FAST: $al = COPY [[COPY2]](s8)
3134 ; FAST: RET 0, implicit $al
3135 ; GREEDY-LABEL: name: fcmp_double_uno
3136 ; GREEDY: liveins: $xmm0, $xmm1
3137 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3138 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3139 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3140 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3141 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uno), [[TRUNC]](s64), [[TRUNC1]]
3142 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3143 ; GREEDY: $al = COPY [[COPY2]](s8)
3144 ; GREEDY: RET 0, implicit $al
3145 %2:_(s128) = COPY $xmm0
3146 %0:_(s64) = G_TRUNC %2(s128)
3147 %3:_(s128) = COPY $xmm1
3148 %1:_(s64) = G_TRUNC %3(s128)
3149 %6:_(s8) = G_FCMP floatpred(uno), %0(s64), %1
3150 %5:_(s8) = COPY %6(s8)
3151 $al = COPY %5(s8)
3152 RET 0, implicit $al
3153
3154 ...
3155 ---
3156 name: fcmp_double_ueq
3157 alignment: 4
3158 legalized: true
3159 tracksRegLiveness: true
3160 registers:
3161 - { id: 0, class: _ }
3162 - { id: 1, class: _ }
3163 - { id: 2, class: _ }
3164 - { id: 3, class: _ }
3165 - { id: 4, class: _ }
3166 - { id: 5, class: _ }
3167 - { id: 6, class: _ }
3168 body: |
3169 bb.1 (%ir-block.0):
3170 liveins: $xmm0, $xmm1
3171
3172 ; FAST-LABEL: name: fcmp_double_ueq
3173 ; FAST: liveins: $xmm0, $xmm1
3174 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3175 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3176 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3177 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3178 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s64), [[TRUNC1]]
3179 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3180 ; FAST: $al = COPY [[COPY2]](s8)
3181 ; FAST: RET 0, implicit $al
3182 ; GREEDY-LABEL: name: fcmp_double_ueq
3183 ; GREEDY: liveins: $xmm0, $xmm1
3184 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3185 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3186 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3187 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3188 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s64), [[TRUNC1]]
3189 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3190 ; GREEDY: $al = COPY [[COPY2]](s8)
3191 ; GREEDY: RET 0, implicit $al
3192 %2:_(s128) = COPY $xmm0
3193 %0:_(s64) = G_TRUNC %2(s128)
3194 %3:_(s128) = COPY $xmm1
3195 %1:_(s64) = G_TRUNC %3(s128)
3196 %6:_(s8) = G_FCMP floatpred(ueq), %0(s64), %1
3197 %5:_(s8) = COPY %6(s8)
3198 $al = COPY %5(s8)
3199 RET 0, implicit $al
3200
3201 ...
3202 ---
3203 name: fcmp_double_ugt
3204 alignment: 4
3205 legalized: true
3206 tracksRegLiveness: true
3207 registers:
3208 - { id: 0, class: _ }
3209 - { id: 1, class: _ }
3210 - { id: 2, class: _ }
3211 - { id: 3, class: _ }
3212 - { id: 4, class: _ }
3213 - { id: 5, class: _ }
3214 - { id: 6, class: _ }
3215 body: |
3216 bb.1 (%ir-block.0):
3217 liveins: $xmm0, $xmm1
3218
3219 ; FAST-LABEL: name: fcmp_double_ugt
3220 ; FAST: liveins: $xmm0, $xmm1
3221 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3222 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3223 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3224 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3225 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s64), [[TRUNC1]]
3226 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3227 ; FAST: $al = COPY [[COPY2]](s8)
3228 ; FAST: RET 0, implicit $al
3229 ; GREEDY-LABEL: name: fcmp_double_ugt
3230 ; GREEDY: liveins: $xmm0, $xmm1
3231 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3232 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3233 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3234 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3235 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s64), [[TRUNC1]]
3236 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3237 ; GREEDY: $al = COPY [[COPY2]](s8)
3238 ; GREEDY: RET 0, implicit $al
3239 %2:_(s128) = COPY $xmm0
3240 %0:_(s64) = G_TRUNC %2(s128)
3241 %3:_(s128) = COPY $xmm1
3242 %1:_(s64) = G_TRUNC %3(s128)
3243 %6:_(s8) = G_FCMP floatpred(ugt), %0(s64), %1
3244 %5:_(s8) = COPY %6(s8)
3245 $al = COPY %5(s8)
3246 RET 0, implicit $al
3247
3248 ...
3249 ---
3250 name: fcmp_double_uge
3251 alignment: 4
3252 legalized: true
3253 tracksRegLiveness: true
3254 registers:
3255 - { id: 0, class: _ }
3256 - { id: 1, class: _ }
3257 - { id: 2, class: _ }
3258 - { id: 3, class: _ }
3259 - { id: 4, class: _ }
3260 - { id: 5, class: _ }
3261 - { id: 6, class: _ }
3262 body: |
3263 bb.1 (%ir-block.0):
3264 liveins: $xmm0, $xmm1
3265
3266 ; FAST-LABEL: name: fcmp_double_uge
3267 ; FAST: liveins: $xmm0, $xmm1
3268 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3269 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3270 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3271 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3272 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uge), [[TRUNC]](s64), [[TRUNC1]]
3273 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3274 ; FAST: $al = COPY [[COPY2]](s8)
3275 ; FAST: RET 0, implicit $al
3276 ; GREEDY-LABEL: name: fcmp_double_uge
3277 ; GREEDY: liveins: $xmm0, $xmm1
3278 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3279 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3280 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3281 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3282 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(uge), [[TRUNC]](s64), [[TRUNC1]]
3283 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3284 ; GREEDY: $al = COPY [[COPY2]](s8)
3285 ; GREEDY: RET 0, implicit $al
3286 %2:_(s128) = COPY $xmm0
3287 %0:_(s64) = G_TRUNC %2(s128)
3288 %3:_(s128) = COPY $xmm1
3289 %1:_(s64) = G_TRUNC %3(s128)
3290 %6:_(s8) = G_FCMP floatpred(uge), %0(s64), %1
3291 %5:_(s8) = COPY %6(s8)
3292 $al = COPY %5(s8)
3293 RET 0, implicit $al
3294
3295 ...
3296 ---
3297 name: fcmp_double_ult
3298 alignment: 4
3299 legalized: true
3300 tracksRegLiveness: true
3301 registers:
3302 - { id: 0, class: _ }
3303 - { id: 1, class: _ }
3304 - { id: 2, class: _ }
3305 - { id: 3, class: _ }
3306 - { id: 4, class: _ }
3307 - { id: 5, class: _ }
3308 - { id: 6, class: _ }
3309 body: |
3310 bb.1 (%ir-block.0):
3311 liveins: $xmm0, $xmm1
3312
3313 ; FAST-LABEL: name: fcmp_double_ult
3314 ; FAST: liveins: $xmm0, $xmm1
3315 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3316 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3317 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3318 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3319 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ult), [[TRUNC]](s64), [[TRUNC1]]
3320 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3321 ; FAST: $al = COPY [[COPY2]](s8)
3322 ; FAST: RET 0, implicit $al
3323 ; GREEDY-LABEL: name: fcmp_double_ult
3324 ; GREEDY: liveins: $xmm0, $xmm1
3325 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3326 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3327 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3328 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3329 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ult), [[TRUNC]](s64), [[TRUNC1]]
3330 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3331 ; GREEDY: $al = COPY [[COPY2]](s8)
3332 ; GREEDY: RET 0, implicit $al
3333 %2:_(s128) = COPY $xmm0
3334 %0:_(s64) = G_TRUNC %2(s128)
3335 %3:_(s128) = COPY $xmm1
3336 %1:_(s64) = G_TRUNC %3(s128)
3337 %6:_(s8) = G_FCMP floatpred(ult), %0(s64), %1
3338 %5:_(s8) = COPY %6(s8)
3339 $al = COPY %5(s8)
3340 RET 0, implicit $al
3341
3342 ...
3343 ---
3344 name: fcmp_double_ule
3345 alignment: 4
3346 legalized: true
3347 tracksRegLiveness: true
3348 registers:
3349 - { id: 0, class: _ }
3350 - { id: 1, class: _ }
3351 - { id: 2, class: _ }
3352 - { id: 3, class: _ }
3353 - { id: 4, class: _ }
3354 - { id: 5, class: _ }
3355 - { id: 6, class: _ }
3356 body: |
3357 bb.1 (%ir-block.0):
3358 liveins: $xmm0, $xmm1
3359
3360 ; FAST-LABEL: name: fcmp_double_ule
3361 ; FAST: liveins: $xmm0, $xmm1
3362 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3363 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3364 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3365 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3366 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ule), [[TRUNC]](s64), [[TRUNC1]]
3367 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3368 ; FAST: $al = COPY [[COPY2]](s8)
3369 ; FAST: RET 0, implicit $al
3370 ; GREEDY-LABEL: name: fcmp_double_ule
3371 ; GREEDY: liveins: $xmm0, $xmm1
3372 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3373 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3374 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3375 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3376 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(ule), [[TRUNC]](s64), [[TRUNC1]]
3377 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3378 ; GREEDY: $al = COPY [[COPY2]](s8)
3379 ; GREEDY: RET 0, implicit $al
3380 %2:_(s128) = COPY $xmm0
3381 %0:_(s64) = G_TRUNC %2(s128)
3382 %3:_(s128) = COPY $xmm1
3383 %1:_(s64) = G_TRUNC %3(s128)
3384 %6:_(s8) = G_FCMP floatpred(ule), %0(s64), %1
3385 %5:_(s8) = COPY %6(s8)
3386 $al = COPY %5(s8)
3387 RET 0, implicit $al
3388
3389 ...
3390 ---
3391 name: fcmp_double_une
3392 alignment: 4
3393 legalized: true
3394 tracksRegLiveness: true
3395 registers:
3396 - { id: 0, class: _ }
3397 - { id: 1, class: _ }
3398 - { id: 2, class: _ }
3399 - { id: 3, class: _ }
3400 - { id: 4, class: _ }
3401 - { id: 5, class: _ }
3402 - { id: 6, class: _ }
3403 body: |
3404 bb.1 (%ir-block.0):
3405 liveins: $xmm0, $xmm1
3406
3407 ; FAST-LABEL: name: fcmp_double_une
3408 ; FAST: liveins: $xmm0, $xmm1
3409 ; FAST: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3410 ; FAST: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3411 ; FAST: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3412 ; FAST: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3413 ; FAST: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(une), [[TRUNC]](s64), [[TRUNC1]]
3414 ; FAST: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3415 ; FAST: $al = COPY [[COPY2]](s8)
3416 ; FAST: RET 0, implicit $al
3417 ; GREEDY-LABEL: name: fcmp_double_une
3418 ; GREEDY: liveins: $xmm0, $xmm1
3419 ; GREEDY: [[COPY:%[0-9]+]]:vecr(s128) = COPY $xmm0
3420 ; GREEDY: [[TRUNC:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY]](s128)
3421 ; GREEDY: [[COPY1:%[0-9]+]]:vecr(s128) = COPY $xmm1
3422 ; GREEDY: [[TRUNC1:%[0-9]+]]:vecr(s64) = G_TRUNC [[COPY1]](s128)
3423 ; GREEDY: [[FCMP:%[0-9]+]]:gpr(s8) = G_FCMP floatpred(une), [[TRUNC]](s64), [[TRUNC1]]
3424 ; GREEDY: [[COPY2:%[0-9]+]]:gpr(s8) = COPY [[FCMP]](s8)
3425 ; GREEDY: $al = COPY [[COPY2]](s8)
3426 ; GREEDY: RET 0, implicit $al
3427 %2:_(s128) = COPY $xmm0
3428 %0:_(s64) = G_TRUNC %2(s128)
3429 %3:_(s128) = COPY $xmm1
3430 %1:_(s64) = G_TRUNC %3(s128)
3431 %6:_(s8) = G_FCMP floatpred(une), %0(s64), %1
3432 %5:_(s8) = COPY %6(s8)
3433 $al = COPY %5(s8)
3434 RET 0, implicit $al
3435
3436 ...
0 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
1 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
2
3 --- |
4
5 define i1 @fcmp_float_oeq(float %x, float %y) {
6 %1 = fcmp oeq float %x, %y
7 ret i1 %1
8 }
9
10 define i1 @fcmp_float_ogt(float %x, float %y) {
11 %1 = fcmp ogt float %x, %y
12 ret i1 %1
13 }
14
15 define i1 @fcmp_float_oge(float %x, float %y) {
16 %1 = fcmp oge float %x, %y
17 ret i1 %1
18 }
19
20 define i1 @fcmp_float_olt(float %x, float %y) {
21 %1 = fcmp olt float %x, %y
22 ret i1 %1
23 }
24
25 define i1 @fcmp_float_ole(float %x, float %y) {
26 %1 = fcmp ole float %x, %y
27 ret i1 %1
28 }
29
30 define i1 @fcmp_float_one(float %x, float %y) {
31 %1 = fcmp one float %x, %y
32 ret i1 %1
33 }
34
35 define i1 @fcmp_float_ord(float %x, float %y) {
36 %1 = fcmp ord float %x, %y
37 ret i1 %1
38 }
39
40 define i1 @fcmp_float_uno(float %x, float %y) {
41 %1 = fcmp uno float %x, %y
42 ret i1 %1
43 }
44
45 define i1 @fcmp_float_ueq(float %x, float %y) {
46 %1 = fcmp ueq float %x, %y
47 ret i1 %1
48 }
49
50 define i1 @fcmp_float_ugt(float %x, float %y) {
51 %1 = fcmp ugt float %x, %y
52 ret i1 %1
53 }
54
55 define i1 @fcmp_float_uge(float %x, float %y) {
56 %1 = fcmp uge float %x, %y
57 ret i1 %1
58 }
59
60 define i1 @fcmp_float_ult(float %x, float %y) {
61 %1 = fcmp ult float %x, %y
62 ret i1 %1
63 }
64
65 define i1 @fcmp_float_ule(float %x, float %y) {
66 %1 = fcmp ule float %x, %y
67 ret i1 %1
68 }
69
70 define i1 @fcmp_float_une(float %x, float %y) {
71 %1 = fcmp une float %x, %y
72 ret i1 %1
73 }
74
75 define i1 @fcmp_double_oeq(double %x, double %y) {
76 %1 = fcmp oeq double %x, %y
77 ret i1 %1
78 }
79
80 define i1 @fcmp_double_ogt(double %x, double %y) {
81 %1 = fcmp ogt double %x, %y
82 ret i1 %1
83 }
84
85 define i1 @fcmp_double_oge(double %x, double %y) {
86 %1 = fcmp oge double %x, %y
87 ret i1 %1
88 }
89
90 define i1 @fcmp_double_olt(double %x, double %y) {
91 %1 = fcmp olt double %x, %y
92 ret i1 %1
93 }
94
95 define i1 @fcmp_double_ole(double %x, double %y) {
96 %1 = fcmp ole double %x, %y
97 ret i1 %1
98 }
99
100 define i1 @fcmp_double_one(double %x, double %y) {
101 %1 = fcmp one double %x, %y
102 ret i1 %1
103 }
104
105 define i1 @fcmp_double_ord(double %x, double %y) {
106 %1 = fcmp ord double %x, %y
107 ret i1 %1
108 }
109
110 define i1 @fcmp_double_uno(double %x, double %y) {
111 %1 = fcmp uno double %x, %y
112 ret i1 %1
113 }
114
115 define i1 @fcmp_double_ueq(double %x, double %y) {
116 %1 = fcmp ueq double %x, %y
117 ret i1 %1
118 }
119
120 define i1 @fcmp_double_ugt(double %x, double %y) {
121 %1 = fcmp ugt double %x, %y
122 ret i1 %1
123 }
124
125 define i1 @fcmp_double_uge(double %x, double %y) {
126 %1 = fcmp uge double %x, %y
127 ret i1 %1
128 }
129
130 define i1 @fcmp_double_ult(double %x, double %y) {
131 %1 = fcmp ult double %x, %y
132 ret i1 %1
133 }
134
135 define i1 @fcmp_double_ule(double %x, double %y) {
136 %1 = fcmp ule double %x, %y
137 ret i1 %1
138 }
139
140 define i1 @fcmp_double_une(double %x, double %y) {
141 %1 = fcmp une double %x, %y
142 ret i1 %1
143 }
144
145 ...
146 ---
147 name: fcmp_float_oeq
148 alignment: 4
149 tracksRegLiveness: true
150 registers:
151 - { id: 0, class: _ }
152 - { id: 1, class: _ }
153 - { id: 2, class: _ }
154 - { id: 3, class: _ }
155 - { id: 4, class: _ }
156 - { id: 5, class: _ }
157 body: |
158 bb.1 (%ir-block.0):
159 liveins: $xmm0, $xmm1
160
161 ; CHECK-LABEL: name: fcmp_float_oeq
162 ; CHECK: liveins: $xmm0, $xmm1
163 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
164 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
165 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
166 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
167 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s32), [[TRUNC1]]
168 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
169 ; CHECK: $al = COPY [[COPY2]](s8)
170 ; CHECK: RET 0, implicit $al
171 %2:_(s128) = COPY $xmm0
172 %0:_(s32) = G_TRUNC %2(s128)
173 %3:_(s128) = COPY $xmm1
174 %1:_(s32) = G_TRUNC %3(s128)
175 %4:_(s1) = G_FCMP floatpred(oeq), %0(s32), %1
176 %5:_(s8) = G_ANYEXT %4(s1)
177 $al = COPY %5(s8)
178 RET 0, implicit $al
179
180 ...
181 ---
182 name: fcmp_float_ogt
183 alignment: 4
184 tracksRegLiveness: true
185 registers:
186 - { id: 0, class: _ }
187 - { id: 1, class: _ }
188 - { id: 2, class: _ }
189 - { id: 3, class: _ }
190 - { id: 4, class: _ }
191 - { id: 5, class: _ }
192 body: |
193 bb.1 (%ir-block.0):
194 liveins: $xmm0, $xmm1
195
196 ; CHECK-LABEL: name: fcmp_float_ogt
197 ; CHECK: liveins: $xmm0, $xmm1
198 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
199 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
200 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
201 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
202 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s32), [[TRUNC1]]
203 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
204 ; CHECK: $al = COPY [[COPY2]](s8)
205 ; CHECK: RET 0, implicit $al
206 %2:_(s128) = COPY $xmm0
207 %0:_(s32) = G_TRUNC %2(s128)
208 %3:_(s128) = COPY $xmm1
209 %1:_(s32) = G_TRUNC %3(s128)
210 %4:_(s1) = G_FCMP floatpred(ogt), %0(s32), %1
211 %5:_(s8) = G_ANYEXT %4(s1)
212 $al = COPY %5(s8)
213 RET 0, implicit $al
214
215 ...
216 ---
217 name: fcmp_float_oge
218 alignment: 4
219 tracksRegLiveness: true
220 registers:
221 - { id: 0, class: _ }
222 - { id: 1, class: _ }
223 - { id: 2, class: _ }
224 - { id: 3, class: _ }
225 - { id: 4, class: _ }
226 - { id: 5, class: _ }
227 body: |
228 bb.1 (%ir-block.0):
229 liveins: $xmm0, $xmm1
230
231 ; CHECK-LABEL: name: fcmp_float_oge
232 ; CHECK: liveins: $xmm0, $xmm1
233 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
234 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
235 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
236 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
237 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oge), [[TRUNC]](s32), [[TRUNC1]]
238 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
239 ; CHECK: $al = COPY [[COPY2]](s8)
240 ; CHECK: RET 0, implicit $al
241 %2:_(s128) = COPY $xmm0
242 %0:_(s32) = G_TRUNC %2(s128)
243 %3:_(s128) = COPY $xmm1
244 %1:_(s32) = G_TRUNC %3(s128)
245 %4:_(s1) = G_FCMP floatpred(oge), %0(s32), %1
246 %5:_(s8) = G_ANYEXT %4(s1)
247 $al = COPY %5(s8)
248 RET 0, implicit $al
249
250 ...
251 ---
252 name: fcmp_float_olt
253 alignment: 4
254 tracksRegLiveness: true
255 registers:
256 - { id: 0, class: _ }
257 - { id: 1, class: _ }
258 - { id: 2, class: _ }
259 - { id: 3, class: _ }
260 - { id: 4, class: _ }
261 - { id: 5, class: _ }
262 body: |
263 bb.1 (%ir-block.0):
264 liveins: $xmm0, $xmm1
265
266 ; CHECK-LABEL: name: fcmp_float_olt
267 ; CHECK: liveins: $xmm0, $xmm1
268 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
269 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
270 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
271 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
272 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(olt), [[TRUNC]](s32), [[TRUNC1]]
273 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
274 ; CHECK: $al = COPY [[COPY2]](s8)
275 ; CHECK: RET 0, implicit $al
276 %2:_(s128) = COPY $xmm0
277 %0:_(s32) = G_TRUNC %2(s128)
278 %3:_(s128) = COPY $xmm1
279 %1:_(s32) = G_TRUNC %3(s128)
280 %4:_(s1) = G_FCMP floatpred(olt), %0(s32), %1
281 %5:_(s8) = G_ANYEXT %4(s1)
282 $al = COPY %5(s8)
283 RET 0, implicit $al
284
285 ...
286 ---
287 name: fcmp_float_ole
288 alignment: 4
289 tracksRegLiveness: true
290 registers:
291 - { id: 0, class: _ }
292 - { id: 1, class: _ }
293 - { id: 2, class: _ }
294 - { id: 3, class: _ }
295 - { id: 4, class: _ }
296 - { id: 5, class: _ }
297 body: |
298 bb.1 (%ir-block.0):
299 liveins: $xmm0, $xmm1
300
301 ; CHECK-LABEL: name: fcmp_float_ole
302 ; CHECK: liveins: $xmm0, $xmm1
303 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
304 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
305 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
306 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
307 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ole), [[TRUNC]](s32), [[TRUNC1]]
308 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
309 ; CHECK: $al = COPY [[COPY2]](s8)
310 ; CHECK: RET 0, implicit $al
311 %2:_(s128) = COPY $xmm0
312 %0:_(s32) = G_TRUNC %2(s128)
313 %3:_(s128) = COPY $xmm1
314 %1:_(s32) = G_TRUNC %3(s128)
315 %4:_(s1) = G_FCMP floatpred(ole), %0(s32), %1
316 %5:_(s8) = G_ANYEXT %4(s1)
317 $al = COPY %5(s8)
318 RET 0, implicit $al
319
320 ...
321 ---
322 name: fcmp_float_one
323 alignment: 4
324 tracksRegLiveness: true
325 registers:
326 - { id: 0, class: _ }
327 - { id: 1, class: _ }
328 - { id: 2, class: _ }
329 - { id: 3, class: _ }
330 - { id: 4, class: _ }
331 - { id: 5, class: _ }
332 body: |
333 bb.1 (%ir-block.0):
334 liveins: $xmm0, $xmm1
335
336 ; CHECK-LABEL: name: fcmp_float_one
337 ; CHECK: liveins: $xmm0, $xmm1
338 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
339 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
340 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
341 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
342 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(one), [[TRUNC]](s32), [[TRUNC1]]
343 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
344 ; CHECK: $al = COPY [[COPY2]](s8)
345 ; CHECK: RET 0, implicit $al
346 %2:_(s128) = COPY $xmm0
347 %0:_(s32) = G_TRUNC %2(s128)
348 %3:_(s128) = COPY $xmm1
349 %1:_(s32) = G_TRUNC %3(s128)
350 %4:_(s1) = G_FCMP floatpred(one), %0(s32), %1
351 %5:_(s8) = G_ANYEXT %4(s1)
352 $al = COPY %5(s8)
353 RET 0, implicit $al
354
355 ...
356 ---
357 name: fcmp_float_ord
358 alignment: 4
359 tracksRegLiveness: true
360 registers:
361 - { id: 0, class: _ }
362 - { id: 1, class: _ }
363 - { id: 2, class: _ }
364 - { id: 3, class: _ }
365 - { id: 4, class: _ }
366 - { id: 5, class: _ }
367 body: |
368 bb.1 (%ir-block.0):
369 liveins: $xmm0, $xmm1
370
371 ; CHECK-LABEL: name: fcmp_float_ord
372 ; CHECK: liveins: $xmm0, $xmm1
373 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
374 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
375 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
376 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
377 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ord), [[TRUNC]](s32), [[TRUNC1]]
378 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
379 ; CHECK: $al = COPY [[COPY2]](s8)
380 ; CHECK: RET 0, implicit $al
381 %2:_(s128) = COPY $xmm0
382 %0:_(s32) = G_TRUNC %2(s128)
383 %3:_(s128) = COPY $xmm1
384 %1:_(s32) = G_TRUNC %3(s128)
385 %4:_(s1) = G_FCMP floatpred(ord), %0(s32), %1
386 %5:_(s8) = G_ANYEXT %4(s1)
387 $al = COPY %5(s8)
388 RET 0, implicit $al
389
390 ...
391 ---
392 name: fcmp_float_uno
393 alignment: 4
394 tracksRegLiveness: true
395 registers:
396 - { id: 0, class: _ }
397 - { id: 1, class: _ }
398 - { id: 2, class: _ }
399 - { id: 3, class: _ }
400 - { id: 4, class: _ }
401 - { id: 5, class: _ }
402 body: |
403 bb.1 (%ir-block.0):
404 liveins: $xmm0, $xmm1
405
406 ; CHECK-LABEL: name: fcmp_float_uno
407 ; CHECK: liveins: $xmm0, $xmm1
408 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
409 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
410 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
411 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
412 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uno), [[TRUNC]](s32), [[TRUNC1]]
413 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
414 ; CHECK: $al = COPY [[COPY2]](s8)
415 ; CHECK: RET 0, implicit $al
416 %2:_(s128) = COPY $xmm0
417 %0:_(s32) = G_TRUNC %2(s128)
418 %3:_(s128) = COPY $xmm1
419 %1:_(s32) = G_TRUNC %3(s128)
420 %4:_(s1) = G_FCMP floatpred(uno), %0(s32), %1
421 %5:_(s8) = G_ANYEXT %4(s1)
422 $al = COPY %5(s8)
423 RET 0, implicit $al
424
425 ...
426 ---
427 name: fcmp_float_ueq
428 alignment: 4
429 tracksRegLiveness: true
430 registers:
431 - { id: 0, class: _ }
432 - { id: 1, class: _ }
433 - { id: 2, class: _ }
434 - { id: 3, class: _ }
435 - { id: 4, class: _ }
436 - { id: 5, class: _ }
437 body: |
438 bb.1 (%ir-block.0):
439 liveins: $xmm0, $xmm1
440
441 ; CHECK-LABEL: name: fcmp_float_ueq
442 ; CHECK: liveins: $xmm0, $xmm1
443 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
444 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
445 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
446 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
447 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s32), [[TRUNC1]]
448 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
449 ; CHECK: $al = COPY [[COPY2]](s8)
450 ; CHECK: RET 0, implicit $al
451 %2:_(s128) = COPY $xmm0
452 %0:_(s32) = G_TRUNC %2(s128)
453 %3:_(s128) = COPY $xmm1
454 %1:_(s32) = G_TRUNC %3(s128)
455 %4:_(s1) = G_FCMP floatpred(ueq), %0(s32), %1
456 %5:_(s8) = G_ANYEXT %4(s1)
457 $al = COPY %5(s8)
458 RET 0, implicit $al
459
460 ...
461 ---
462 name: fcmp_float_ugt
463 alignment: 4
464 tracksRegLiveness: true
465 registers:
466 - { id: 0, class: _ }
467 - { id: 1, class: _ }
468 - { id: 2, class: _ }
469 - { id: 3, class: _ }
470 - { id: 4, class: _ }
471 - { id: 5, class: _ }
472 body: |
473 bb.1 (%ir-block.0):
474 liveins: $xmm0, $xmm1
475
476 ; CHECK-LABEL: name: fcmp_float_ugt
477 ; CHECK: liveins: $xmm0, $xmm1
478 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
479 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
480 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
481 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
482 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s32), [[TRUNC1]]
483 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
484 ; CHECK: $al = COPY [[COPY2]](s8)
485 ; CHECK: RET 0, implicit $al
486 %2:_(s128) = COPY $xmm0
487 %0:_(s32) = G_TRUNC %2(s128)
488 %3:_(s128) = COPY $xmm1
489 %1:_(s32) = G_TRUNC %3(s128)
490 %4:_(s1) = G_FCMP floatpred(ugt), %0(s32), %1
491 %5:_(s8) = G_ANYEXT %4(s1)
492 $al = COPY %5(s8)
493 RET 0, implicit $al
494
495 ...
496 ---
497 name: fcmp_float_uge
498 alignment: 4
499 tracksRegLiveness: true
500 registers:
501 - { id: 0, class: _ }
502 - { id: 1, class: _ }
503 - { id: 2, class: _ }
504 - { id: 3, class: _ }
505 - { id: 4, class: _ }
506 - { id: 5, class: _ }
507 body: |
508 bb.1 (%ir-block.0):
509 liveins: $xmm0, $xmm1
510
511 ; CHECK-LABEL: name: fcmp_float_uge
512 ; CHECK: liveins: $xmm0, $xmm1
513 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
514 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
515 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
516 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
517 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uge), [[TRUNC]](s32), [[TRUNC1]]
518 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
519 ; CHECK: $al = COPY [[COPY2]](s8)
520 ; CHECK: RET 0, implicit $al
521 %2:_(s128) = COPY $xmm0
522 %0:_(s32) = G_TRUNC %2(s128)
523 %3:_(s128) = COPY $xmm1
524 %1:_(s32) = G_TRUNC %3(s128)
525 %4:_(s1) = G_FCMP floatpred(uge), %0(s32), %1
526 %5:_(s8) = G_ANYEXT %4(s1)
527 $al = COPY %5(s8)
528 RET 0, implicit $al
529
530 ...
531 ---
532 name: fcmp_float_ult
533 alignment: 4
534 tracksRegLiveness: true
535 registers:
536 - { id: 0, class: _ }
537 - { id: 1, class: _ }
538 - { id: 2, class: _ }
539 - { id: 3, class: _ }
540 - { id: 4, class: _ }
541 - { id: 5, class: _ }
542 body: |
543 bb.1 (%ir-block.0):
544 liveins: $xmm0, $xmm1
545
546 ; CHECK-LABEL: name: fcmp_float_ult
547 ; CHECK: liveins: $xmm0, $xmm1
548 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
549 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
550 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
551 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
552 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ult), [[TRUNC]](s32), [[TRUNC1]]
553 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
554 ; CHECK: $al = COPY [[COPY2]](s8)
555 ; CHECK: RET 0, implicit $al
556 %2:_(s128) = COPY $xmm0
557 %0:_(s32) = G_TRUNC %2(s128)
558 %3:_(s128) = COPY $xmm1
559 %1:_(s32) = G_TRUNC %3(s128)
560 %4:_(s1) = G_FCMP floatpred(ult), %0(s32), %1
561 %5:_(s8) = G_ANYEXT %4(s1)
562 $al = COPY %5(s8)
563 RET 0, implicit $al
564
565 ...
566 ---
567 name: fcmp_float_ule
568 alignment: 4
569 tracksRegLiveness: true
570 registers:
571 - { id: 0, class: _ }
572 - { id: 1, class: _ }
573 - { id: 2, class: _ }
574 - { id: 3, class: _ }
575 - { id: 4, class: _ }
576 - { id: 5, class: _ }
577 body: |
578 bb.1 (%ir-block.0):
579 liveins: $xmm0, $xmm1
580
581 ; CHECK-LABEL: name: fcmp_float_ule
582 ; CHECK: liveins: $xmm0, $xmm1
583 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
584 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
585 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
586 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
587 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ule), [[TRUNC]](s32), [[TRUNC1]]
588 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
589 ; CHECK: $al = COPY [[COPY2]](s8)
590 ; CHECK: RET 0, implicit $al
591 %2:_(s128) = COPY $xmm0
592 %0:_(s32) = G_TRUNC %2(s128)
593 %3:_(s128) = COPY $xmm1
594 %1:_(s32) = G_TRUNC %3(s128)
595 %4:_(s1) = G_FCMP floatpred(ule), %0(s32), %1
596 %5:_(s8) = G_ANYEXT %4(s1)
597 $al = COPY %5(s8)
598 RET 0, implicit $al
599
600 ...
601 ---
602 name: fcmp_float_une
603 alignment: 4
604 tracksRegLiveness: true
605 registers:
606 - { id: 0, class: _ }
607 - { id: 1, class: _ }
608 - { id: 2, class: _ }
609 - { id: 3, class: _ }
610 - { id: 4, class: _ }
611 - { id: 5, class: _ }
612 body: |
613 bb.1 (%ir-block.0):
614 liveins: $xmm0, $xmm1
615
616 ; CHECK-LABEL: name: fcmp_float_une
617 ; CHECK: liveins: $xmm0, $xmm1
618 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
619 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
620 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
621 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
622 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(une), [[TRUNC]](s32), [[TRUNC1]]
623 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
624 ; CHECK: $al = COPY [[COPY2]](s8)
625 ; CHECK: RET 0, implicit $al
626 %2:_(s128) = COPY $xmm0
627 %0:_(s32) = G_TRUNC %2(s128)
628 %3:_(s128) = COPY $xmm1
629 %1:_(s32) = G_TRUNC %3(s128)
630 %4:_(s1) = G_FCMP floatpred(une), %0(s32), %1
631 %5:_(s8) = G_ANYEXT %4(s1)
632 $al = COPY %5(s8)
633 RET 0, implicit $al
634
635 ...
636 ---
637 name: fcmp_double_oeq
638 alignment: 4
639 tracksRegLiveness: true
640 registers:
641 - { id: 0, class: _ }
642 - { id: 1, class: _ }
643 - { id: 2, class: _ }
644 - { id: 3, class: _ }
645 - { id: 4, class: _ }
646 - { id: 5, class: _ }
647 body: |
648 bb.1 (%ir-block.0):
649 liveins: $xmm0, $xmm1
650
651 ; CHECK-LABEL: name: fcmp_double_oeq
652 ; CHECK: liveins: $xmm0, $xmm1
653 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
654 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
655 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
656 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
657 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s64), [[TRUNC1]]
658 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
659 ; CHECK: $al = COPY [[COPY2]](s8)
660 ; CHECK: RET 0, implicit $al
661 %2:_(s128) = COPY $xmm0
662 %0:_(s64) = G_TRUNC %2(s128)
663 %3:_(s128) = COPY $xmm1
664 %1:_(s64) = G_TRUNC %3(s128)
665 %4:_(s1) = G_FCMP floatpred(oeq), %0(s64), %1
666 %5:_(s8) = G_ANYEXT %4(s1)
667 $al = COPY %5(s8)
668 RET 0, implicit $al
669
670 ...
671 ---
672 name: fcmp_double_ogt
673 alignment: 4
674 tracksRegLiveness: true
675 registers:
676 - { id: 0, class: _ }
677 - { id: 1, class: _ }
678 - { id: 2, class: _ }
679 - { id: 3, class: _ }
680 - { id: 4, class: _ }
681 - { id: 5, class: _ }
682 body: |
683 bb.1 (%ir-block.0):
684 liveins: $xmm0, $xmm1
685
686 ; CHECK-LABEL: name: fcmp_double_ogt
687 ; CHECK: liveins: $xmm0, $xmm1
688 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
689 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
690 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
691 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
692 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s64), [[TRUNC1]]
693 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
694 ; CHECK: $al = COPY [[COPY2]](s8)
695 ; CHECK: RET 0, implicit $al
696 %2:_(s128) = COPY $xmm0
697 %0:_(s64) = G_TRUNC %2(s128)
698 %3:_(s128) = COPY $xmm1
699 %1:_(s64) = G_TRUNC %3(s128)
700 %4:_(s1) = G_FCMP floatpred(ogt), %0(s64), %1
701 %5:_(s8) = G_ANYEXT %4(s1)
702 $al = COPY %5(s8)
703 RET 0, implicit $al
704
705 ...
706 ---
707 name: fcmp_double_oge
708 alignment: 4
709 tracksRegLiveness: true
710 registers:
711 - { id: 0, class: _ }
712 - { id: 1, class: _ }
713 - { id: 2, class: _ }
714 - { id: 3, class: _ }
715 - { id: 4, class: _ }
716 - { id: 5, class: _ }
717 body: |
718 bb.1 (%ir-block.0):
719 liveins: $xmm0, $xmm1
720
721 ; CHECK-LABEL: name: fcmp_double_oge
722 ; CHECK: liveins: $xmm0, $xmm1
723 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
724 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
725 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
726 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
727 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oge), [[TRUNC]](s64), [[TRUNC1]]
728 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
729 ; CHECK: $al = COPY [[COPY2]](s8)
730 ; CHECK: RET 0, implicit $al
731 %2:_(s128) = COPY $xmm0
732 %0:_(s64) = G_TRUNC %2(s128)
733 %3:_(s128) = COPY $xmm1
734 %1:_(s64) = G_TRUNC %3(s128)
735 %4:_(s1) = G_FCMP floatpred(oge), %0(s64), %1
736 %5:_(s8) = G_ANYEXT %4(s1)
737 $al = COPY %5(s8)
738 RET 0, implicit $al
739
740 ...
741 ---
742 name: fcmp_double_olt
743 alignment: 4
744 tracksRegLiveness: true
745 registers:
746 - { id: 0, class: _ }
747 - { id: 1, class: _ }
748 - { id: 2, class: _ }
749 - { id: 3, class: _ }
750 - { id: 4, class: _ }
751 - { id: 5, class: _ }
752 body: |
753 bb.1 (%ir-block.0):
754 liveins: $xmm0, $xmm1
755
756 ; CHECK-LABEL: name: fcmp_double_olt
757 ; CHECK: liveins: $xmm0, $xmm1
758 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
759 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
760 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
761 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
762 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(olt), [[TRUNC]](s64), [[TRUNC1]]
763 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
764 ; CHECK: $al = COPY [[COPY2]](s8)
765 ; CHECK: RET 0, implicit $al
766 %2:_(s128) = COPY $xmm0
767 %0:_(s64) = G_TRUNC %2(s128)
768 %3:_(s128) = COPY $xmm1
769 %1:_(s64) = G_TRUNC %3(s128)
770 %4:_(s1) = G_FCMP floatpred(olt), %0(s64), %1
771 %5:_(s8) = G_ANYEXT %4(s1)
772 $al = COPY %5(s8)
773 RET 0, implicit $al
774
775 ...
776 ---
777 name: fcmp_double_ole
778 alignment: 4
779 tracksRegLiveness: true
780 registers:
781 - { id: 0, class: _ }
782 - { id: 1, class: _ }
783 - { id: 2, class: _ }
784 - { id: 3, class: _ }
785 - { id: 4, class: _ }
786 - { id: 5, class: _ }
787 body: |
788 bb.1 (%ir-block.0):
789 liveins: $xmm0, $xmm1
790
791 ; CHECK-LABEL: name: fcmp_double_ole
792 ; CHECK: liveins: $xmm0, $xmm1
793 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
794 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
795 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
796 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
797 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ole), [[TRUNC]](s64), [[TRUNC1]]
798 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
799 ; CHECK: $al = COPY [[COPY2]](s8)
800 ; CHECK: RET 0, implicit $al
801 %2:_(s128) = COPY $xmm0
802 %0:_(s64) = G_TRUNC %2(s128)
803 %3:_(s128) = COPY $xmm1
804 %1:_(s64) = G_TRUNC %3(s128)
805 %4:_(s1) = G_FCMP floatpred(ole), %0(s64), %1
806 %5:_(s8) = G_ANYEXT %4(s1)
807 $al = COPY %5(s8)
808 RET 0, implicit $al
809
810 ...
811 ---
812 name: fcmp_double_one
813 alignment: 4
814 tracksRegLiveness: true
815 registers:
816 - { id: 0, class: _ }
817 - { id: 1, class: _ }
818 - { id: 2, class: _ }
819 - { id: 3, class: _ }
820 - { id: 4, class: _ }
821 - { id: 5, class: _ }
822 body: |
823 bb.1 (%ir-block.0):
824 liveins: $xmm0, $xmm1
825
826 ; CHECK-LABEL: name: fcmp_double_one
827 ; CHECK: liveins: $xmm0, $xmm1
828 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
829 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
830 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
831 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
832 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(one), [[TRUNC]](s64), [[TRUNC1]]
833 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
834 ; CHECK: $al = COPY [[COPY2]](s8)
835 ; CHECK: RET 0, implicit $al
836 %2:_(s128) = COPY $xmm0
837 %0:_(s64) = G_TRUNC %2(s128)
838 %3:_(s128) = COPY $xmm1
839 %1:_(s64) = G_TRUNC %3(s128)
840 %4:_(s1) = G_FCMP floatpred(one), %0(s64), %1
841 %5:_(s8) = G_ANYEXT %4(s1)
842 $al = COPY %5(s8)
843 RET 0, implicit $al
844
845 ...
846 ---
847 name: fcmp_double_ord
848 alignment: 4
849 tracksRegLiveness: true
850 registers:
851 - { id: 0, class: _ }
852 - { id: 1, class: _ }
853 - { id: 2, class: _ }
854 - { id: 3, class: _ }
855 - { id: 4, class: _ }
856 - { id: 5, class: _ }
857 body: |
858 bb.1 (%ir-block.0):
859 liveins: $xmm0, $xmm1
860
861 ; CHECK-LABEL: name: fcmp_double_ord
862 ; CHECK: liveins: $xmm0, $xmm1
863 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
864 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
865 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
866 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
867 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ord), [[TRUNC]](s64), [[TRUNC1]]
868 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
869 ; CHECK: $al = COPY [[COPY2]](s8)
870 ; CHECK: RET 0, implicit $al
871 %2:_(s128) = COPY $xmm0
872 %0:_(s64) = G_TRUNC %2(s128)
873 %3:_(s128) = COPY $xmm1
874 %1:_(s64) = G_TRUNC %3(s128)
875 %4:_(s1) = G_FCMP floatpred(ord), %0(s64), %1
876 %5:_(s8) = G_ANYEXT %4(s1)
877 $al = COPY %5(s8)
878 RET 0, implicit $al
879
880 ...
881 ---
882 name: fcmp_double_uno
883 alignment: 4
884 tracksRegLiveness: true
885 registers:
886 - { id: 0, class: _ }
887 - { id: 1, class: _ }
888 - { id: 2, class: _ }
889 - { id: 3, class: _ }
890 - { id: 4, class: _ }
891 - { id: 5, class: _ }
892 body: |
893 bb.1 (%ir-block.0):
894 liveins: $xmm0, $xmm1
895
896 ; CHECK-LABEL: name: fcmp_double_uno
897 ; CHECK: liveins: $xmm0, $xmm1
898 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
899 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
900 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
901 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
902 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uno), [[TRUNC]](s64), [[TRUNC1]]
903 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
904 ; CHECK: $al = COPY [[COPY2]](s8)
905 ; CHECK: RET 0, implicit $al
906 %2:_(s128) = COPY $xmm0
907 %0:_(s64) = G_TRUNC %2(s128)
908 %3:_(s128) = COPY $xmm1
909 %1:_(s64) = G_TRUNC %3(s128)
910 %4:_(s1) = G_FCMP floatpred(uno), %0(s64), %1
911 %5:_(s8) = G_ANYEXT %4(s1)
912 $al = COPY %5(s8)
913 RET 0, implicit $al
914
915 ...
916 ---
917 name: fcmp_double_ueq
918 alignment: 4
919 tracksRegLiveness: true
920 registers:
921 - { id: 0, class: _ }
922 - { id: 1, class: _ }
923 - { id: 2, class: _ }
924 - { id: 3, class: _ }
925 - { id: 4, class: _ }
926 - { id: 5, class: _ }
927 body: |
928 bb.1 (%ir-block.0):
929 liveins: $xmm0, $xmm1
930
931 ; CHECK-LABEL: name: fcmp_double_ueq
932 ; CHECK: liveins: $xmm0, $xmm1
933 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
934 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
935 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
936 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
937 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s64), [[TRUNC1]]
938 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
939 ; CHECK: $al = COPY [[COPY2]](s8)
940 ; CHECK: RET 0, implicit $al
941 %2:_(s128) = COPY $xmm0
942 %0:_(s64) = G_TRUNC %2(s128)
943 %3:_(s128) = COPY $xmm1
944 %1:_(s64) = G_TRUNC %3(s128)
945 %4:_(s1) = G_FCMP floatpred(ueq), %0(s64), %1
946 %5:_(s8) = G_ANYEXT %4(s1)
947 $al = COPY %5(s8)
948 RET 0, implicit $al
949
950 ...
951 ---
952 name: fcmp_double_ugt
953 alignment: 4
954 tracksRegLiveness: true
955 registers:
956 - { id: 0, class: _ }
957 - { id: 1, class: _ }
958 - { id: 2, class: _ }
959 - { id: 3, class: _ }
960 - { id: 4, class: _ }
961 - { id: 5, class: _ }
962 body: |
963 bb.1 (%ir-block.0):
964 liveins: $xmm0, $xmm1
965
966 ; CHECK-LABEL: name: fcmp_double_ugt
967 ; CHECK: liveins: $xmm0, $xmm1
968 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
969 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
970 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
971 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
972 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s64), [[TRUNC1]]
973 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
974 ; CHECK: $al = COPY [[COPY2]](s8)
975 ; CHECK: RET 0, implicit $al
976 %2:_(s128) = COPY $xmm0
977 %0:_(s64) = G_TRUNC %2(s128)
978 %3:_(s128) = COPY $xmm1
979 %1:_(s64) = G_TRUNC %3(s128)
980 %4:_(s1) = G_FCMP floatpred(ugt), %0(s64), %1
981 %5:_(s8) = G_ANYEXT %4(s1)
982 $al = COPY %5(s8)
983 RET 0, implicit $al
984
985 ...
986 ---
987 name: fcmp_double_uge
988 alignment: 4
989 tracksRegLiveness: true
990 registers:
991 - { id: 0, class: _ }
992 - { id: 1, class: _ }
993 - { id: 2, class: _ }
994 - { id: 3, class: _ }
995 - { id: 4, class: _ }
996 - { id: 5, class: _ }
997 body: |
998 bb.1 (%ir-block.0):
999 liveins: $xmm0, $xmm1
1000
1001 ; CHECK-LABEL: name: fcmp_double_uge
1002 ; CHECK: liveins: $xmm0, $xmm1
1003 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1004 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1005 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1006 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1007 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uge), [[TRUNC]](s64), [[TRUNC1]]
1008 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
1009 ; CHECK: $al = COPY [[COPY2]](s8)
1010 ; CHECK: RET 0, implicit $al
1011 %2:_(s128) = COPY $xmm0
1012 %0:_(s64) = G_TRUNC %2(s128)
1013 %3:_(s128) = COPY $xmm1
1014 %1:_(s64) = G_TRUNC %3(s128)
1015 %4:_(s1) = G_FCMP floatpred(uge), %0(s64), %1
1016 %5:_(s8) = G_ANYEXT %4(s1)
1017 $al = COPY %5(s8)
1018 RET 0, implicit $al
1019
1020 ...
1021 ---
1022 name: fcmp_double_ult
1023 alignment: 4
1024 tracksRegLiveness: true
1025 registers:
1026 - { id: 0, class: _ }
1027 - { id: 1, class: _ }
1028 - { id: 2, class: _ }
1029 - { id: 3, class: _ }
1030 - { id: 4, class: _ }
1031 - { id: 5, class: _ }
1032 body: |
1033 bb.1 (%ir-block.0):
1034 liveins: $xmm0, $xmm1
1035
1036 ; CHECK-LABEL: name: fcmp_double_ult
1037 ; CHECK: liveins: $xmm0, $xmm1
1038 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1039 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1040 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1041 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1042 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ult), [[TRUNC]](s64), [[TRUNC1]]
1043 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
1044 ; CHECK: $al = COPY [[COPY2]](s8)
1045 ; CHECK: RET 0, implicit $al
1046 %2:_(s128) = COPY $xmm0
1047 %0:_(s64) = G_TRUNC %2(s128)
1048 %3:_(s128) = COPY $xmm1
1049 %1:_(s64) = G_TRUNC %3(s128)
1050 %4:_(s1) = G_FCMP floatpred(ult), %0(s64), %1
1051 %5:_(s8) = G_ANYEXT %4(s1)
1052 $al = COPY %5(s8)
1053 RET 0, implicit $al
1054
1055 ...
1056 ---
1057 name: fcmp_double_ule
1058 alignment: 4
1059 tracksRegLiveness: true
1060 registers:
1061 - { id: 0, class: _ }
1062 - { id: 1, class: _ }
1063 - { id: 2, class: _ }
1064 - { id: 3, class: _ }
1065 - { id: 4, class: _ }
1066 - { id: 5, class: _ }
1067 body: |
1068 bb.1 (%ir-block.0):
1069 liveins: $xmm0, $xmm1
1070
1071 ; CHECK-LABEL: name: fcmp_double_ule
1072 ; CHECK: liveins: $xmm0, $xmm1
1073 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1074 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1075 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1076 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1077 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ule), [[TRUNC]](s64), [[TRUNC1]]
1078 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
1079 ; CHECK: $al = COPY [[COPY2]](s8)
1080 ; CHECK: RET 0, implicit $al
1081 %2:_(s128) = COPY $xmm0
1082 %0:_(s64) = G_TRUNC %2(s128)
1083 %3:_(s128) = COPY $xmm1
1084 %1:_(s64) = G_TRUNC %3(s128)
1085 %4:_(s1) = G_FCMP floatpred(ule), %0(s64), %1
1086 %5:_(s8) = G_ANYEXT %4(s1)
1087 $al = COPY %5(s8)
1088 RET 0, implicit $al
1089
1090 ...
1091 ---
1092 name: fcmp_double_une
1093 alignment: 4
1094 tracksRegLiveness: true
1095 registers:
1096 - { id: 0, class: _ }
1097 - { id: 1, class: _ }
1098 - { id: 2, class: _ }
1099 - { id: 3, class: _ }
1100 - { id: 4, class: _ }
1101 - { id: 5, class: _ }
1102 body: |
1103 bb.1 (%ir-block.0):
1104 liveins: $xmm0, $xmm1
1105
1106 ; CHECK-LABEL: name: fcmp_double_une
1107 ; CHECK: liveins: $xmm0, $xmm1
1108 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1109 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1110 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1111 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1112 ; CHECK: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(une), [[TRUNC]](s64), [[TRUNC1]]
1113 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[FCMP]](s8)
1114 ; CHECK: $al = COPY [[COPY2]](s8)
1115 ; CHECK: RET 0, implicit $al
1116 %2:_(s128) = COPY $xmm0
1117 %0:_(s64) = G_TRUNC %2(s128)
1118 %3:_(s128) = COPY $xmm1
1119 %1:_(s64) = G_TRUNC %3(s128)
1120 %4:_(s1) = G_FCMP floatpred(une), %0(s64), %1
1121 %5:_(s8) = G_ANYEXT %4(s1)
1122 $al = COPY %5(s8)
1123 RET 0, implicit $al
1124
1125 ...
0 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
1 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
2
3 --- |
4
5 define i1 @fcmp_float_oeq(float %x, float %y) {
6 %1 = fcmp oeq float %x, %y
7 ret i1 %1
8 }
9
10 define i1 @fcmp_float_ogt(float %x, float %y) {
11 %1 = fcmp ogt float %x, %y
12 ret i1 %1
13 }
14
15 define i1 @fcmp_float_oge(float %x, float %y) {
16 %1 = fcmp oge float %x, %y
17 ret i1 %1
18 }
19
20 define i1 @fcmp_float_olt(float %x, float %y) {
21 %1 = fcmp olt float %x, %y
22 ret i1 %1
23 }
24
25 define i1 @fcmp_float_ole(float %x, float %y) {
26 %1 = fcmp ole float %x, %y
27 ret i1 %1
28 }
29
30 define i1 @fcmp_float_one(float %x, float %y) {
31 %1 = fcmp one float %x, %y
32 ret i1 %1
33 }
34
35 define i1 @fcmp_float_ord(float %x, float %y) {
36 %1 = fcmp ord float %x, %y
37 ret i1 %1
38 }
39
40 define i1 @fcmp_float_uno(float %x, float %y) {
41 %1 = fcmp uno float %x, %y
42 ret i1 %1
43 }
44
45 define i1 @fcmp_float_ueq(float %x, float %y) {
46 %1 = fcmp ueq float %x, %y
47 ret i1 %1
48 }
49
50 define i1 @fcmp_float_ugt(float %x, float %y) {
51 %1 = fcmp ugt float %x, %y
52 ret i1 %1
53 }
54
55 define i1 @fcmp_float_uge(float %x, float %y) {
56 %1 = fcmp uge float %x, %y
57 ret i1 %1
58 }
59
60 define i1 @fcmp_float_ult(float %x, float %y) {
61 %1 = fcmp ult float %x, %y
62 ret i1 %1
63 }
64
65 define i1 @fcmp_float_ule(float %x, float %y) {
66 %1 = fcmp ule float %x, %y
67 ret i1 %1
68 }
69
70 define i1 @fcmp_float_une(float %x, float %y) {
71 %1 = fcmp une float %x, %y
72 ret i1 %1
73 }
74
75 define i1 @fcmp_double_oeq(double %x, double %y) {
76 %1 = fcmp oeq double %x, %y
77 ret i1 %1
78 }
79
80 define i1 @fcmp_double_ogt(double %x, double %y) {
81 %1 = fcmp ogt double %x, %y
82 ret i1 %1
83 }
84
85 define i1 @fcmp_double_oge(double %x, double %y) {
86 %1 = fcmp oge double %x, %y
87 ret i1 %1
88 }
89
90 define i1 @fcmp_double_olt(double %x, double %y) {
91 %1 = fcmp olt double %x, %y
92 ret i1 %1
93 }
94
95 define i1 @fcmp_double_ole(double %x, double %y) {
96 %1 = fcmp ole double %x, %y
97 ret i1 %1
98 }
99
100 define i1 @fcmp_double_one(double %x, double %y) {
101 %1 = fcmp one double %x, %y
102 ret i1 %1
103 }
104
105 define i1 @fcmp_double_ord(double %x, double %y) {
106 %1 = fcmp ord double %x, %y
107 ret i1 %1
108 }
109
110 define i1 @fcmp_double_uno(double %x, double %y) {
111 %1 = fcmp uno double %x, %y
112 ret i1 %1
113 }
114
115 define i1 @fcmp_double_ueq(double %x, double %y) {
116 %1 = fcmp ueq double %x, %y
117 ret i1 %1
118 }
119
120 define i1 @fcmp_double_ugt(double %x, double %y) {
121 %1 = fcmp ugt double %x, %y
122 ret i1 %1
123 }
124
125 define i1 @fcmp_double_uge(double %x, double %y) {
126 %1 = fcmp uge double %x, %y
127 ret i1 %1
128 }
129
130 define i1 @fcmp_double_ult(double %x, double %y) {
131 %1 = fcmp ult double %x, %y
132 ret i1 %1
133 }
134
135 define i1 @fcmp_double_ule(double %x, double %y) {
136 %1 = fcmp ule double %x, %y
137 ret i1 %1
138 }
139
140 define i1 @fcmp_double_une(double %x, double %y) {
141 %1 = fcmp une double %x, %y
142 ret i1 %1
143 }
144
145 ...
146 ---
147 name: fcmp_float_oeq
148 alignment: 4
149 legalized: true
150 regBankSelected: true
151 tracksRegLiveness: true
152 registers:
153 - { id: 0, class: vecr }
154 - { id: 1, class: vecr }
155 - { id: 2, class: vecr }
156 - { id: 3, class: vecr }
157 - { id: 4, class: _ }
158 - { id: 5, class: gpr }
159 - { id: 6, class: gpr }
160 body: |
161 bb.1 (%ir-block.0):
162 liveins: $xmm0, $xmm1
163
164 ; CHECK-LABEL: name: fcmp_float_oeq
165 ; CHECK: liveins: $xmm0, $xmm1
166 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
167 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
168 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
169 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
170 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
171 ; CHECK: [[SETEr:%[0-9]+]]:gr8 = SETEr implicit $eflags
172 ; CHECK: [[SETNPr:%[0-9]+]]:gr8 = SETNPr implicit $eflags
173 ; CHECK: [[AND8rr:%[0-9]+]]:gr8 = AND8rr [[SETEr]], [[SETNPr]], implicit-def $eflags
174 ; CHECK: $al = COPY [[AND8rr]]
175 ; CHECK: RET 0, implicit $al
176 %2:vecr(s128) = COPY $xmm0
177 %0:vecr(s32) = G_TRUNC %2(s128)
178 %3:vecr(s128) = COPY $xmm1
179 %1:vecr(s32) = G_TRUNC %3(s128)
180 %6:gpr(s8) = G_FCMP floatpred(oeq), %0(s32), %1
181 %5:gpr(s8) = COPY %6(s8)
182 $al = COPY %5(s8)
183 RET 0, implicit $al
184
185 ...
186 ---
187 name: fcmp_float_ogt
188 alignment: 4
189 legalized: true
190 regBankSelected: true
191 tracksRegLiveness: true
192 registers:
193 - { id: 0, class: vecr }
194 - { id: 1, class: vecr }
195 - { id: 2, class: vecr }
196 - { id: 3, class: vecr }
197 - { id: 4, class: _ }
198 - { id: 5, class: gpr }
199 - { id: 6, class: gpr }
200 body: |
201 bb.1 (%ir-block.0):
202 liveins: $xmm0, $xmm1
203
204 ; CHECK-LABEL: name: fcmp_float_ogt
205 ; CHECK: liveins: $xmm0, $xmm1
206 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
207 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
208 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
209 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
210 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
211 ; CHECK: [[SETAr:%[0-9]+]]:gr8 = SETAr implicit $eflags
212 ; CHECK: $al = COPY [[SETAr]]
213 ; CHECK: RET 0, implicit $al
214 %2:vecr(s128) = COPY $xmm0
215 %0:vecr(s32) = G_TRUNC %2(s128)
216 %3:vecr(s128) = COPY $xmm1
217 %1:vecr(s32) = G_TRUNC %3(s128)
218 %6:gpr(s8) = G_FCMP floatpred(ogt), %0(s32), %1
219 %5:gpr(s8) = COPY %6(s8)
220 $al = COPY %5(s8)
221 RET 0, implicit $al
222
223 ...
224 ---
225 name: fcmp_float_oge
226 alignment: 4
227 legalized: true
228 regBankSelected: true
229 tracksRegLiveness: true
230 registers:
231 - { id: 0, class: vecr }
232 - { id: 1, class: vecr }
233 - { id: 2, class: vecr }
234 - { id: 3, class: vecr }
235 - { id: 4, class: _ }
236 - { id: 5, class: gpr }
237 - { id: 6, class: gpr }
238 body: |
239 bb.1 (%ir-block.0):
240 liveins: $xmm0, $xmm1
241
242 ; CHECK-LABEL: name: fcmp_float_oge
243 ; CHECK: liveins: $xmm0, $xmm1
244 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
245 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
246 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
247 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
248 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
249 ; CHECK: [[SETAEr:%[0-9]+]]:gr8 = SETAEr implicit $eflags
250 ; CHECK: $al = COPY [[SETAEr]]
251 ; CHECK: RET 0, implicit $al
252 %2:vecr(s128) = COPY $xmm0
253 %0:vecr(s32) = G_TRUNC %2(s128)
254 %3:vecr(s128) = COPY $xmm1
255 %1:vecr(s32) = G_TRUNC %3(s128)
256 %6:gpr(s8) = G_FCMP floatpred(oge), %0(s32), %1
257 %5:gpr(s8) = COPY %6(s8)
258 $al = COPY %5(s8)
259 RET 0, implicit $al
260
261 ...
262 ---
263 name: fcmp_float_olt
264 alignment: 4
265 legalized: true
266 regBankSelected: true
267 tracksRegLiveness: true
268 registers:
269 - { id: 0, class: vecr }
270 - { id: 1, class: vecr }
271 - { id: 2, class: vecr }
272 - { id: 3, class: vecr }
273 - { id: 4, class: _ }
274 - { id: 5, class: gpr }
275 - { id: 6, class: gpr }
276 body: |
277 bb.1 (%ir-block.0):
278 liveins: $xmm0, $xmm1
279
280 ; CHECK-LABEL: name: fcmp_float_olt
281 ; CHECK: liveins: $xmm0, $xmm1
282 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
283 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
284 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
285 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
286 ; CHECK: UCOMISSrr [[COPY3]], [[COPY1]], implicit-def $eflags
287 ; CHECK: [[SETAr:%[0-9]+]]:gr8 = SETAr implicit $eflags
288 ; CHECK: $al = COPY [[SETAr]]
289 ; CHECK: RET 0, implicit $al
290 %2:vecr(s128) = COPY $xmm0
291 %0:vecr(s32) = G_TRUNC %2(s128)
292 %3:vecr(s128) = COPY $xmm1
293 %1:vecr(s32) = G_TRUNC %3(s128)
294 %6:gpr(s8) = G_FCMP floatpred(olt), %0(s32), %1
295 %5:gpr(s8) = COPY %6(s8)
296 $al = COPY %5(s8)
297 RET 0, implicit $al
298
299 ...
300 ---
301 name: fcmp_float_ole
302 alignment: 4
303 legalized: true
304 regBankSelected: true
305 tracksRegLiveness: true
306 registers:
307 - { id: 0, class: vecr }
308 - { id: 1, class: vecr }
309 - { id: 2, class: vecr }
310 - { id: 3, class: vecr }
311 - { id: 4, class: _ }
312 - { id: 5, class: gpr }
313 - { id: 6, class: gpr }
314 body: |
315 bb.1 (%ir-block.0):
316 liveins: $xmm0, $xmm1
317
318 ; CHECK-LABEL: name: fcmp_float_ole
319 ; CHECK: liveins: $xmm0, $xmm1
320 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
321 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
322 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
323 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
324 ; CHECK: UCOMISSrr [[COPY3]], [[COPY1]], implicit-def $eflags
325 ; CHECK: [[SETAEr:%[0-9]+]]:gr8 = SETAEr implicit $eflags
326 ; CHECK: $al = COPY [[SETAEr]]
327 ; CHECK: RET 0, implicit $al
328 %2:vecr(s128) = COPY $xmm0
329 %0:vecr(s32) = G_TRUNC %2(s128)
330 %3:vecr(s128) = COPY $xmm1
331 %1:vecr(s32) = G_TRUNC %3(s128)
332 %6:gpr(s8) = G_FCMP floatpred(ole), %0(s32), %1
333 %5:gpr(s8) = COPY %6(s8)
334 $al = COPY %5(s8)
335 RET 0, implicit $al
336
337 ...
338 ---
339 name: fcmp_float_one
340 alignment: 4
341 legalized: true
342 regBankSelected: true
343 tracksRegLiveness: true
344 registers:
345 - { id: 0, class: vecr }
346 - { id: 1, class: vecr }
347 - { id: 2, class: vecr }
348 - { id: 3, class: vecr }
349 - { id: 4, class: _ }
350 - { id: 5, class: gpr }
351 - { id: 6, class: gpr }
352 body: |
353 bb.1 (%ir-block.0):
354 liveins: $xmm0, $xmm1
355
356 ; CHECK-LABEL: name: fcmp_float_one
357 ; CHECK: liveins: $xmm0, $xmm1
358 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
359 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
360 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
361 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
362 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
363 ; CHECK: [[SETNEr:%[0-9]+]]:gr8 = SETNEr implicit $eflags
364 ; CHECK: $al = COPY [[SETNEr]]
365 ; CHECK: RET 0, implicit $al
366 %2:vecr(s128) = COPY $xmm0
367 %0:vecr(s32) = G_TRUNC %2(s128)
368 %3:vecr(s128) = COPY $xmm1
369 %1:vecr(s32) = G_TRUNC %3(s128)
370 %6:gpr(s8) = G_FCMP floatpred(one), %0(s32), %1
371 %5:gpr(s8) = COPY %6(s8)
372 $al = COPY %5(s8)
373 RET 0, implicit $al
374
375 ...
376 ---
377 name: fcmp_float_ord
378 alignment: 4
379 legalized: true
380 regBankSelected: true
381 tracksRegLiveness: true
382 registers:
383 - { id: 0, class: vecr }
384 - { id: 1, class: vecr }
385 - { id: 2, class: vecr }
386 - { id: 3, class: vecr }
387 - { id: 4, class: _ }
388 - { id: 5, class: gpr }
389 - { id: 6, class: gpr }
390 body: |
391 bb.1 (%ir-block.0):
392 liveins: $xmm0, $xmm1
393
394 ; CHECK-LABEL: name: fcmp_float_ord
395 ; CHECK: liveins: $xmm0, $xmm1
396 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
397 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
398 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
399 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
400 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
401 ; CHECK: [[SETNPr:%[0-9]+]]:gr8 = SETNPr implicit $eflags
402 ; CHECK: $al = COPY [[SETNPr]]
403 ; CHECK: RET 0, implicit $al
404 %2:vecr(s128) = COPY $xmm0
405 %0:vecr(s32) = G_TRUNC %2(s128)
406 %3:vecr(s128) = COPY $xmm1
407 %1:vecr(s32) = G_TRUNC %3(s128)
408 %6:gpr(s8) = G_FCMP floatpred(ord), %0(s32), %1
409 %5:gpr(s8) = COPY %6(s8)
410 $al = COPY %5(s8)
411 RET 0, implicit $al
412
413 ...
414 ---
415 name: fcmp_float_uno
416 alignment: 4
417 legalized: true
418 regBankSelected: true
419 tracksRegLiveness: true
420 registers:
421 - { id: 0, class: vecr }
422 - { id: 1, class: vecr }
423 - { id: 2, class: vecr }
424 - { id: 3, class: vecr }
425 - { id: 4, class: _ }
426 - { id: 5, class: gpr }
427 - { id: 6, class: gpr }
428 body: |
429 bb.1 (%ir-block.0):
430 liveins: $xmm0, $xmm1
431
432 ; CHECK-LABEL: name: fcmp_float_uno
433 ; CHECK: liveins: $xmm0, $xmm1
434 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
435 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
436 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
437 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
438 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
439 ; CHECK: [[SETPr:%[0-9]+]]:gr8 = SETPr implicit $eflags
440 ; CHECK: $al = COPY [[SETPr]]
441 ; CHECK: RET 0, implicit $al
442 %2:vecr(s128) = COPY $xmm0
443 %0:vecr(s32) = G_TRUNC %2(s128)
444 %3:vecr(s128) = COPY $xmm1
445 %1:vecr(s32) = G_TRUNC %3(s128)
446 %6:gpr(s8) = G_FCMP floatpred(uno), %0(s32), %1
447 %5:gpr(s8) = COPY %6(s8)
448 $al = COPY %5(s8)
449 RET 0, implicit $al
450
451 ...
452 ---
453 name: fcmp_float_ueq
454 alignment: 4
455 legalized: true
456 regBankSelected: true
457 tracksRegLiveness: true
458 registers:
459 - { id: 0, class: vecr }
460 - { id: 1, class: vecr }
461 - { id: 2, class: vecr }
462 - { id: 3, class: vecr }
463 - { id: 4, class: _ }
464 - { id: 5, class: gpr }
465 - { id: 6, class: gpr }
466 body: |
467 bb.1 (%ir-block.0):
468 liveins: $xmm0, $xmm1
469
470 ; CHECK-LABEL: name: fcmp_float_ueq
471 ; CHECK: liveins: $xmm0, $xmm1
472 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
473 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
474 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
475 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
476 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
477 ; CHECK: [[SETEr:%[0-9]+]]:gr8 = SETEr implicit $eflags
478 ; CHECK: $al = COPY [[SETEr]]
479 ; CHECK: RET 0, implicit $al
480 %2:vecr(s128) = COPY $xmm0
481 %0:vecr(s32) = G_TRUNC %2(s128)
482 %3:vecr(s128) = COPY $xmm1
483 %1:vecr(s32) = G_TRUNC %3(s128)
484 %6:gpr(s8) = G_FCMP floatpred(ueq), %0(s32), %1
485 %5:gpr(s8) = COPY %6(s8)
486 $al = COPY %5(s8)
487 RET 0, implicit $al
488
489 ...
490 ---
491 name: fcmp_float_ugt
492 alignment: 4
493 legalized: true
494 regBankSelected: true
495 tracksRegLiveness: true
496 registers:
497 - { id: 0, class: vecr }
498 - { id: 1, class: vecr }
499 - { id: 2, class: vecr }
500 - { id: 3, class: vecr }
501 - { id: 4, class: _ }
502 - { id: 5, class: gpr }
503 - { id: 6, class: gpr }
504 body: |
505 bb.1 (%ir-block.0):
506 liveins: $xmm0, $xmm1
507
508 ; CHECK-LABEL: name: fcmp_float_ugt
509 ; CHECK: liveins: $xmm0, $xmm1
510 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
511 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
512 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
513 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
514 ; CHECK: UCOMISSrr [[COPY3]], [[COPY1]], implicit-def $eflags
515 ; CHECK: [[SETBr:%[0-9]+]]:gr8 = SETBr implicit $eflags
516 ; CHECK: $al = COPY [[SETBr]]
517 ; CHECK: RET 0, implicit $al
518 %2:vecr(s128) = COPY $xmm0
519 %0:vecr(s32) = G_TRUNC %2(s128)
520 %3:vecr(s128) = COPY $xmm1
521 %1:vecr(s32) = G_TRUNC %3(s128)
522 %6:gpr(s8) = G_FCMP floatpred(ugt), %0(s32), %1
523 %5:gpr(s8) = COPY %6(s8)
524 $al = COPY %5(s8)
525 RET 0, implicit $al
526
527 ...
528 ---
529 name: fcmp_float_uge
530 alignment: 4
531 legalized: true
532 regBankSelected: true
533 tracksRegLiveness: true
534 registers:
535 - { id: 0, class: vecr }
536 - { id: 1, class: vecr }
537 - { id: 2, class: vecr }
538 - { id: 3, class: vecr }
539 - { id: 4, class: _ }
540 - { id: 5, class: gpr }
541 - { id: 6, class: gpr }
542 body: |
543 bb.1 (%ir-block.0):
544 liveins: $xmm0, $xmm1
545
546 ; CHECK-LABEL: name: fcmp_float_uge
547 ; CHECK: liveins: $xmm0, $xmm1
548 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
549 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
550 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
551 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
552 ; CHECK: UCOMISSrr [[COPY3]], [[COPY1]], implicit-def $eflags
553 ; CHECK: [[SETBEr:%[0-9]+]]:gr8 = SETBEr implicit $eflags
554 ; CHECK: $al = COPY [[SETBEr]]
555 ; CHECK: RET 0, implicit $al
556 %2:vecr(s128) = COPY $xmm0
557 %0:vecr(s32) = G_TRUNC %2(s128)
558 %3:vecr(s128) = COPY $xmm1
559 %1:vecr(s32) = G_TRUNC %3(s128)
560 %6:gpr(s8) = G_FCMP floatpred(uge), %0(s32), %1
561 %5:gpr(s8) = COPY %6(s8)
562 $al = COPY %5(s8)
563 RET 0, implicit $al
564
565 ...
566 ---
567 name: fcmp_float_ult
568 alignment: 4
569 legalized: true
570 regBankSelected: true
571 tracksRegLiveness: true
572 registers:
573 - { id: 0, class: vecr }
574 - { id: 1, class: vecr }
575 - { id: 2, class: vecr }
576 - { id: 3, class: vecr }
577 - { id: 4, class: _ }
578 - { id: 5, class: gpr }
579 - { id: 6, class: gpr }
580 body: |
581 bb.1 (%ir-block.0):
582 liveins: $xmm0, $xmm1
583
584 ; CHECK-LABEL: name: fcmp_float_ult
585 ; CHECK: liveins: $xmm0, $xmm1
586 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
587 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
588 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
589 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
590 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
591 ; CHECK: [[SETBr:%[0-9]+]]:gr8 = SETBr implicit $eflags
592 ; CHECK: $al = COPY [[SETBr]]
593 ; CHECK: RET 0, implicit $al
594 %2:vecr(s128) = COPY $xmm0
595 %0:vecr(s32) = G_TRUNC %2(s128)
596 %3:vecr(s128) = COPY $xmm1
597 %1:vecr(s32) = G_TRUNC %3(s128)
598 %6:gpr(s8) = G_FCMP floatpred(ult), %0(s32), %1
599 %5:gpr(s8) = COPY %6(s8)
600 $al = COPY %5(s8)
601 RET 0, implicit $al
602
603 ...
604 ---
605 name: fcmp_float_ule
606 alignment: 4
607 legalized: true
608 regBankSelected: true
609 tracksRegLiveness: true
610 registers:
611 - { id: 0, class: vecr }
612 - { id: 1, class: vecr }
613 - { id: 2, class: vecr }
614 - { id: 3, class: vecr }
615 - { id: 4, class: _ }
616 - { id: 5, class: gpr }
617 - { id: 6, class: gpr }
618 body: |
619 bb.1 (%ir-block.0):
620 liveins: $xmm0, $xmm1
621
622 ; CHECK-LABEL: name: fcmp_float_ule
623 ; CHECK: liveins: $xmm0, $xmm1
624 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
625 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
626 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
627 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
628 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
629 ; CHECK: [[SETBEr:%[0-9]+]]:gr8 = SETBEr implicit $eflags
630 ; CHECK: $al = COPY [[SETBEr]]
631 ; CHECK: RET 0, implicit $al
632 %2:vecr(s128) = COPY $xmm0
633 %0:vecr(s32) = G_TRUNC %2(s128)
634 %3:vecr(s128) = COPY $xmm1
635 %1:vecr(s32) = G_TRUNC %3(s128)
636 %6:gpr(s8) = G_FCMP floatpred(ule), %0(s32), %1
637 %5:gpr(s8) = COPY %6(s8)
638 $al = COPY %5(s8)
639 RET 0, implicit $al
640
641 ...
642 ---
643 name: fcmp_float_une
644 alignment: 4
645 legalized: true
646 regBankSelected: true
647 tracksRegLiveness: true
648 registers:
649 - { id: 0, class: vecr }
650 - { id: 1, class: vecr }
651 - { id: 2, class: vecr }
652 - { id: 3, class: vecr }
653 - { id: 4, class: _ }
654 - { id: 5, class: gpr }
655 - { id: 6, class: gpr }
656 body: |
657 bb.1 (%ir-block.0):
658 liveins: $xmm0, $xmm1
659
660 ; CHECK-LABEL: name: fcmp_float_une
661 ; CHECK: liveins: $xmm0, $xmm1
662 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
663 ; CHECK: [[COPY1:%[0-9]+]]:fr32 = COPY [[COPY]]
664 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
665 ; CHECK: [[COPY3:%[0-9]+]]:fr32 = COPY [[COPY2]]
666 ; CHECK: UCOMISSrr [[COPY1]], [[COPY3]], implicit-def $eflags
667 ; CHECK: [[SETNEr:%[0-9]+]]:gr8 = SETNEr implicit $eflags
668 ; CHECK: [[SETPr:%[0-9]+]]:gr8 = SETPr implicit $eflags
669 ; CHECK: [[OR8rr:%[0-9]+]]:gr8 = OR8rr [[SETNEr]], [[SETPr]], implicit-def $eflags
670 ; CHECK: $al = COPY [[OR8rr]]
671 ; CHECK: RET 0, implicit $al
672 %2:vecr(s128) = COPY $xmm0
673 %0:vecr(s32) = G_TRUNC %2(s128)
674 %3:vecr(s128) = COPY $xmm1
675 %1:vecr(s32) = G_TRUNC %3(s128)
676 %6:gpr(s8) = G_FCMP floatpred(une), %0(s32), %1
677 %5:gpr(s8) = COPY %6(s8)
678 $al = COPY %5(s8)
679 RET 0, implicit $al
680
681 ...
682 ---
683 name: fcmp_double_oeq
684 alignment: 4
685 legalized: true
686 regBankSelected: true
687 tracksRegLiveness: true
688 registers:
689 - { id: 0, class: vecr }
690 - { id: 1, class: vecr }
691 - { id: 2, class: vecr }
692 - { id: 3, class: vecr }
693 - { id: 4, class: _ }
694 - { id: 5, class: gpr }
695 - { id: 6, class: gpr }
696 body: |
697 bb.1 (%ir-block.0):
698 liveins: $xmm0, $xmm1
699
700 ; CHECK-LABEL: name: fcmp_double_oeq
701 ; CHECK: liveins: $xmm0, $xmm1
702 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
703 ; CHECK: [[COPY1:%[0-9]+]]:fr64 = COPY [[COPY]]
704 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
705 ; CHECK: [[COPY3:%[0-9]+]]:fr64 = COPY [[COPY2]]
706 ; CHECK: UCOMISDrr [[COPY1]], [[COPY3]], implicit-def $eflags
707 ; CHECK: [[SETEr:%[0-9]+]]:gr8 = SETEr implicit $eflags
708 ; CHECK: [[SETNPr:%[0-9]+]]:gr8 = SETNPr implicit $eflags
709 ; CHECK: [[AND8rr:%[0-9]+]]:gr8 = AND8rr [[SETEr]], [[SETNPr]], implicit-def $eflags
710 ; CHECK: $al = COPY [[AND8rr]]
711 ; CHECK: RET 0, implicit $al
712 %2:vecr(s128) = COPY $xmm0
713 %0:vecr(s64) = G_TRUNC %2(s128)
714 %3:vecr(s128) = COPY $xmm1
715 %1:vecr(s64) = G_TRUNC %3(s128)
716 %6:gpr(s8) = G_FCMP floatpred(oeq), %0(s64), %1
717 %5:gpr(s8) = COPY %6(s8)
718 $al = COPY %5(s8)
719 RET 0, implicit $al
720
721 ...
722 ---
723 name: fcmp_double_ogt
724 alignment: 4
725 legalized: true
726 regBankSelected: true
727 tracksRegLiveness: true
728 registers:
729 - { id: 0, class: vecr }
730 - { id: 1, class: vecr }
731 - { id: 2, class: vecr }
732 - { id: 3, class: vecr }
733 - { id: 4, class: _ }
734 - { id: 5, class: gpr }
735 - { id: 6, class: gpr }
736 body: |
737 bb.1 (%ir-block.0):
738 liveins: $xmm0, $xmm1
739
740 ; CHECK-LABEL: name: fcmp_double_ogt
741 ; CHECK: liveins: $xmm0, $xmm1
742 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
743 ; CHECK: [[COPY1:%[0-9]+]]:fr64 = COPY [[COPY]]
744 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
745 ; CHECK: [[COPY3:%[0-9]+]]:fr64 = COPY [[COPY2]]
746 ; CHECK: UCOMISDrr [[COPY1]], [[COPY3]], implicit-def $eflags
747 ; CHECK: [[SETAr:%[0-9]+]]:gr8 = SETAr implicit $eflags
748 ; CHECK: $al = COPY [[SETAr]]
749 ; CHECK: RET 0, implicit $al
750 %2:vecr(s128) = COPY $xmm0
751 %0:vecr(s64) = G_TRUNC %2(s128)
752 %3:vecr(s128) = COPY $xmm1
753 %1:vecr(s64) = G_TRUNC %3(s128)
754 %6:gpr(s8) = G_FCMP floatpred(ogt), %0(s64), %1
755 %5:gpr(s8) = COPY %6(s8)
756 $al = COPY %5(s8)
757 RET 0, implicit $al
758
759 ...
760 ---
761 name: fcmp_double_oge
762 alignment: 4
763 legalized: true
764 regBankSelected: true
765 tracksRegLiveness: true
766 registers:
767 - { id: 0, class: vecr }
768 - { id: 1, class: vecr }
769 - { id: 2, class: vecr }
770 - { id: 3, class: vecr }
771 - { id: 4, class: _ }
772 - { id: 5, class: gpr }
773 - { id: 6, class: gpr }
774 body: |
775 bb.1 (%ir-block.0):
776 liveins: $xmm0, $xmm1
777
778 ; CHECK-LABEL: name: fcmp_double_oge
779 ; CHECK: liveins: $xmm0, $xmm1
780 ; CHECK: [[COPY:%[0-9]+]]:vr128 = COPY $xmm0
781 ; CHECK: [[COPY1:%[0-9]+]]:fr64 = COPY [[COPY]]
782 ; CHECK: [[COPY2:%[0-9]+]]:vr128 = COPY $xmm1
783 ; CHECK: [[COPY3:%[0-9]+]]:fr64 = COPY [[COPY2]]
784 ; CHECK: UCOMISDrr [[COPY1]], [[COPY3]], implicit-def $eflags
785 ; CHECK: [[SETAEr:%[0-9]+]]:gr8 = SETAEr implicit $eflags
786 ; CHECK: $al = COPY [[SETAEr]]
787 ; CHECK: RET 0, implicit $al
788 %2:vecr(s128) = COPY $xmm0
789 %0:vecr(s64) = G_TRUNC %2(s128)
790