From 8af6dec9751c8c0dd33c9429bde6c07a8db77eb0 Mon Sep 17 00:00:00 2001 From: Jo Seaton Date: Wed, 16 Apr 2025 18:19:24 +0100 Subject: [PATCH 1/2] [AIE2] Add FP64 support to G_FCMP legalizer --- llvm/lib/Target/AIE/AIE2LegalizerInfo.cpp | 2 +- llvm/lib/Target/AIE/AIELegalizerHelper.cpp | 79 +++++++++++++++---- llvm/lib/Target/AIE/AIELegalizerHelper.h | 7 +- .../Target/AIE/aie2p/AIE2PLegalizerInfo.cpp | 2 +- 4 files changed, 70 insertions(+), 20 deletions(-) diff --git a/llvm/lib/Target/AIE/AIE2LegalizerInfo.cpp b/llvm/lib/Target/AIE/AIE2LegalizerInfo.cpp index 19140977ae9f..23fee69f8f65 100644 --- a/llvm/lib/Target/AIE/AIE2LegalizerInfo.cpp +++ b/llvm/lib/Target/AIE/AIE2LegalizerInfo.cpp @@ -177,7 +177,7 @@ AIE2LegalizerInfo::AIE2LegalizerInfo(const AIE2Subtarget &ST) : AIEHelper(ST) { getActionDefinitionsBuilder(G_FCMP) .clampScalar(0, S32, S32) - .customFor({{S32, S16}, {S32, S32}}); + .customFor({{S32, S16}, {S32, S32}, {S32, S64}}); getActionDefinitionsBuilder(G_FPTRUNC) .libcallFor({{S32, S64}}) diff --git a/llvm/lib/Target/AIE/AIELegalizerHelper.cpp b/llvm/lib/Target/AIE/AIELegalizerHelper.cpp index 4d0fd98c2097..7af9c34a4ecb 100644 --- a/llvm/lib/Target/AIE/AIELegalizerHelper.cpp +++ b/llvm/lib/Target/AIE/AIELegalizerHelper.cpp @@ -805,8 +805,8 @@ bool AIELegalizerHelper::legalizeG_INSERT_VECTOR_ELT(LegalizerHelper &Helper, return true; } -static RTLIB::Libcall getFCmpLibCall(CmpInst::Predicate Predicate, - CmpInst::Predicate &IPredicate) { +static RTLIB::Libcall getFCmp32LibCall(CmpInst::Predicate Predicate, + CmpInst::Predicate &IPredicate) { switch (Predicate) { default: llvm_unreachable("Unsupported FCmp predicate"); @@ -851,18 +851,66 @@ static RTLIB::Libcall getFCmpLibCall(CmpInst::Predicate Predicate, } } -bool AIELegalizerHelper::legalizeG_FCMP_FP32( +static RTLIB::Libcall getFCmp64LibCall(CmpInst::Predicate Predicate, + CmpInst::Predicate &IPredicate) { + switch (Predicate) { + default: + llvm_unreachable("Unsupported FCmp predicate"); + case CmpInst::FCMP_OEQ: + IPredicate = CmpInst::ICMP_EQ; + return RTLIB::OEQ_F64; + case CmpInst::FCMP_OGE: + IPredicate = CmpInst::ICMP_SGE; + return RTLIB::OGE_F64; + case CmpInst::FCMP_OGT: + IPredicate = CmpInst::ICMP_SGT; + return RTLIB::OGT_F64; + case CmpInst::FCMP_OLE: + IPredicate = CmpInst::ICMP_SLE; + return RTLIB::OLE_F64; + case CmpInst::FCMP_OLT: + IPredicate = CmpInst::ICMP_SLT; + return RTLIB::OLT_F64; + case CmpInst::FCMP_ORD: + IPredicate = CmpInst::ICMP_EQ; + return RTLIB::UO_F64; + /* Unordered comparisons are built from + * the complement of the ordered ones */ + case CmpInst::FCMP_UGE: + IPredicate = CmpInst::ICMP_SGE; + return RTLIB::OLT_F64; + case CmpInst::FCMP_UGT: + IPredicate = CmpInst::ICMP_SGT; + return RTLIB::OLE_F64; + case CmpInst::FCMP_ULE: + IPredicate = CmpInst::ICMP_SLE; + return RTLIB::OGT_F64; + case CmpInst::FCMP_ULT: + IPredicate = CmpInst::ICMP_SLT; + return RTLIB::OGE_F64; + case CmpInst::FCMP_UNE: + IPredicate = CmpInst::ICMP_NE; + return RTLIB::UNE_F64; + case CmpInst::FCMP_UNO: + IPredicate = CmpInst::ICMP_NE; + return RTLIB::UO_F64; + } +} + +bool AIELegalizerHelper::legalizeG_FCMP_FP32_FP64( LegalizerHelper &Helper, MachineInstr &MI, const CmpInst::Predicate FPredicate, - LostDebugLocObserver &LocObserver) const { + LostDebugLocObserver &LocObserver, + int ArgSize) const { MachineIRBuilder &MIRBuilder = Helper.MIRBuilder; MachineRegisterInfo &MRI = *MIRBuilder.getMRI(); - assert(MRI.getType(MI.getOperand(2).getReg()) == LLT::scalar(32) && - MRI.getType(MI.getOperand(3).getReg()) == LLT::scalar(32) && - "Expected single precision floating point operands!"); + assert(MRI.getType(MI.getOperand(2).getReg()) == LLT::scalar(ArgSize) && + MRI.getType(MI.getOperand(3).getReg()) == LLT::scalar(ArgSize) && + "Expected single or double precision floating point operands!"); LLVMContext &Ctx = MIRBuilder.getMF().getFunction().getContext(); auto DstReg = MI.getOperand(0).getReg(); + bool Is32 = ArgSize == 32; RTLIB::Libcall Libcall = RTLIB::UNKNOWN_LIBCALL; CmpInst::Predicate IPredicate = CmpInst::BAD_ICMP_PREDICATE; @@ -871,21 +919,21 @@ bool AIELegalizerHelper::legalizeG_FCMP_FP32( /* Compose ordered and unequal operands as follows: * a != b ==> a > b || a < b */ case CmpInst::FCMP_ONE: - Libcalls.push_back(std::make_pair(RTLIB::OGT_F32, CmpInst::ICMP_SGT)); - Libcalls.push_back(std::make_pair(RTLIB::OLT_F32, CmpInst::ICMP_SLT)); + Libcalls.push_back(std::make_pair(Is32 ? RTLIB::OGT_F32 : RTLIB::OGT_F64, CmpInst::ICMP_SGT)); + Libcalls.push_back(std::make_pair(Is32 ? RTLIB::OLT_F32 : RTLIB::OLT_F64, CmpInst::ICMP_SLT)); break; /* Compose unordered or equal operands as follows: * (unord(a, b) or a == b) ==> a == b || a != b */ case CmpInst::FCMP_UEQ: - Libcalls.push_back(std::make_pair(RTLIB::OEQ_F32, CmpInst::ICMP_EQ)); - Libcalls.push_back(std::make_pair(RTLIB::UO_F32, CmpInst::ICMP_NE)); + Libcalls.push_back(std::make_pair(Is32 ? RTLIB::OEQ_F32 : RTLIB::OEQ_F64, CmpInst::ICMP_EQ)); + Libcalls.push_back(std::make_pair(Is32 ? RTLIB::UO_F32 : RTLIB::UO_F64, CmpInst::ICMP_NE)); break; default: - Libcall = getFCmpLibCall(FPredicate, IPredicate); + Libcall = Is32 ? getFCmp32LibCall(FPredicate, IPredicate) : getFCmp64LibCall(FPredicate, IPredicate); Libcalls.push_back(std::make_pair(Libcall, IPredicate)); break; } - auto *ArgTy = Type::getFloatTy(Ctx); + auto *ArgTy = Is32 ? Type::getFloatTy(Ctx) : Type::getDoubleTy(Ctx); auto *RetTy = Type::getInt32Ty(Ctx); SmallVector Results; @@ -911,6 +959,7 @@ bool AIELegalizerHelper::legalizeG_FCMP_FP32( MIRBuilder.buildICmp(IDestPred, NewDstReg, LibcallResult, Zero); Results.push_back(NewDstReg); } + // OR the results when we have two libcalls if (Results.size() != 1) { assert(Results.size() == 2 && "Unexpected Number of Results"); @@ -1006,8 +1055,8 @@ bool AIELegalizerHelper::legalizeG_FCMP( } const unsigned LHSSize = MRI.getType(LHS).getSizeInBits(); - if (LHSSize == 32) - return legalizeG_FCMP_FP32(Helper, MI, FPred, LocObserver); + if (LHSSize == 32 || LHSSize == 64) + return legalizeG_FCMP_FP32_FP64(Helper, MI, FPred, LocObserver, LHSSize); assert(LHSSize == 16 && "Expected bf16 operands for FCmp"); diff --git a/llvm/lib/Target/AIE/AIELegalizerHelper.h b/llvm/lib/Target/AIE/AIELegalizerHelper.h index 95295d096da4..a544a56ace28 100644 --- a/llvm/lib/Target/AIE/AIELegalizerHelper.h +++ b/llvm/lib/Target/AIE/AIELegalizerHelper.h @@ -63,9 +63,10 @@ class AIELegalizerHelper { MachineInstr &MI) const; bool legalizeG_FCMP(LegalizerHelper &Helper, MachineInstr &MI, LostDebugLocObserver &LocObserver) const; - bool legalizeG_FCMP_FP32(LegalizerHelper &Helper, MachineInstr &MI, - const CmpInst::Predicate FPredicate, - LostDebugLocObserver &LocObserver) const; + bool legalizeG_FCMP_FP32_FP64(LegalizerHelper &Helper, MachineInstr &MI, + const CmpInst::Predicate FPredicate, + LostDebugLocObserver &LocObserver, + int ArgSize) const; bool legalizeG_FPTRUNC(LegalizerHelper &Helper, MachineInstr &MI) const; bool legalizeG_FPEXT(LegalizerHelper &Helper, MachineInstr &MI) const; bool legalizeG_FABS(LegalizerHelper &Helper, MachineInstr &MI) const; diff --git a/llvm/lib/Target/AIE/aie2p/AIE2PLegalizerInfo.cpp b/llvm/lib/Target/AIE/aie2p/AIE2PLegalizerInfo.cpp index 725a6f0a9180..3ee22440173e 100644 --- a/llvm/lib/Target/AIE/aie2p/AIE2PLegalizerInfo.cpp +++ b/llvm/lib/Target/AIE/aie2p/AIE2PLegalizerInfo.cpp @@ -204,7 +204,7 @@ AIE2PLegalizerInfo::AIE2PLegalizerInfo(const AIE2PSubtarget &ST) getActionDefinitionsBuilder(G_FCMP) .clampScalar(0, S32, S32) - .customFor({{S32, S16}, {S32, S32}}); + .customFor({{S32, S16}, {S32, S32}, {S32, S64}}); getActionDefinitionsBuilder(G_FPTRUNC) .libcallFor({{S32, S64}}) From c2d845143416e1169c517d0138ed0e2c6cd64341 Mon Sep 17 00:00:00 2001 From: Jo Seaton Date: Thu, 17 Apr 2025 15:45:59 +0100 Subject: [PATCH 2/2] [AIE2] Add G_FCMP F64 legalizer tests --- .../AIE/GlobalISel/legalize-fcmp-f64.mir | 558 ++++++++++++++++++ 1 file changed, 558 insertions(+) create mode 100644 llvm/test/CodeGen/AIE/GlobalISel/legalize-fcmp-f64.mir diff --git a/llvm/test/CodeGen/AIE/GlobalISel/legalize-fcmp-f64.mir b/llvm/test/CodeGen/AIE/GlobalISel/legalize-fcmp-f64.mir new file mode 100644 index 000000000000..dfc2e60a25ea --- /dev/null +++ b/llvm/test/CodeGen/AIE/GlobalISel/legalize-fcmp-f64.mir @@ -0,0 +1,558 @@ +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py +# +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates +# RUN: llc -mtriple aie2 -run-pass=legalizer %s -verify-machineinstrs -o - | FileCheck %s +# RUN: llc -mtriple aie2p -run-pass=legalizer %s -verify-machineinstrs -o - | FileCheck %s + +--- +name: test_cmp_true +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_cmp_true + ; CHECK: liveins: $r1 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[C]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(true), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_cmp_false +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_cmp_false + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[C]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(false), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_oeq +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_oeq + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__eqdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(oeq), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_oge +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_oge + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__gedf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(oge), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_ogt +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_ogt + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__gtdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(ogt), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_ole +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_ole + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__ledf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(ole), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_olt +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_olt + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__ltdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(olt), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_ord +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_ord + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__unorddf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(ord), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_uge +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_uge + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__ltdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(uge), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_ugt +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_ugt + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__ledf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(ugt), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_ule +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_ule + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__gtdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(ule), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_ult +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_ult + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__gedf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(ult), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_une +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_une + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__nedf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(une), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_uno +body: | + bb.1.entry: + liveins: $r1, $r2, $r3, $r4 + + ; CHECK-LABEL: name: test_uno + ; CHECK: liveins: $r1, $r2, $r3, $r4 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r3 + ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $r4 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY2]](s32) + ; CHECK-NEXT: $r3 = COPY [[COPY3]](s32) + ; CHECK-NEXT: $r4 = COPY [[COPY4]](s32) + ; CHECK-NEXT: PseudoJL &__unorddf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[COPY2]](s32), [[C]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %3:_(s32) = COPY $r1 + %4:_(s32) = COPY $r2 + %5:_(s32) = COPY $r3 + %6:_(s32) = COPY $r4 + %1:_(s64) = G_MERGE_VALUES %3(s32), %4(s32) + %2:_(s64) = G_MERGE_VALUES %5(s32), %6(s32) + %0:_(s1) = G_FCMP floatpred(uno), %1(s64), %2 + PseudoRET implicit $lr, implicit %0 + +... +--- +name: test_one +body: | + bb.1.entry: + liveins: $r1, $r2 + + ; CHECK-LABEL: name: test_one + ; CHECK: liveins: $r1, $r2 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY0:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[C0:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 2146435072 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY0]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r3 = COPY [[C0]](s32) + ; CHECK-NEXT: $r4 = COPY [[C1]](s32) + ; CHECK-NEXT: PseudoJL &__gtdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY2]](s32), [[C0]] + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY0]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r3 = COPY [[C0]](s32) + ; CHECK-NEXT: $r4 = COPY [[C1]](s32) + ; CHECK-NEXT: PseudoJL &__ltdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY3]](s32), [[C0]] + ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[ICMP]], [[ICMP1]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[OR]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %4:_(s32) = COPY $r1 + %5:_(s32) = COPY $r2 + %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32) + %2:_(s64) = G_FCONSTANT double 0x7FF0000000000000 + %3:_(s1) = G_FCMP floatpred(one), %1(s64), %2 + PseudoRET implicit $lr, implicit %3 + +... +--- +name: test_ueq +body: | + bb.1.entry: + liveins: $r1, $r2 + + ; CHECK-LABEL: name: test_ueq + ; CHECK: liveins: $r1, $r2 + ; CHECK-NEXT: {{ $}} + ; CHECK-NEXT: [[COPY0:%[0-9]+]]:_(s32) = COPY $r1 + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $r2 + ; CHECK-NEXT: [[C0:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 + ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 2146435072 + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY0]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r3 = COPY [[C0]](s32) + ; CHECK-NEXT: $r4 = COPY [[C1]](s32) + ; CHECK-NEXT: PseudoJL &__eqdf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C0]] + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: $r1 = COPY [[COPY0]](s32) + ; CHECK-NEXT: $r2 = COPY [[COPY1]](s32) + ; CHECK-NEXT: $r3 = COPY [[C0]](s32) + ; CHECK-NEXT: $r4 = COPY [[C1]](s32) + ; CHECK-NEXT: PseudoJL &__unorddf2, {{csr_aie[0-9a-z]*}}, implicit-def $lr, implicit $r1, implicit $r2, implicit $r3, implicit $r4, implicit-def $r0 + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $r0 + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp + ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[COPY3]](s32), [[C0]] + ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[ICMP]], [[ICMP1]] + ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[OR]](s32) + ; CHECK-NEXT: PseudoRET implicit $lr, implicit [[TRUNC]](s1) + %4:_(s32) = COPY $r1 + %5:_(s32) = COPY $r2 + %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32) + %2:_(s64) = G_FCONSTANT double 0x7FF0000000000000 + %3:_(s1) = G_FCMP floatpred(ueq), %1(s64), %2 + PseudoRET implicit $lr, implicit %3 + +...