diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.h b/llvm/lib/Target/RISCV/RISCVISelLowering.h --- a/llvm/lib/Target/RISCV/RISCVISelLowering.h +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.h @@ -857,9 +857,26 @@ #define GET_RISCVVIntrinsicsTable_DECL #include "RISCVGenSearchableTables.inc" +#undef GET_RISCVVIntrinsicsTable_DECL } // end namespace RISCVVIntrinsicsTable +namespace RISCVQuietVFCmpsTable { + +struct RISCVQuietVFCmpInfo { + uint16_t Pseudo; + uint16_t BaseInstr; + uint16_t EqualInstr; +}; + +using namespace RISCV; + +#define GET_RISCVQuietVFCmpsTable_DECL +#include "RISCVGenSearchableTables.inc" +#undef GET_RISCVQuietVFCmpsTable_DECL + +} // end namespace RISCVQuietVFCmpsTable + } // end namespace llvm #endif diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp --- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp @@ -812,7 +812,8 @@ setOperationAction({ISD::STRICT_FP_EXTEND, ISD::STRICT_FP_ROUND}, VT, Custom); setOperationAction({ISD::STRICT_FADD, ISD::STRICT_FSUB, ISD::STRICT_FMUL, - ISD::STRICT_FDIV, ISD::STRICT_FSQRT, ISD::STRICT_FMA}, + ISD::STRICT_FDIV, ISD::STRICT_FSQRT, ISD::STRICT_FMA, + ISD::STRICT_FSETCC, ISD::STRICT_FSETCCS}, VT, Legal); }; @@ -11993,6 +11994,43 @@ return BB; } +static MachineBasicBlock *emitQuietVFCMP(MachineInstr &MI, + MachineBasicBlock *BB, + unsigned RelOpcode, unsigned EqOpcode, + const RISCVSubtarget &Subtarget) { + DebugLoc DL = MI.getDebugLoc(); + Register DstReg = MI.getOperand(0).getReg(); + MachineRegisterInfo &MRI = BB->getParent()->getRegInfo(); + Register SavedFFlags = MRI.createVirtualRegister(&RISCV::GPRRegClass); + const TargetInstrInfo &TII = *BB->getParent()->getSubtarget().getInstrInfo(); + + // Save the current FFLAGS. + BuildMI(*BB, MI, DL, TII.get(RISCV::ReadFFLAGS), SavedFFlags); + + auto MIB = BuildMI(*BB, MI, DL, TII.get(RelOpcode), DstReg); + for (const MachineOperand &MO : MI.uses()) + MIB.add(MO); + + if (MI.getFlag(MachineInstr::MIFlag::NoFPExcept)) + MIB->setFlag(MachineInstr::MIFlag::NoFPExcept); + + // Restore the FFLAGS. + BuildMI(*BB, MI, DL, TII.get(RISCV::WriteFFLAGS)) + .addReg(SavedFFlags, RegState::Kill); + + // Issue a dummy VMFEQ opcode to raise exception for signaling NaNs. + Register DummyDest = MRI.createVirtualRegister(&RISCV::VRRegClass); + auto MIB2 = BuildMI(*BB, MI, DL, TII.get(EqOpcode), DummyDest); + for (const MachineOperand &MO : MI.uses()) + MIB2.add(MO); + if (MI.getFlag(MachineInstr::MIFlag::NoFPExcept)) + MIB2->setFlag(MachineInstr::MIFlag::NoFPExcept); + + // Erase the pseudoinstruction. + MI.eraseFromParent(); + return BB; +} + static MachineBasicBlock * EmitLoweredCascadedSelect(MachineInstr &First, MachineInstr &Second, MachineBasicBlock *ThisMBB, @@ -12424,6 +12462,10 @@ MachineBasicBlock * RISCVTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *BB) const { + if (const RISCVQuietVFCmpsTable::RISCVQuietVFCmpInfo *I = + RISCVQuietVFCmpsTable::getRISCVQuietVFCmpInfo(MI.getOpcode())) + return emitQuietVFCMP(MI, BB, I->BaseInstr, I->EqualInstr, Subtarget); + switch (MI.getOpcode()) { default: llvm_unreachable("Unexpected instr type to insert"); @@ -15288,5 +15330,14 @@ #define GET_RISCVVIntrinsicsTable_IMPL #include "RISCVGenSearchableTables.inc" +#undef GET_RISCVVIntrinsicsTable_IMPL } // namespace llvm::RISCVVIntrinsicsTable + +namespace llvm::RISCVQuietVFCmpsTable { + +#define GET_RISCVQuietVFCmpsTable_IMPL +#include "RISCVGenSearchableTables.inc" +#undef GET_RISCVQuietVFCmpsTable_IMPL + +} // namespace llvm::RISCVQuietVFCmpsTable diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td @@ -84,6 +84,13 @@ !subst(AffixSubst[0], AffixSubst[1], Acc)); } +class QuietVFCmpToVInst { + string BaseInst = !subst("Quiet", "", PseudoInst); + defvar CmpSets = ["LE", "LT", "GE", "GT"]; + string EqualInst = !foldl(BaseInst, CmpSets, Acc, Cmp, + !subst(Cmp, "EQ", Acc)); +} + // This class describes information associated to the LMUL. class LMULInfo { @@ -629,6 +636,21 @@ let PrimaryKeyName = "getVSXSEGPseudo"; } +class RISCVQuietVFCmp { + Pseudo Pseudo = !cast(NAME); // Used as a key. + Instruction BaseInstr = !cast(QuietVFCmpToVInst.BaseInst); + Instruction EqualInstr = !cast(QuietVFCmpToVInst.EqualInst); +} + +def RISCVQuietVFCmpsTable : GenericTable { + let FilterClass = "RISCVQuietVFCmp"; + let CppTypeName = "RISCVQuietVFCmpInfo"; + let Fields = ["Pseudo", "BaseInstr", "EqualInstr"]; + let PrimaryKey = [ "Pseudo" ]; + let PrimaryKeyName = "getRISCVQuietVFCmpInfo"; + let PrimaryKeyEarlyOut = true; +} + //===----------------------------------------------------------------------===// // Helpers to define the different pseudo instructions. //===----------------------------------------------------------------------===// @@ -1382,6 +1404,38 @@ let HasDummyMask = 1; } +class VPseudoQuietVFCmpNoMask : + Pseudo<(outs RetClass:$rd), + (ins Op1Class:$rs2, Op2Class:$rs1, AVL:$vl, ixlenimm:$sew), []>, + RISCVQuietVFCmp { + let mayLoad = 0; + let mayStore = 0; + let hasSideEffects = 0; + let HasVLOp = 1; + let HasSEWOp = 1; + let usesCustomInserter = 1; +} + +class VPseudoQuietVFCmpMask : + Pseudo<(outs RetClass:$rd), + (ins RetClass:$merge, + Op1Class:$rs2, Op2Class:$rs1, + VMaskOp:$vm, AVL:$vl, ixlenimm:$sew), []>, + RISCVQuietVFCmp { + let mayLoad = 0; + let mayStore = 0; + let hasSideEffects = 0; + let HasVLOp = 1; + let HasSEWOp = 1; + let HasMergeOp = 1; + let UsesMaskPolicy = 1; + let usesCustomInserter = 1; +} + class VPseudoUSSegLoadNoMask NF>: Pseudo<(outs RetClass:$rd), (ins GPRMem:$rs1, AVL:$vl, ixlenimm:$sew),[]>, @@ -1991,6 +2045,19 @@ } } +multiclass VPseudoQuietVFCmp { + let VLMul = MInfo.value in { + def "_" # MInfo.MX : VPseudoQuietVFCmpNoMask; + let ForceTailAgnostic = true in + def "_" # MInfo.MX # "_MASK" : VPseudoQuietVFCmpMask, + RISCVMaskedPseudo; + } +} + multiclass VPseudoBinaryEmul; } +multiclass VPseudoQuietVFCmp_VV { + defm _VV : VPseudoQuietVFCmp; +} + +multiclass VPseudoQuietVFCmp_VF { + defm "_V" # f.FX : VPseudoQuietVFCmp; +} + multiclass VPseudoVGTR_VV_VX_VI { foreach m = MxList in { defvar mx = m.MX; @@ -3404,6 +3479,18 @@ } } +multiclass VPseudoQuietVCMPM_VV_VF { + foreach m = MxListF in { + defm "" : VPseudoQuietVFCmp_VV; + } + + foreach f = FPList in { + foreach m = f.MxList in { + defm "" : VPseudoQuietVFCmp_VF; + } + } +} + multiclass VPseudoVCMPM_VF { foreach f = FPList in { foreach m = f.MxList in { @@ -3418,6 +3505,14 @@ } } +multiclass VPseudoQuietVCMPM_VF { + foreach f = FPList in { + foreach m = f.MxList in { + defm "" : VPseudoQuietVFCmp_VF; + } + } +} + multiclass VPseudoVCMPM_VX_VI { foreach m = MxList in { defvar mx = m.MX; @@ -5887,6 +5982,12 @@ defm PseudoVMFLE : VPseudoVCMPM_VV_VF; defm PseudoVMFGT : VPseudoVCMPM_VF; defm PseudoVMFGE : VPseudoVCMPM_VF; +defm PseudoQuietVMFEQ : VPseudoQuietVCMPM_VV_VF; +defm PseudoQuietVMFNE : VPseudoQuietVCMPM_VV_VF; +defm PseudoQuietVMFLT : VPseudoQuietVCMPM_VV_VF; +defm PseudoQuietVMFLE : VPseudoQuietVCMPM_VV_VF; +defm PseudoQuietVMFGT : VPseudoQuietVCMPM_VF; +defm PseudoQuietVMFGE : VPseudoQuietVCMPM_VF; } //===----------------------------------------------------------------------===// diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td @@ -337,22 +337,22 @@ } } -multiclass VPatFPSetCCSDNode_VV_VF_FV { foreach fvti = AllFloatVectors in { - def : Pat<(fvti.Mask (setcc (fvti.Vector fvti.RegClass:$rs1), + def : Pat<(fvti.Mask (vop (fvti.Vector fvti.RegClass:$rs1), (fvti.Vector fvti.RegClass:$rs2), cc)), (!cast(inst_name#"_VV_"#fvti.LMul.MX) fvti.RegClass:$rs1, fvti.RegClass:$rs2, fvti.AVL, fvti.Log2SEW)>; - def : Pat<(fvti.Mask (setcc (fvti.Vector fvti.RegClass:$rs1), + def : Pat<(fvti.Mask (vop (fvti.Vector fvti.RegClass:$rs1), (SplatFPOp fvti.ScalarRegClass:$rs2), cc)), (!cast(inst_name#"_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW)>; - def : Pat<(fvti.Mask (setcc (SplatFPOp fvti.ScalarRegClass:$rs2), + def : Pat<(fvti.Mask (vop (SplatFPOp fvti.ScalarRegClass:$rs2), (fvti.Vector fvti.RegClass:$rs1), cc)), (!cast(swapped_op_inst_name#"_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) @@ -361,6 +361,66 @@ } } +multiclass VPatStrictFSETCCS_EQ_VV_VF_FV { + foreach fvti = AllFloatVectors in { + def : Pat<(fvti.Mask (strict_fsetccs (fvti.Vector fvti.RegClass:$rs1), + (fvti.Vector fvti.RegClass:$rs2), cc)), + (!cast("PseudoVMAND_MM_"#fvti.LMul.MX) + (!cast("PseudoVMFLE_VV_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.RegClass:$rs2, fvti.AVL, fvti.Log2SEW), + (!cast("PseudoVMFLE_VV_"#fvti.LMul.MX) + fvti.RegClass:$rs2, fvti.RegClass:$rs1, fvti.AVL, fvti.Log2SEW), + fvti.AVL, fvti.Log2SEW)>; + def : Pat<(fvti.Mask (strict_fsetccs (fvti.Vector fvti.RegClass:$rs1), + (SplatFPOp fvti.ScalarRegClass:$rs2), + cc)), + (!cast("PseudoVMAND_MM_"#fvti.LMul.MX) + (!cast("PseudoVMFLE_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + (!cast("PseudoVMFGE_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + fvti.AVL, fvti.Log2SEW)>; + def : Pat<(fvti.Mask (strict_fsetccs (SplatFPOp fvti.ScalarRegClass:$rs2), + (fvti.Vector fvti.RegClass:$rs1), + cc)), + (!cast("PseudoVMAND_MM_"#fvti.LMul.MX) + (!cast("PseudoVMFLE_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + (!cast("PseudoVMFGE_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + fvti.AVL, fvti.Log2SEW)>; + } +} + +multiclass VPatStrictFSETCCS_NE_VV_VF_FV { + foreach fvti = AllFloatVectors in { + def : Pat<(fvti.Mask (strict_fsetccs (fvti.Vector fvti.RegClass:$rs1), + (fvti.Vector fvti.RegClass:$rs2), cc)), + (!cast("PseudoVMNOR_MM_"#fvti.LMul.MX) + (!cast("PseudoVMFEQ_VV_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.RegClass:$rs2, fvti.AVL, fvti.Log2SEW), + (!cast("PseudoVMFEQ_VV_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.RegClass:$rs2, fvti.AVL, fvti.Log2SEW), + fvti.AVL, fvti.Log2SEW)>; + def : Pat<(fvti.Mask (strict_fsetccs (fvti.Vector fvti.RegClass:$rs1), + (SplatFPOp fvti.ScalarRegClass:$rs2), cc)), + (!cast("PseudoVMNOR_MM_"#fvti.LMul.MX) + (!cast("PseudoVMFEQ_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + (!cast("PseudoVMFEQ_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + fvti.AVL, fvti.Log2SEW)>; + def : Pat<(fvti.Mask (strict_fsetccs (SplatFPOp fvti.ScalarRegClass:$rs2), + (fvti.Vector fvti.RegClass:$rs1), cc)), + (!cast("PseudoVMNOR_MM_"#fvti.LMul.MX) + (!cast("PseudoVMFEQ_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + (!cast("PseudoVMFEQ_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX) + fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, fvti.AVL, fvti.Log2SEW), + fvti.AVL, fvti.Log2SEW)>; + } +} + multiclass VPatExtendSDNode_V ops, string inst_name, string suffix, list fraction_list> { foreach vtiTofti = fraction_list in { @@ -1048,17 +1108,36 @@ defm : VPatBinaryFPSDNode_VV_VF; // 13.13. Vector Floating-Point Compare Instructions -defm : VPatFPSetCCSDNode_VV_VF_FV; -defm : VPatFPSetCCSDNode_VV_VF_FV; - -defm : VPatFPSetCCSDNode_VV_VF_FV; -defm : VPatFPSetCCSDNode_VV_VF_FV; - -defm : VPatFPSetCCSDNode_VV_VF_FV; -defm : VPatFPSetCCSDNode_VV_VF_FV; - -defm : VPatFPSetCCSDNode_VV_VF_FV; -defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; + +defm : VPatStrictFSETCCS_EQ_VV_VF_FV; +defm : VPatStrictFSETCCS_EQ_VV_VF_FV; +defm : VPatStrictFSETCCS_NE_VV_VF_FV; +defm : VPatStrictFSETCCS_NE_VV_VF_FV; + +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; +defm : VPatFPSetCCSDNode_VV_VF_FV; // Floating-point vselects: // 11.15. Vector Integer Merge Instructions diff --git a/llvm/test/CodeGen/RISCV/rvv/vfcmp-constrained-sdnode.ll b/llvm/test/CodeGen/RISCV/rvv/vfcmp-constrained-sdnode.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/RISCV/rvv/vfcmp-constrained-sdnode.ll @@ -0,0 +1,9380 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+experimental-zvfh,+v -target-abi=ilp32d \ +; RUN: -verify-machineinstrs < %s | FileCheck %s +; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+experimental-zvfh,+v -target-abi=lp64d \ +; RUN: -verify-machineinstrs < %s | FileCheck %s + +declare @llvm.experimental.constrained.fcmp.nxv1f16(, , metadata, metadata) +define @fcmp_oeq_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vv v9, v9, v9 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv2f16(, , metadata, metadata) +define @fcmp_oeq_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfne.vv v9, v9, v9 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv4f16(, , metadata, metadata) +define @fcmp_oeq_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfne.vv v9, v9, v9 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv8f16(, , metadata, metadata) +define @fcmp_oeq_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v13, v8, v10 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v13, v8, v10 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfne.vv v12, v10, v10 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v10, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfne.vf v12, v10, fa0 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v10, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfne.vf v12, v10, fa0 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv16f16(, , metadata, metadata) +define @fcmp_oeq_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v17, v8, v12 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v17, v8, v12 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfne.vv v16, v12, v12 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfne.vf v16, v12, fa0 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfne.vf v16, v12, fa0 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv32f16(, , metadata, metadata) +define @fcmp_oeq_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v25, v8, v16 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v25, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v24, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v25, v8, v16 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfne.vv v24, v16, v16 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfne.vf v24, v16, fa0 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v24 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfne.vf v24, v16, fa0 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v24, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv32f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv1f32(, , metadata, metadata) +define @fcmp_oeq_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vv v9, v9, v9 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv2f32(, , metadata, metadata) +define @fcmp_oeq_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfne.vv v9, v9, v9 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv4f32(, , metadata, metadata) +define @fcmp_oeq_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v13, v8, v10 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v13, v8, v10 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfne.vv v12, v10, v10 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v10, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfne.vf v12, v10, fa0 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v10, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfne.vf v12, v10, fa0 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv8f32(, , metadata, metadata) +define @fcmp_oeq_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v17, v8, v12 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v17, v8, v12 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfne.vv v16, v12, v12 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfne.vf v16, v12, fa0 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfne.vf v16, v12, fa0 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv16f32(, , metadata, metadata) +define @fcmp_oeq_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v25, v8, v16 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v25, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v24, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v25, v8, v16 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfne.vv v24, v16, v16 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfne.vf v24, v16, fa0 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v24 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfne.vf v24, v16, fa0 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v24, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv16f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv1f64(, , metadata, metadata) +define @fcmp_oeq_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v11, v8, v9 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v11, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v9, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vv v8, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v9 +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vv v9, v9, v9 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfne.vf v9, v9, fa0 +; CHECK-NEXT: vmfne.vv v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv1f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv2f64(, , metadata, metadata) +define @fcmp_oeq_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v13, v8, v10 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v13, v8, v10 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v11, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vv v12, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfne.vv v12, v10, v10 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v10, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfne.vf v12, v10, fa0 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v10, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfne.vf v12, v10, fa0 +; CHECK-NEXT: vmfne.vv v10, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv2f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv4f64(, , metadata, metadata) +define @fcmp_oeq_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v17, v8, v12 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v17, v8, v12 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v13, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vv v16, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfne.vv v16, v12, v12 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfne.vf v16, v12, fa0 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v12, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfne.vf v16, v12, fa0 +; CHECK-NEXT: vmfne.vv v12, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv4f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmp.nxv8f64(, , metadata, metadata) +define @fcmp_oeq_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oeq_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ogt_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_oge_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_olt_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ole_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v25, v8, v16 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v25, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_one_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ord_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v24, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vv v25, v8, v16 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ueq_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmfeq.vf v17, v8, fa0 +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ugt_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uge_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ult_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v16, v8 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: vmfeq.vv v24, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_ule_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: frflags a0 +; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: fsflags a0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_une_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfne.vv v24, v16, v16 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfne.vf v24, v16, fa0 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v16, v24 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmp_uno_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfne.vf v24, v16, fa0 +; CHECK-NEXT: vmfne.vv v16, v8, v8 +; CHECK-NEXT: vmor.mm v0, v24, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmp.nxv8f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} diff --git a/llvm/test/CodeGen/RISCV/rvv/vfcmps-constrained-sdnode.ll b/llvm/test/CodeGen/RISCV/rvv/vfcmps-constrained-sdnode.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/RISCV/rvv/vfcmps-constrained-sdnode.ll @@ -0,0 +1,8105 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+experimental-zvfh,+v -target-abi=ilp32d \ +; RUN: -verify-machineinstrs < %s | FileCheck %s +; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+experimental-zvfh,+v -target-abi=lp64d \ +; RUN: -verify-machineinstrs < %s | FileCheck %s + +declare @llvm.experimental.constrained.fcmps.nxv1f16(, , metadata, metadata) +define @fcmps_oeq_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv1f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv1f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv2f16(, , metadata, metadata) +define @fcmps_oeq_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv2f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv2f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv4f16(, , metadata, metadata) +define @fcmps_oeq_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv4f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv4f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv8f16(, , metadata, metadata) +define @fcmps_oeq_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v10 +; CHECK-NEXT: vmmv.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfge.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vf v13, v10, fa0 +; CHECK-NEXT: vmand.mm v10, v13, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfge.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vf v13, v10, fa0 +; CHECK-NEXT: vmand.mm v10, v13, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v10, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v10, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv8f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv8f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv16f16(, , metadata, metadata) +define @fcmps_oeq_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v12 +; CHECK-NEXT: vmmv.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfge.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vf v17, v12, fa0 +; CHECK-NEXT: vmand.mm v12, v17, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfge.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vf v17, v12, fa0 +; CHECK-NEXT: vmand.mm v12, v17, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv16f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv16f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv32f16(, , metadata, metadata) +define @fcmps_oeq_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmfle.vv v25, v8, v16 +; CHECK-NEXT: vmand.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: vmor.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v16 +; CHECK-NEXT: vmmv.m v16, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfge.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vf v25, v16, fa0 +; CHECK-NEXT: vmand.mm v16, v25, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v8, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfge.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vf v25, v16, fa0 +; CHECK-NEXT: vmand.mm v16, v25, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v16, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v8, v16 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v16, v8 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: vmnor.mm v0, v24, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv32f16( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v8, v16 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv32f16( %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v16, v8 +; CHECK-NEXT: ret + %head = insertelement poison, half %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv32f16( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv1f32(, , metadata, metadata) +define @fcmps_oeq_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv1f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv1f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv2f32(, , metadata, metadata) +define @fcmps_oeq_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv2f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv2f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv4f32(, , metadata, metadata) +define @fcmps_oeq_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v10 +; CHECK-NEXT: vmmv.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfge.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vf v13, v10, fa0 +; CHECK-NEXT: vmand.mm v10, v13, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfge.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vf v13, v10, fa0 +; CHECK-NEXT: vmand.mm v10, v13, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v10, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v10, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv4f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv4f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv8f32(, , metadata, metadata) +define @fcmps_oeq_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v12 +; CHECK-NEXT: vmmv.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfge.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vf v17, v12, fa0 +; CHECK-NEXT: vmand.mm v12, v17, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfge.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vf v17, v12, fa0 +; CHECK-NEXT: vmand.mm v12, v17, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv8f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv8f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv16f32(, , metadata, metadata) +define @fcmps_oeq_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmfle.vv v25, v8, v16 +; CHECK-NEXT: vmand.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: vmor.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v16 +; CHECK-NEXT: vmmv.m v16, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfge.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vf v25, v16, fa0 +; CHECK-NEXT: vmand.mm v16, v25, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v8, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfge.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vf v25, v16, fa0 +; CHECK-NEXT: vmand.mm v16, v25, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v16, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v8, v16 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v16, v8 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: vmnor.mm v0, v24, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv16f32( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v8, v16 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv16f32( %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v16, v8 +; CHECK-NEXT: ret + %head = insertelement poison, float %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv16f32( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv1f64(, , metadata, metadata) +define @fcmps_oeq_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfge.vf v10, v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmand.mm v9, v9, v10 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v10, v8, v9 +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v9, v8, fa0 +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v9, v8, fa0 +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v8, v8, v9 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v8, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v8, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv1f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v9, v9, v9 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv1f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmnor.mm v9, v9, v9 +; CHECK-NEXT: vmfeq.vv v8, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v8, v8 +; CHECK-NEXT: vmor.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv1f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv2f64(, , metadata, metadata) +define @fcmps_oeq_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v10 +; CHECK-NEXT: vmmv.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfge.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vf v13, v10, fa0 +; CHECK-NEXT: vmand.mm v10, v13, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfge.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vf v13, v10, fa0 +; CHECK-NEXT: vmand.mm v10, v13, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmand.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmflt.vv v13, v10, v8 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmflt.vf v11, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v8, v10 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v10, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v10, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v10, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv2f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv2f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmnor.mm v10, v12, v12 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v11, v11 +; CHECK-NEXT: vmor.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv2f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv4f64(, , metadata, metadata) +define @fcmps_oeq_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v12 +; CHECK-NEXT: vmmv.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfge.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vf v17, v12, fa0 +; CHECK-NEXT: vmand.mm v12, v17, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfge.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vf v17, v12, fa0 +; CHECK-NEXT: vmand.mm v12, v17, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmand.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmflt.vv v17, v12, v8 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmflt.vf v13, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v8, v12 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v12, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v12, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv4f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv4f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmnor.mm v12, v16, v16 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v13, v13 +; CHECK-NEXT: vmor.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv4f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +declare @llvm.experimental.constrained.fcmps.nxv8f64(, , metadata, metadata) +define @fcmps_oeq_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmfle.vv v25, v8, v16 +; CHECK-NEXT: vmand.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oeq_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ogt_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v16, v8 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_oge_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_olt_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ole_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: vmor.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_one_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v16 +; CHECK-NEXT: vmmv.m v16, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfge.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vf v25, v16, fa0 +; CHECK-NEXT: vmand.mm v16, v25, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v8, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ord_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfge.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vf v25, v16, fa0 +; CHECK-NEXT: vmand.mm v16, v25, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmmv.m v8, v17 +; CHECK-NEXT: vmand.mm v0, v16, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmflt.vv v25, v16, v8 +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ueq_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmflt.vf v17, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v8, v16 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ugt_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v8, v16 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uge_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ult_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vv v24, v16, v8 +; CHECK-NEXT: vmnot.m v0, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfgt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_ule_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmflt.vf v16, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v8, v16 +; CHECK-NEXT: vmnor.mm v0, v24, v24 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_une_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vf v16, v8, fa0 +; CHECK-NEXT: vmnor.mm v0, v16, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vv_nxv8f64( %va, %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v8, v16 +; CHECK-NEXT: ret + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_vf_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v8, v16 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %va, %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +} + +define @fcmps_uno_fv_nxv8f64( %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_nxv8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmnor.mm v16, v24, v24 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmnor.mm v8, v17, v17 +; CHECK-NEXT: vmor.mm v0, v16, v8 +; CHECK-NEXT: ret + %head = insertelement poison, double %b, i32 0 + %splat = shufflevector %head, poison, zeroinitializer + %1 = call @llvm.experimental.constrained.fcmps.nxv8f64( %splat, %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret %1 +}