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 @@ -346,6 +346,8 @@ STRICT_UINT_TO_FP_VL, STRICT_VFCVT_RTZ_X_F_VL, STRICT_VFCVT_RTZ_XU_F_VL, + STRICT_FSETCC_VL, + STRICT_FSETCCS_VL, // WARNING: Do not add anything in the end unless you want the node to // have memop! In fact, starting from FIRST_TARGET_MEMORY_OPCODE all @@ -800,6 +802,8 @@ SDValue lowerStrictFPExtendOrRoundLike(SDValue Op, SelectionDAG &DAG) const; + SDValue lowerVectorStrictFSetcc(SDValue Op, SelectionDAG &DAG) const; + SDValue expandUnalignedRVVLoad(SDValue Op, SelectionDAG &DAG) const; SDValue expandUnalignedRVVStore(SDValue Op, SelectionDAG &DAG) const; @@ -857,6 +861,7 @@ #define GET_RISCVVIntrinsicsTable_DECL #include "RISCVGenSearchableTables.inc" +#undef GET_RISCVVIntrinsicsTable_DECL } // end namespace RISCVVIntrinsicsTable 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 @@ -817,6 +817,7 @@ setOperationAction({ISD::STRICT_FADD, ISD::STRICT_FSUB, ISD::STRICT_FMUL, ISD::STRICT_FDIV, ISD::STRICT_FSQRT, ISD::STRICT_FMA}, VT, Legal); + setOperationAction({ISD::STRICT_FSETCC, ISD::STRICT_FSETCCS}, VT, Custom); }; // Sets common extload/truncstore actions on RVV floating-point vector @@ -886,6 +887,9 @@ setOperationAction(ISD::SETCC, VT, Custom); + setOperationAction({ISD::STRICT_FSETCC, ISD::STRICT_FSETCCS}, VT, + Legal); + setOperationAction(ISD::SELECT, VT, Custom); setOperationAction(ISD::TRUNCATE, VT, Custom); @@ -1047,6 +1051,8 @@ ISD::STRICT_FMUL, ISD::STRICT_FDIV, ISD::STRICT_FSQRT, ISD::STRICT_FMA}, VT, Custom); + setOperationAction({ISD::STRICT_FSETCC, ISD::STRICT_FSETCCS}, VT, + Custom); } // Custom-legalize bitcasts from fixed-length vectors to scalar types. @@ -4770,6 +4776,9 @@ return lowerToScalableOp(Op, DAG, RISCVISD::STRICT_FSQRT_VL); case ISD::STRICT_FMA: return lowerToScalableOp(Op, DAG, RISCVISD::STRICT_VFMADD_VL); + case ISD::STRICT_FSETCC: + case ISD::STRICT_FSETCCS: + return lowerVectorStrictFSetcc(Op, DAG); case ISD::MGATHER: case ISD::VP_GATHER: return lowerMaskedGather(Op, DAG); @@ -7555,6 +7564,92 @@ return convertFromScalableVector(VT, Cmp, DAG, Subtarget); } +SDValue RISCVTargetLowering::lowerVectorStrictFSetcc(SDValue Op, + SelectionDAG &DAG) const { + unsigned Opc = Op.getOpcode(); + SDLoc DL(Op); + SDValue Chain = Op.getOperand(0); + SDValue Op1 = Op.getOperand(1); + SDValue Op2 = Op.getOperand(2); + SDValue CC = Op.getOperand(3); + ISD::CondCode CCVal = cast(CC)->get(); + MVT VT = Op.getSimpleValueType(); + MVT InVT = Op1.getSimpleValueType(); + + // RVV VMFEQ/VMFNE ignores qNan, so we expand strict_fsetccs with OEQ/UNE + // condition code. + if (Opc == ISD::STRICT_FSETCCS) { + // Expand strict_fsetccs(x, oeq) to + // (and strict_fsetccs(x, y, oge), strict_fsetccs(x, y, ole)) + SDVTList VTList = Op->getVTList(); + if (CCVal == ISD::SETEQ || CCVal == ISD::SETOEQ) { + SDValue OLECCVal = DAG.getCondCode(ISD::SETOLE); + SDValue Tmp1 = DAG.getNode(ISD::STRICT_FSETCCS, DL, VTList, Chain, Op1, + Op2, OLECCVal); + SDValue Tmp2 = DAG.getNode(ISD::STRICT_FSETCCS, DL, VTList, Chain, Op2, + Op1, OLECCVal); + SDValue And = DAG.getNode(ISD::AND, DL, VT, Tmp1, Tmp2); + SDValue OutChain = + DAG.getMergeValues({Tmp1.getValue(1), Tmp2.getValue(1)}, DL); + return DAG.getMergeValues({And, OutChain}, DL); + } + + // Expand (strict_fsetccs x, y, une) to (not (strict_fsetccs x, y, oeq)) + if (CCVal == ISD::SETNE || CCVal == ISD::SETUNE) { + SDValue OEQCCVal = DAG.getCondCode(ISD::SETOEQ); + SDValue OEQ = DAG.getNode(ISD::STRICT_FSETCCS, DL, VTList, Chain, Op1, + Op2, OEQCCVal); + SDValue Res = DAG.getNOT(DL, OEQ, VT); + return DAG.getMergeValues({Res, OEQ.getValue(1)}, DL); + } + } + + MVT ContainerInVT = InVT; + if (InVT.isFixedLengthVector()) { + ContainerInVT = getContainerForFixedLengthVector(InVT); + Op1 = convertToScalableVector(ContainerInVT, Op1, DAG, Subtarget); + Op2 = convertToScalableVector(ContainerInVT, Op2, DAG, Subtarget); + } + MVT MaskVT = getMaskTypeFor(ContainerInVT); + + auto [Mask, VL] = getDefaultVLOps(InVT, ContainerInVT, DL, DAG, Subtarget); + + SDValue Res; + if (Opc == ISD::STRICT_FSETCC && + (CCVal == ISD::SETLT || CCVal == ISD::SETOLT || CCVal == ISD::SETLE || + CCVal == ISD::SETOLE)) { + // VMFLT/VMFLE/VMFGT/VMFGE raise exception for qNan. Generate a mask to only + // active when both input elements are ordered. + SDValue True = getAllOnesMask(ContainerInVT, VL, DL, DAG); + SDValue OrderMask1 = DAG.getNode( + RISCVISD::STRICT_FSETCC_VL, DL, DAG.getVTList(MaskVT, MVT::Other), + {Chain, Op1, Op1, DAG.getCondCode(ISD::SETOEQ), DAG.getUNDEF(MaskVT), + True, VL}); + SDValue OrderMask2 = DAG.getNode( + RISCVISD::STRICT_FSETCC_VL, DL, DAG.getVTList(MaskVT, MVT::Other), + {Chain, Op2, Op2, DAG.getCondCode(ISD::SETOEQ), DAG.getUNDEF(MaskVT), + True, VL}); + Mask = + DAG.getNode(RISCVISD::VMAND_VL, DL, MaskVT, OrderMask1, OrderMask2, VL); + // Use Mask as the merge operand to let the result be 0 if either of the + // inputs is unordered. + Res = DAG.getNode(RISCVISD::STRICT_FSETCCS_VL, DL, + DAG.getVTList(MaskVT, MVT::Other), + {Chain, Op1, Op2, CC, Mask, Mask, VL}); + } else { + unsigned RVVOpc = Opc == ISD::STRICT_FSETCC ? RISCVISD::STRICT_FSETCC_VL + : RISCVISD::STRICT_FSETCCS_VL; + Res = DAG.getNode(RVVOpc, DL, DAG.getVTList(MaskVT, MVT::Other), + {Chain, Op1, Op2, CC, DAG.getUNDEF(MaskVT), Mask, VL}); + } + + if (VT.isFixedLengthVector()) { + SDValue SubVec = convertFromScalableVector(VT, Res, DAG, Subtarget); + return DAG.getMergeValues({SubVec, Res.getValue(1)}, DL); + } + return Res; +} + SDValue RISCVTargetLowering::lowerFixedLengthVectorLogicOpToRVV( SDValue Op, SelectionDAG &DAG, unsigned MaskOpc, unsigned VecOpc) const { MVT VT = Op.getSimpleValueType(); @@ -14447,6 +14542,8 @@ NODE_NAME_CASE(STRICT_UINT_TO_FP_VL) NODE_NAME_CASE(STRICT_VFCVT_RTZ_X_F_VL) NODE_NAME_CASE(STRICT_VFCVT_RTZ_XU_F_VL) + NODE_NAME_CASE(STRICT_FSETCC_VL) + NODE_NAME_CASE(STRICT_FSETCCS_VL) NODE_NAME_CASE(VWMUL_VL) NODE_NAME_CASE(VWMULU_VL) NODE_NAME_CASE(VWMULSU_VL) diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td @@ -205,6 +205,11 @@ SDTCisVT<4, XLenVT> // Rounding mode ]>; +def SDT_RISCVSETCCOP_VL : SDTypeProfile<1, 6, [ + SDTCVecEltisVT<0, i1>, SDTCisVec<1>, SDTCisSameNumEltsAs<0, 1>, + SDTCisSameAs<1, 2>, SDTCisVT<3, OtherVT>, SDTCisSameAs<0, 4>, + SDTCisSameAs<0, 5>, SDTCisVT<6, XLenVT>]>; + // Float -> Int def riscv_vfcvt_xu_f_vl : SDNode<"RISCVISD::VFCVT_XU_F_VL", SDT_RISCVFP2IOp_VL>; def riscv_vfcvt_x_f_vl : SDNode<"RISCVISD::VFCVT_X_F_VL", SDT_RISCVFP2IOp_VL>; @@ -242,15 +247,15 @@ def riscv_vfround_noexcept_vl: SDNode<"RISCVISD::VFROUND_NOEXCEPT_VL", SDT_RISCVFPUnOp_VL>; -def riscv_setcc_vl : SDNode<"RISCVISD::SETCC_VL", - SDTypeProfile<1, 6, [SDTCVecEltisVT<0, i1>, - SDTCisVec<1>, - SDTCisSameNumEltsAs<0, 1>, - SDTCisSameAs<1, 2>, - SDTCisVT<3, OtherVT>, - SDTCisSameAs<0, 4>, - SDTCisSameAs<0, 5>, - SDTCisVT<6, XLenVT>]>>; +def riscv_setcc_vl : SDNode<"RISCVISD::SETCC_VL", SDT_RISCVSETCCOP_VL>; +def riscv_strict_fsetcc_vl : SDNode<"RISCVISD::STRICT_FSETCC_VL", SDT_RISCVSETCCOP_VL, [SDNPHasChain]>; +def riscv_strict_fsetccs_vl : SDNode<"RISCVISD::STRICT_FSETCCS_VL", SDT_RISCVSETCCOP_VL, [SDNPHasChain]>; +def any_riscv_fsetcc_vl : PatFrags<(ops node:$lhs, node:$rhs, node:$cc, node:$merge, node:$mask, node:$vl), + [(riscv_setcc_vl node:$lhs, node:$rhs, node:$cc, node:$merge, node:$mask, node:$vl), + (riscv_strict_fsetcc_vl node:$lhs, node:$rhs, node:$cc, node:$merge, node:$mask, node:$vl)]>; +def any_riscv_fsetccs_vl : PatFrags<(ops node:$lhs, node:$rhs, node:$cc, node:$merge, node:$mask, node:$vl), + [(riscv_setcc_vl node:$lhs, node:$rhs, node:$cc, node:$merge, node:$mask, node:$vl), + (riscv_strict_fsetccs_vl node:$lhs, node:$rhs, node:$cc, node:$merge, node:$mask, node:$vl)]>; def riscv_vrgather_vx_vl : SDNode<"RISCVISD::VRGATHER_VX_VL", SDTypeProfile<1, 5, [SDTCisVec<0>, @@ -916,36 +921,36 @@ vti.Log2SEW)>; } -multiclass VPatFPSetCCVL_VV_VF_FV { foreach fvti = AllFloatVectors in { - def : Pat<(fvti.Mask (riscv_setcc_vl (fvti.Vector fvti.RegClass:$rs1), - fvti.RegClass:$rs2, - cc, - VR:$merge, - (fvti.Mask V0), - VLOpFrag)), + def : Pat<(fvti.Mask (vop (fvti.Vector fvti.RegClass:$rs1), + fvti.RegClass:$rs2, + cc, + VR:$merge, + (fvti.Mask V0), + VLOpFrag)), (!cast(inst_name#"_VV_"#fvti.LMul.MX#"_MASK") VR:$merge, fvti.RegClass:$rs1, fvti.RegClass:$rs2, (fvti.Mask V0), GPR:$vl, fvti.Log2SEW)>; - def : Pat<(fvti.Mask (riscv_setcc_vl (fvti.Vector fvti.RegClass:$rs1), - (SplatFPOp fvti.ScalarRegClass:$rs2), - cc, - VR:$merge, - (fvti.Mask V0), - VLOpFrag)), + def : Pat<(fvti.Mask (vop (fvti.Vector fvti.RegClass:$rs1), + (SplatFPOp fvti.ScalarRegClass:$rs2), + cc, + VR:$merge, + (fvti.Mask V0), + VLOpFrag)), (!cast(inst_name#"_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX#"_MASK") VR:$merge, fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, (fvti.Mask V0), GPR:$vl, fvti.Log2SEW)>; - def : Pat<(fvti.Mask (riscv_setcc_vl (SplatFPOp fvti.ScalarRegClass:$rs2), - (fvti.Vector fvti.RegClass:$rs1), - cc, - VR:$merge, - (fvti.Mask V0), - VLOpFrag)), + def : Pat<(fvti.Mask (vop (SplatFPOp fvti.ScalarRegClass:$rs2), + (fvti.Vector fvti.RegClass:$rs1), + cc, + VR:$merge, + (fvti.Mask V0), + VLOpFrag)), (!cast(swapped_op_inst_name#"_V"#fvti.ScalarSuffix#"_"#fvti.LMul.MX#"_MASK") VR:$merge, fvti.RegClass:$rs1, fvti.ScalarRegClass:$rs2, (fvti.Mask V0), @@ -1851,17 +1856,22 @@ defm : VPatBinaryFPVL_VV_VF; // 13.13. Vector Floating-Point Compare Instructions -defm : VPatFPSetCCVL_VV_VF_FV; -defm : VPatFPSetCCVL_VV_VF_FV; - -defm : VPatFPSetCCVL_VV_VF_FV; -defm : VPatFPSetCCVL_VV_VF_FV; - -defm : VPatFPSetCCVL_VV_VF_FV; -defm : VPatFPSetCCVL_VV_VF_FV; - -defm : VPatFPSetCCVL_VV_VF_FV; -defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; +defm : VPatFPSetCCVL_VV_VF_FV; foreach vti = AllFloatVectors in { // 13.8. Vector Floating-Point Square-Root Instruction diff --git a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmp-constrained-sdnode.ll b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmp-constrained-sdnode.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmp-constrained-sdnode.ll @@ -0,0 +1,9938 @@ +; 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 -riscv-v-vector-bits-min=128\ +; RUN: -verify-machineinstrs < %s | FileCheck %s +; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+experimental-zvfh,+v -target-abi=lp64d -riscv-v-vector-bits-min=128\ +; RUN: -verify-machineinstrs < %s | FileCheck %s + +declare <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half>, <1 x half>, metadata, metadata) +define <1 x i1> @fcmp_oeq_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oeq_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oeq_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +declare <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half>, <2 x half>, metadata, metadata) +define <2 x i1> @fcmp_oeq_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oeq_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oeq_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +declare <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half>, <4 x half>, metadata, metadata) +define <4 x i1> @fcmp_oeq_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oeq_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oeq_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +declare <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half>, <8 x half>, metadata, metadata) +define <8 x i1> @fcmp_oeq_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oeq_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oeq_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +declare <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half>, <16 x half>, metadata, metadata) +define <16 x i1> @fcmp_oeq_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oeq_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oeq_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ogt_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ogt_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ogt_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oge_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oge_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oge_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_olt_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_olt_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_olt_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ole_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ole_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ole_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_one_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_one_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_one_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ord_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ord_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ord_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ueq_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ueq_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ueq_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ugt_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ugt_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ugt_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uge_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uge_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uge_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ult_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ult_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ult_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ule_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ule_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ule_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_une_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_une_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_une_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uno_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uno_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uno_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +declare <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half>, <32 x half>, metadata, metadata) +define <32 x i1> @fcmp_oeq_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_oeq_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_oeq_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ogt_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ogt_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ogt_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_oge_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_oge_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_oge_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_olt_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_olt_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_olt_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ole_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ole_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ole_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_one_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_one_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_one_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ord_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ord_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ord_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ueq_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ueq_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ueq_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ugt_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ugt_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ugt_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_uge_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_uge_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_uge_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ult_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ult_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ult_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ule_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ule_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_ule_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_une_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_une_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_une_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_uno_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_uno_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmp_uno_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +declare <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float>, <1 x float>, metadata, metadata) +define <1 x i1> @fcmp_oeq_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oeq_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oeq_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +declare <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float>, <2 x float>, metadata, metadata) +define <2 x i1> @fcmp_oeq_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oeq_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oeq_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +declare <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float>, <4 x float>, metadata, metadata) +define <4 x i1> @fcmp_oeq_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oeq_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oeq_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +declare <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float>, <8 x float>, metadata, metadata) +define <8 x i1> @fcmp_oeq_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oeq_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oeq_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +declare <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float>, <16 x float>, metadata, metadata) +define <16 x i1> @fcmp_oeq_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oeq_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oeq_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ogt_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ogt_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ogt_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oge_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oge_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_oge_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_olt_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_olt_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_olt_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ole_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ole_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ole_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_one_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_one_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_one_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ord_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ord_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ord_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ueq_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ueq_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ueq_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ugt_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ugt_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ugt_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uge_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uge_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uge_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ult_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ult_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ult_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ule_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ule_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_ule_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_une_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_une_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_une_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uno_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uno_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmp_uno_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +declare <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double>, <1 x double>, metadata, metadata) +define <1 x i1> @fcmp_oeq_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oeq_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oeq_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ogt_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_oge_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_olt_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ole_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_one_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ord_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ueq_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ugt_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uge_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ult_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_ule_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_une_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmp_uno_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +declare <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double>, <2 x double>, metadata, metadata) +define <2 x i1> @fcmp_oeq_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oeq_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oeq_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ogt_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_oge_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_olt_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ole_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_one_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ord_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ueq_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ugt_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uge_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ult_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_ule_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_une_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmp_uno_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +declare <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double>, <4 x double>, metadata, metadata) +define <4 x i1> @fcmp_oeq_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oeq_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oeq_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ogt_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_oge_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_olt_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ole_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_one_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ord_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ueq_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ugt_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uge_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ult_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_ule_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_une_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmp_uno_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +declare <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double>, <8 x double>, metadata, metadata) +define <8 x i1> @fcmp_oeq_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oeq_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oeq_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oeq_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfeq.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ogt_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ogt_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_oge_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_oge_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_olt_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_olt_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ole_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ole_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_one_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_one_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ord_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ord_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ueq_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ueq_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ugt_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ugt_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uge_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uge_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ult_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ult_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_ule_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_ule_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfne.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_une_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_une_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfne.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmp_uno_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmp_uno_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmp.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} diff --git a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmps-constrained-sdnode.ll b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmps-constrained-sdnode.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfcmps-constrained-sdnode.ll @@ -0,0 +1,8162 @@ +; 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 -riscv-v-vector-bits-min=128\ +; RUN: -verify-machineinstrs < %s | FileCheck %s +; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+experimental-zvfh,+v -target-abi=lp64d -riscv-v-vector-bits-min=128\ +; RUN: -verify-machineinstrs < %s | FileCheck %s + +declare <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half>, <1 x half>, metadata, metadata) +define <1 x i1> @fcmps_oeq_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oeq_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oeq_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_vv_v1f16(<1 x half> %va, <1 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_vf_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_fv_v1f16(<1 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v1f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x half> poison, half %b, i32 0 + %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f16(<1 x half> %splat, <1 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +declare <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half>, <2 x half>, metadata, metadata) +define <2 x i1> @fcmps_oeq_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oeq_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oeq_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_vv_v2f16(<2 x half> %va, <2 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_vf_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_fv_v2f16(<2 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v2f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x half> poison, half %b, i32 0 + %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f16(<2 x half> %splat, <2 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +declare <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half>, <4 x half>, metadata, metadata) +define <4 x i1> @fcmps_oeq_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oeq_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oeq_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_vv_v4f16(<4 x half> %va, <4 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_vf_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_fv_v4f16(<4 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v4f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x half> poison, half %b, i32 0 + %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f16(<4 x half> %splat, <4 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +declare <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half>, <8 x half>, metadata, metadata) +define <8 x i1> @fcmps_oeq_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oeq_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oeq_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_vv_v8f16(<8 x half> %va, <8 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_vf_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_fv_v8f16(<8 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v8f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x half> poison, half %b, i32 0 + %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f16(<8 x half> %splat, <8 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +declare <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half>, <16 x half>, metadata, metadata) +define <16 x i1> @fcmps_oeq_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oeq_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oeq_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ogt_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ogt_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ogt_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oge_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oge_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oge_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_olt_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_olt_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_olt_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ole_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ole_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ole_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_one_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_one_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_one_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ord_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ord_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; 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 + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ord_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmmv.m v10, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ueq_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ueq_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ueq_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ugt_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ugt_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ugt_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uge_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uge_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uge_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ult_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ult_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ult_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ule_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ule_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ule_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_une_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_une_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_une_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uno_vv_v16f16(<16 x half> %va, <16 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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: vmnot.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uno_vf_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmmv.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmnot.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uno_fv_v16f16(<16 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v16f16: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmnot.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement <16 x half> poison, half %b, i32 0 + %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half> %splat, <16 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +declare <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half>, <32 x half>, metadata, metadata) +define <32 x i1> @fcmps_oeq_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_oeq_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_oeq_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ogt_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ogt_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ogt_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_oge_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_oge_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_oge_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_olt_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_olt_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_olt_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ole_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ole_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ole_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_one_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_one_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_one_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ord_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ord_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; 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 + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ord_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmmv.m v8, v16 +; CHECK-NEXT: vmfle.vf v9, v12, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmand.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ueq_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ueq_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ueq_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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 <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ugt_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ugt_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ugt_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_uge_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_uge_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_uge_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ult_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ult_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ult_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ule_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ule_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_ule_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_une_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmnand.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_une_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_une_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_uno_vv_v32f16(<32 x half> %va, <32 x half> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, 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: vmnot.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_uno_vf_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmmv.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmnot.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +define <32 x i1> @fcmps_uno_fv_v32f16(<32 x half> %va, half %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v32f16: +; CHECK: # %bb.0: +; CHECK-NEXT: li a0, 32 +; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmmv.m v8, v16 +; CHECK-NEXT: vmfle.vf v9, v12, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <32 x half> poison, half %b, i32 0 + %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer + %1 = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half> %splat, <32 x half> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <32 x i1> %1 +} + +declare <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float>, <1 x float>, metadata, metadata) +define <1 x i1> @fcmps_oeq_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oeq_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oeq_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_vv_v1f32(<1 x float> %va, <1 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_vf_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_fv_v1f32(<1 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v1f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x float> poison, float %b, i32 0 + %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f32(<1 x float> %splat, <1 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +declare <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float>, <2 x float>, metadata, metadata) +define <2 x i1> @fcmps_oeq_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oeq_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oeq_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_vv_v2f32(<2 x float> %va, <2 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_vf_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_fv_v2f32(<2 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v2f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x float> poison, float %b, i32 0 + %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float> %splat, <2 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +declare <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float>, <4 x float>, metadata, metadata) +define <4 x i1> @fcmps_oeq_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oeq_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oeq_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_vv_v4f32(<4 x float> %va, <4 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_vf_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_fv_v4f32(<4 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v4f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x float> poison, float %b, i32 0 + %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %splat, <4 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +declare <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float>, <8 x float>, metadata, metadata) +define <8 x i1> @fcmps_oeq_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oeq_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oeq_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; 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 + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmmv.m v10, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_vv_v8f32(<8 x float> %va, <8 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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: vmnot.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_vf_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmmv.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmnot.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_fv_v8f32(<8 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v8f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmnot.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x float> poison, float %b, i32 0 + %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %splat, <8 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +declare <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float>, <16 x float>, metadata, metadata) +define <16 x i1> @fcmps_oeq_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oeq_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oeq_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ogt_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ogt_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ogt_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oge_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oge_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_oge_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_olt_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_olt_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_olt_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ole_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ole_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ole_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_one_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_one_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_one_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ord_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ord_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; 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 + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ord_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmmv.m v12, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ueq_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ueq_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ueq_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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 <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ugt_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ugt_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ugt_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uge_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uge_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uge_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ult_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ult_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ult_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ule_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ule_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_ule_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_une_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmnand.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_une_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_une_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uno_vv_v16f32(<16 x float> %va, <16 x float> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, 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: vmnot.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uno_vf_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmmv.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmnot.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +define <16 x i1> @fcmps_uno_fv_v16f32(<16 x float> %va, float %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v16f32: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmnot.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement <16 x float> poison, float %b, i32 0 + %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer + %1 = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f32(<16 x float> %splat, <16 x float> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <16 x i1> %1 +} + +declare <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double>, <1 x double>, metadata, metadata) +define <1 x i1> @fcmps_oeq_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oeq_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oeq_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ogt_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_oge_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_olt_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ole_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_one_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ord_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ueq_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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 <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ugt_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uge_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ult_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_ule_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_une_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_vv_v1f64(<1 x double> %va, <1 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_vf_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +define <1 x i1> @fcmps_uno_fv_v1f64(<1 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v1f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <1 x double> poison, double %b, i32 0 + %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer + %1 = call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %splat, <1 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <1 x i1> %1 +} + +declare <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double>, <2 x double>, metadata, metadata) +define <2 x i1> @fcmps_oeq_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oeq_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oeq_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ogt_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v9, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_oge_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_olt_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ole_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_one_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; 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 + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ord_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ueq_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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 <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ugt_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v8, v9 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uge_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ult_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vv v8, v9, v8 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfgt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_ule_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmflt.vf v8, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_une_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_vv_v2f64(<2 x double> %va, <2 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, 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: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_vf_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmmv.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v8, v9 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +define <2 x i1> @fcmps_uno_fv_v2f64(<2 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v2f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmmv.m v8, v8 +; CHECK-NEXT: vmorn.mm v0, v9, v8 +; CHECK-NEXT: ret + %head = insertelement <2 x double> poison, double %b, i32 0 + %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer + %1 = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %splat, <2 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <2 x i1> %1 +} + +declare <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double>, <4 x double>, metadata, metadata) +define <4 x i1> @fcmps_oeq_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oeq_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oeq_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ogt_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v10, v8 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_oge_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_olt_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ole_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_one_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; 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 + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ord_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmmv.m v10, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ueq_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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 <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ugt_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v8, v10 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uge_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ult_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vv v12, v10, v8 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfgt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_ule_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmflt.vf v10, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_une_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v11, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_vv_v4f64(<4 x double> %va, <4 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, 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: vmnot.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v8, v10 +; CHECK-NEXT: ret + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_vf_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmmv.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmnot.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v8, v10 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +define <4 x i1> @fcmps_uno_fv_v4f64(<4 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v4f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmnot.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmmv.m v8, v11 +; CHECK-NEXT: vmorn.mm v0, v10, v8 +; CHECK-NEXT: ret + %head = insertelement <4 x double> poison, double %b, i32 0 + %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer + %1 = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %splat, <4 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <4 x i1> %1 +} + +declare <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double>, <8 x double>, metadata, metadata) +define <8 x i1> @fcmps_oeq_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oeq_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oeq_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oeq_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"oeq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ogt_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ogt_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ogt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v12, v8 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_oge_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_oge_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"oge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_olt_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_olt_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"olt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ole_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ole_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v0, v8, fa0 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ole", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_one_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_one_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"one", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; 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 + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ord_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ord_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmmv.m v12, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ord", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ueq_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ueq_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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 <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ueq", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ugt_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ugt_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ugt", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v8, v12 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uge_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uge_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"uge", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ult_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ult_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ult", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vv v16, v12, v8 +; CHECK-NEXT: vmnot.m v0, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfgt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_ule_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_ule_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmflt.vf v12, v8, fa0 +; CHECK-NEXT: vmnot.m v0, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"ule", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmnand.mm v0, v17, v16 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_une_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_une_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.mm v0, v13, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"une", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_vv_v8f64(<8 x double> %va, <8 x double> %vb) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, 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: vmnot.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; CHECK-NEXT: ret + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_vf_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_vf_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmmv.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmnot.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} + +define <8 x i1> @fcmps_uno_fv_v8f64(<8 x double> %va, double %b) nounwind strictfp { +; CHECK-LABEL: fcmps_uno_fv_v8f64: +; CHECK: # %bb.0: +; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmnot.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmmv.m v8, v13 +; CHECK-NEXT: vmorn.mm v0, v12, v8 +; CHECK-NEXT: ret + %head = insertelement <8 x double> poison, double %b, i32 0 + %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer + %1 = call <8 x i1> @llvm.experimental.constrained.fcmps.v8f64(<8 x double> %splat, <8 x double> %va, metadata !"uno", metadata !"fpexcept.strict") strictfp + ret <8 x i1> %1 +} 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,10004 @@ +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, 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 !"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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, 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 !"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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf4, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, 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 !"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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, 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 !"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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, 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 !"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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, 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 !"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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v17, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmfeq.vv v26, v8, v8 +; CHECK-NEXT: vmand.mm v24, v26, v25 +; CHECK-NEXT: vmand.mm v25, v25, v26 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v25 +; CHECK-NEXT: vmflt.vv v25, v16, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v25, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v24 +; CHECK-NEXT: vmand.mm v17, v24, v17 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v24, v17 +; CHECK-NEXT: vmand.mm v17, v17, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmfeq.vv v26, v8, v8 +; CHECK-NEXT: vmand.mm v24, v26, v25 +; CHECK-NEXT: vmand.mm v25, v25, v26 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v25 +; CHECK-NEXT: vmflt.vv v25, v16, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v24 +; CHECK-NEXT: vmand.mm v17, v24, v17 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v24, v17 +; CHECK-NEXT: vmand.mm v17, v17, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e16, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, 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 !"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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, 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 !"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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv1r.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, mf2, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, 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 !"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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, 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 !"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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v17, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmfeq.vv v26, v8, v8 +; CHECK-NEXT: vmand.mm v24, v26, v25 +; CHECK-NEXT: vmand.mm v25, v25, v26 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v25 +; CHECK-NEXT: vmflt.vv v25, v16, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v25, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v24 +; CHECK-NEXT: vmand.mm v17, v24, v17 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v24, v17 +; CHECK-NEXT: vmand.mm v17, v17, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmfeq.vv v26, v8, v8 +; CHECK-NEXT: vmand.mm v24, v26, v25 +; CHECK-NEXT: vmand.mm v25, v25, v26 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v25 +; CHECK-NEXT: vmflt.vv v25, v16, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v24 +; CHECK-NEXT: vmand.mm v17, v24, v17 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v24, v17 +; CHECK-NEXT: vmand.mm v17, v17, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e32, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, 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 !"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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vv v10, v8, v9, v0.t +; CHECK-NEXT: vmv.v.v v0, v11 +; CHECK-NEXT: vmflt.vv v11, v9, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v11, v10 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v11, v10 +; CHECK-NEXT: vmand.mm v10, v10, v11 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmflt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, 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 !"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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v10, v9, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v9, v10, v11 +; CHECK-NEXT: vmand.mm v10, v11, v10 +; CHECK-NEXT: vmv.v.v v0, v9 +; CHECK-NEXT: vmfgt.vf v9, v8, fa0, v0.t +; CHECK-NEXT: vmv.v.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmnor.mm v0, v10, v9 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v9, v9 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v8, v9, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmfle.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfge.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmfle.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmfeq.vv v11, v9, v9 +; CHECK-NEXT: vmand.mm v0, v11, v10 +; CHECK-NEXT: vmflt.vv v0, v9, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v9, v10 +; CHECK-NEXT: vmfgt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m1, ta, mu +; CHECK-NEXT: vfmv.v.f v9, fa0 +; CHECK-NEXT: vmfeq.vf v9, v9, fa0 +; CHECK-NEXT: vmfeq.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v9 +; CHECK-NEXT: vmflt.vf v0, v8, fa0, v0.t +; CHECK-NEXT: vmnot.m v0, v0 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v10 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v13, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmfeq.vv v14, v8, v8 +; CHECK-NEXT: vmand.mm v12, v14, v13 +; CHECK-NEXT: vmand.mm v13, v13, v14 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vv v13, v10, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v13, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v11, v12 +; CHECK-NEXT: vmand.mm v11, v12, v11 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmfgt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vfmv.v.f v10, fa0 +; CHECK-NEXT: vmfeq.vf v12, v10, fa0 +; CHECK-NEXT: vmfeq.vv v11, v8, v8 +; CHECK-NEXT: vmand.mm v10, v12, v11 +; CHECK-NEXT: vmand.mm v11, v11, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v11 +; CHECK-NEXT: vmflt.vf v11, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v10, v10 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v8, v10, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfge.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfle.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; CHECK-NEXT: vmfeq.vv v12, v8, v8 +; CHECK-NEXT: vmfeq.vv v13, v10, v10 +; CHECK-NEXT: vmand.mm v12, v13, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vv v12, v10, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v12 +; 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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v12, v10 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmfgt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m2, ta, mu +; 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 v10, v10, v12 +; CHECK-NEXT: vmv1r.v v0, v10 +; CHECK-NEXT: vmflt.vf v10, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v12 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v17, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmfeq.vv v18, v8, v8 +; CHECK-NEXT: vmand.mm v16, v18, v17 +; CHECK-NEXT: vmand.mm v17, v17, v18 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v17, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v13, v16 +; CHECK-NEXT: vmand.mm v13, v16, v13 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vfmv.v.f v12, fa0 +; CHECK-NEXT: vmfeq.vf v16, v12, fa0 +; CHECK-NEXT: vmfeq.vv v13, v8, v8 +; CHECK-NEXT: vmand.mm v12, v16, v13 +; CHECK-NEXT: vmand.mm v13, v13, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v13 +; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v12, v12 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; CHECK-NEXT: vmfeq.vv v16, v8, v8 +; CHECK-NEXT: vmfeq.vv v17, v12, v12 +; CHECK-NEXT: vmand.mm v16, v17, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v16 +; 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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v16, v12 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m4, ta, mu +; 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 v12, v12, v16 +; CHECK-NEXT: vmv1r.v v0, v12 +; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v16 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, 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 !"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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmfeq.vv v26, v8, v8 +; CHECK-NEXT: vmand.mm v24, v26, v25 +; CHECK-NEXT: vmand.mm v25, v25, v26 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v25 +; CHECK-NEXT: vmflt.vv v25, v16, v8, v0.t +; CHECK-NEXT: vmor.mm v0, v25, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v24 +; CHECK-NEXT: vmand.mm v17, v24, v17 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v24, v17 +; CHECK-NEXT: vmand.mm v17, v17, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmfeq.vv v26, v8, v8 +; CHECK-NEXT: vmand.mm v24, v26, v25 +; CHECK-NEXT: vmand.mm v25, v25, v26 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmv1r.v v0, v25 +; CHECK-NEXT: vmflt.vv v25, v16, v8, v0.t +; CHECK-NEXT: vmnor.mm v0, v25, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v17, v24 +; CHECK-NEXT: vmand.mm v17, v24, v17 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmfgt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vfmv.v.f v16, fa0 +; CHECK-NEXT: vmfeq.vf v24, v16, fa0 +; CHECK-NEXT: vmfeq.vv v17, v8, v8 +; CHECK-NEXT: vmand.mm v16, v24, v17 +; CHECK-NEXT: vmand.mm v17, v17, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; CHECK-NEXT: vmv1r.v v0, v17 +; CHECK-NEXT: vmflt.vf v17, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v16, v16 +; CHECK-NEXT: vmfeq.vv v25, v8, v8 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v8, v16, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmfle.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfge.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfle.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; CHECK-NEXT: vmfeq.vv v24, v8, v8 +; CHECK-NEXT: vmfeq.vv v25, v16, v16 +; CHECK-NEXT: vmand.mm v24, v25, v24 +; CHECK-NEXT: vmv1r.v v0, v24 +; CHECK-NEXT: vmflt.vv v24, v16, v8, v0.t +; CHECK-NEXT: vmnot.m v0, v24 +; 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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v24, v16 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmfgt.vf v16, v8, fa0, v0.t +; 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.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: vsetvli a0, zero, e64, m8, ta, mu +; 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 v16, v16, v24 +; CHECK-NEXT: vmv1r.v v0, v16 +; CHECK-NEXT: vmflt.vf v16, v8, fa0, v0.t +; 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.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,7985 @@ +; 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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v8, 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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; 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: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v8, 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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; 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: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v8, 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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; 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: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; 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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmnand.mm v0, v13, 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: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v12, v10, v10 +; CHECK-NEXT: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmnot.m v8, v10 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; 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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmnot.m v8, v10 +; CHECK-NEXT: vmorn.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.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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmnot.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v10, v11 +; 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: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; 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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmnand.mm v0, v17, 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: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v16, v12, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmnot.m v8, v12 +; CHECK-NEXT: vmorn.mm v0, v8, v16 +; 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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmnot.m v8, v12 +; CHECK-NEXT: vmorn.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.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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmnot.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v12, v13 +; 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: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmfle.vv v25, v8, v16 +; CHECK-NEXT: vmnand.mm v0, v25, 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: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmfge.vf v17, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v24, v16, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmnot.m v8, v16 +; CHECK-NEXT: vmorn.mm v0, v8, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmnot.m v8, v16 +; CHECK-NEXT: vmorn.mm v0, v8, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmnot.m v16, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v16, v17 +; 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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v8, 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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; 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: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v8, 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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; 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: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; 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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmnand.mm v0, v13, 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: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v12, v10, v10 +; CHECK-NEXT: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmnot.m v8, v10 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; 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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmnot.m v8, v10 +; CHECK-NEXT: vmorn.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.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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmnot.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v10, v11 +; 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: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; 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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmnand.mm v0, v17, 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: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v16, v12, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmnot.m v8, v12 +; CHECK-NEXT: vmorn.mm v0, v8, v16 +; 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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmnot.m v8, v12 +; CHECK-NEXT: vmorn.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.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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmnot.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v12, v13 +; 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: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmfle.vv v25, v8, v16 +; CHECK-NEXT: vmnand.mm v0, v25, 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: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmfge.vf v17, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v24, v16, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmnot.m v8, v16 +; CHECK-NEXT: vmorn.mm v0, v8, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmnot.m v8, v16 +; CHECK-NEXT: vmorn.mm v0, v8, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmnot.m v16, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v16, v17 +; 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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v8, 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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v10, v9, v8 +; CHECK-NEXT: vmfle.vv v8, v8, v9 +; CHECK-NEXT: vmnand.mm v0, v8, v10 +; 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: vmfge.vf v9, v8, fa0 +; CHECK-NEXT: vmfle.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v9, v8, fa0 +; CHECK-NEXT: vmfge.vf v8, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v9, v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmnot.m v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v9, v9, fa0 +; CHECK-NEXT: vmnot.m v9, v9 +; CHECK-NEXT: vmfle.vv v8, v8, v8 +; CHECK-NEXT: vmorn.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: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmand.mm v0, v10, v12 +; 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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v12, v10, v8 +; CHECK-NEXT: vmfle.vv v13, v8, v10 +; CHECK-NEXT: vmnand.mm v0, v13, 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: vmfge.vf v10, v8, fa0 +; CHECK-NEXT: vmfle.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v10, v8, fa0 +; CHECK-NEXT: vmfge.vf v11, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v12, v10, v10 +; CHECK-NEXT: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmnot.m v8, v10 +; CHECK-NEXT: vmorn.mm v0, v8, v12 +; 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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmfle.vv v10, v8, v8 +; CHECK-NEXT: vmnot.m v8, v10 +; CHECK-NEXT: vmorn.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.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: vmfle.vf v12, v10, fa0 +; CHECK-NEXT: vmnot.m v10, v12 +; CHECK-NEXT: vmfle.vv v11, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v10, v11 +; 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: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmand.mm v0, v12, v16 +; 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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v16, v12, v8 +; CHECK-NEXT: vmfle.vv v17, v8, v12 +; CHECK-NEXT: vmnand.mm v0, v17, 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: vmfge.vf v12, v8, fa0 +; CHECK-NEXT: vmfle.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v12, v8, fa0 +; CHECK-NEXT: vmfge.vf v13, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v16, v12, v12 +; CHECK-NEXT: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmnot.m v8, v12 +; CHECK-NEXT: vmorn.mm v0, v8, v16 +; 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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmfle.vv v12, v8, v8 +; CHECK-NEXT: vmnot.m v8, v12 +; CHECK-NEXT: vmorn.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.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: vmfle.vf v16, v12, fa0 +; CHECK-NEXT: vmnot.m v12, v16 +; CHECK-NEXT: vmfle.vv v13, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v12, v13 +; 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: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmfge.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: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmand.mm v0, v16, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.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.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: vmfle.vv v24, v16, v8 +; CHECK-NEXT: vmfle.vv v25, v8, v16 +; CHECK-NEXT: vmnand.mm v0, v25, 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: vmfge.vf v16, v8, fa0 +; CHECK-NEXT: vmfle.vf v17, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vf v16, v8, fa0 +; CHECK-NEXT: vmfge.vf v17, v8, fa0 +; CHECK-NEXT: vmnand.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 !"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: vmfle.vv v24, v16, v16 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmnot.m v8, v16 +; CHECK-NEXT: vmorn.mm v0, v8, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmfle.vv v16, v8, v8 +; CHECK-NEXT: vmnot.m v8, v16 +; CHECK-NEXT: vmorn.mm v0, v8, v24 +; 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: vmfle.vf v24, v16, fa0 +; CHECK-NEXT: vmnot.m v16, v24 +; CHECK-NEXT: vmfle.vv v17, v8, v8 +; CHECK-NEXT: vmorn.mm v0, v16, v17 +; 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 +}