diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -138,6 +138,11 @@ TTI::OperandValueKind OpdInfo = TTI::OK_AnyValue, const Instruction *I = nullptr); + InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, + CmpInst::Predicate VecPred, + TTI::TargetCostKind CostKind, + const Instruction *I = nullptr); + bool isElementTypeLegalForScalableVector(Type *Ty) const { return TLI->isLegalElementTypeForRVV(Ty); } diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -543,6 +543,60 @@ CostKind, OpdInfo, I); } +InstructionCost RISCVTTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy, + Type *CondTy, + CmpInst::Predicate VecPred, + TTI::TargetCostKind CostKind, + const Instruction *I) { + if (CostKind != TTI::TCK_RecipThroughput) + return BaseT::getCmpSelInstrCost(Opcode, ValTy, CondTy, VecPred, CostKind, + I); + + if (isa(ValTy) && !ST->useRVVForFixedLengthVectors()) + return BaseT::getCmpSelInstrCost(Opcode, ValTy, CondTy, VecPred, CostKind, + I); + + // Skip if scalar size of ValTy is bigger than ELEN. + if (ValTy->isVectorTy() && ValTy->getScalarSizeInBits() > ST->getELEN()) + return BaseT::getCmpSelInstrCost(Opcode, ValTy, CondTy, VecPred, CostKind, + I); + + if (Opcode == Instruction::Select && ValTy->isVectorTy()) { + std::pair LT = getTypeLegalizationCost(ValTy); + if (CondTy->isVectorTy()) { + if (ValTy->getScalarSizeInBits() == 1) { + // vmandn.mm v8, v8, v9 + // vmand.mm v9, v0, v9 + // vmor.mm v0, v9, v8 + return LT.first * 3; + } + // vselect and max/min are supported natively. + return LT.first * 1; + } + + // vmv.v.x v10, a0 + // vmsne.vi v0, v10, 0 + // vmerge.vvm v8, v9, v8, v0 + return LT.first * 3; + } + + if ((Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) && + ValTy->isVectorTy()) { + std::pair LT = getTypeLegalizationCost(ValTy); + + // Support natively. + if (CmpInst::isIntPredicate(VecPred) || VecPred == CmpInst::FCMP_OEQ || + VecPred == CmpInst::FCMP_OGT || VecPred == CmpInst::FCMP_OGE || + VecPred == CmpInst::FCMP_OLT || VecPred == CmpInst::FCMP_OLE || + VecPred == CmpInst::FCMP_UNE) { + return LT.first * 1; + } + // TODO: Other comparisons? + } + + return BaseT::getCmpSelInstrCost(Opcode, ValTy, CondTy, VecPred, CostKind, I); +} + void RISCVTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP, OptimizationRemarkEmitter *ORE) { diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-cmp.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-cmp.ll new file mode 100644 --- /dev/null +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-cmp.ll @@ -0,0 +1,1478 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+experimental-zvfh -riscv-v-vector-bits-min=128 -riscv-v-fixed-length-vector-lmul-max=1 < %s | FileCheck %s +; Check that we don't crash querying costs when vectors are not enabled. +; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv64 + +define void @icmp_eq() { +; CHECK-LABEL: 'icmp_eq' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp eq <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp eq <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp eq <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp eq <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp eq <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp eq <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp eq <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp eq <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp eq <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp eq <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp eq <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp eq <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp eq <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp eq <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp eq <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp eq <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp eq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp eq <2 x i8> undef, undef + %v4i8 = icmp eq <4 x i8> undef, undef + %v8i8 = icmp eq <8 x i8> undef, undef + %v16i8 = icmp eq <16 x i8> undef, undef + %v32i8 = icmp eq <32 x i8> undef, undef + + %nxv2i8 = icmp eq undef, undef + %nxv4i8 = icmp eq undef, undef + %nxv8i8 = icmp eq undef, undef + %nxv16i8 = icmp eq undef, undef + %nxv32i8 = icmp eq undef, undef + + %v2i16 = icmp eq <2 x i16> undef, undef + %v4i16 = icmp eq <4 x i16> undef, undef + %v8i16 = icmp eq <8 x i16> undef, undef + %v16i16 = icmp eq <16 x i16> undef, undef + + %nxv2i16 = icmp eq undef, undef + %nxv4i16 = icmp eq undef, undef + %nxv8i16 = icmp eq undef, undef + %nxv16i16 = icmp eq undef, undef + + %v2i32 = icmp eq <2 x i32> undef, undef + %v4i32 = icmp eq <4 x i32> undef, undef + %v8i32 = icmp eq <8 x i32> undef, undef + %v16i32 = icmp eq <16 x i32> undef, undef + + %nxv2i32 = icmp eq undef, undef + %nxv4i32 = icmp eq undef, undef + %nxv8i32 = icmp eq undef, undef + %nxv16i32 = icmp eq undef, undef + + %v2i64 = icmp eq <2 x i64> undef, undef + %v4i64 = icmp eq <4 x i64> undef, undef + %v8i64 = icmp eq <8 x i64> undef, undef + + %nxv2i64 = icmp eq undef, undef + %nxv4i64 = icmp eq undef, undef + %nxv8i64 = icmp eq undef, undef + + ret void +} + +define void @icmp_ne() { +; CHECK-LABEL: 'icmp_ne' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp ne <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp ne <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp ne <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp ne <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp ne <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp ne <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp ne <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp ne <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp ne <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp ne <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp ne <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp ne <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp ne <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp ne <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp ne <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp ne <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ne undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp ne <2 x i8> undef, undef + %v4i8 = icmp ne <4 x i8> undef, undef + %v8i8 = icmp ne <8 x i8> undef, undef + %v16i8 = icmp ne <16 x i8> undef, undef + %v32i8 = icmp ne <32 x i8> undef, undef + + %nxv2i8 = icmp ne undef, undef + %nxv4i8 = icmp ne undef, undef + %nxv8i8 = icmp ne undef, undef + %nxv16i8 = icmp ne undef, undef + %nxv32i8 = icmp ne undef, undef + + %v2i16 = icmp ne <2 x i16> undef, undef + %v4i16 = icmp ne <4 x i16> undef, undef + %v8i16 = icmp ne <8 x i16> undef, undef + %v16i16 = icmp ne <16 x i16> undef, undef + + %nxv2i16 = icmp ne undef, undef + %nxv4i16 = icmp ne undef, undef + %nxv8i16 = icmp ne undef, undef + %nxv16i16 = icmp ne undef, undef + + %v2i32 = icmp ne <2 x i32> undef, undef + %v4i32 = icmp ne <4 x i32> undef, undef + %v8i32 = icmp ne <8 x i32> undef, undef + %v16i32 = icmp ne <16 x i32> undef, undef + + %nxv2i32 = icmp ne undef, undef + %nxv4i32 = icmp ne undef, undef + %nxv8i32 = icmp ne undef, undef + %nxv16i32 = icmp ne undef, undef + + %v2i64 = icmp ne <2 x i64> undef, undef + %v4i64 = icmp ne <4 x i64> undef, undef + %v8i64 = icmp ne <8 x i64> undef, undef + + %nxv2i64 = icmp ne undef, undef + %nxv4i64 = icmp ne undef, undef + %nxv8i64 = icmp ne undef, undef + + ret void +} + +define void @icmp_ugt() { +; CHECK-LABEL: 'icmp_ugt' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp ugt <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp ugt <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp ugt <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp ugt <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp ugt <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp ugt <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp ugt <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp ugt <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp ugt <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp ugt <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp ugt <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp ugt <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp ugt <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp ugt <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp ugt <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp ugt <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp ugt <2 x i8> undef, undef + %v4i8 = icmp ugt <4 x i8> undef, undef + %v8i8 = icmp ugt <8 x i8> undef, undef + %v16i8 = icmp ugt <16 x i8> undef, undef + %v32i8 = icmp ugt <32 x i8> undef, undef + + %nxv2i8 = icmp ugt undef, undef + %nxv4i8 = icmp ugt undef, undef + %nxv8i8 = icmp ugt undef, undef + %nxv16i8 = icmp ugt undef, undef + %nxv32i8 = icmp ugt undef, undef + + %v2i16 = icmp ugt <2 x i16> undef, undef + %v4i16 = icmp ugt <4 x i16> undef, undef + %v8i16 = icmp ugt <8 x i16> undef, undef + %v16i16 = icmp ugt <16 x i16> undef, undef + + %nxv2i16 = icmp ugt undef, undef + %nxv4i16 = icmp ugt undef, undef + %nxv8i16 = icmp ugt undef, undef + %nxv16i16 = icmp ugt undef, undef + + %v2i32 = icmp ugt <2 x i32> undef, undef + %v4i32 = icmp ugt <4 x i32> undef, undef + %v8i32 = icmp ugt <8 x i32> undef, undef + %v16i32 = icmp ugt <16 x i32> undef, undef + + %nxv2i32 = icmp ugt undef, undef + %nxv4i32 = icmp ugt undef, undef + %nxv8i32 = icmp ugt undef, undef + %nxv16i32 = icmp ugt undef, undef + + %v2i64 = icmp ugt <2 x i64> undef, undef + %v4i64 = icmp ugt <4 x i64> undef, undef + %v8i64 = icmp ugt <8 x i64> undef, undef + + %nxv2i64 = icmp ugt undef, undef + %nxv4i64 = icmp ugt undef, undef + %nxv8i64 = icmp ugt undef, undef + + ret void +} + +define void @icmp_uge() { +; CHECK-LABEL: 'icmp_uge' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp uge <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp uge <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp uge <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp uge <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp uge <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp uge <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp uge <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp uge <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp uge <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp uge <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp uge <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp uge <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp uge <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp uge <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp uge <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp uge <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp uge <2 x i8> undef, undef + %v4i8 = icmp uge <4 x i8> undef, undef + %v8i8 = icmp uge <8 x i8> undef, undef + %v16i8 = icmp uge <16 x i8> undef, undef + %v32i8 = icmp uge <32 x i8> undef, undef + + %nxv2i8 = icmp uge undef, undef + %nxv4i8 = icmp uge undef, undef + %nxv8i8 = icmp uge undef, undef + %nxv16i8 = icmp uge undef, undef + %nxv32i8 = icmp uge undef, undef + + %v2i16 = icmp uge <2 x i16> undef, undef + %v4i16 = icmp uge <4 x i16> undef, undef + %v8i16 = icmp uge <8 x i16> undef, undef + %v16i16 = icmp uge <16 x i16> undef, undef + + %nxv2i16 = icmp uge undef, undef + %nxv4i16 = icmp uge undef, undef + %nxv8i16 = icmp uge undef, undef + %nxv16i16 = icmp uge undef, undef + + %v2i32 = icmp uge <2 x i32> undef, undef + %v4i32 = icmp uge <4 x i32> undef, undef + %v8i32 = icmp uge <8 x i32> undef, undef + %v16i32 = icmp uge <16 x i32> undef, undef + + %nxv2i32 = icmp uge undef, undef + %nxv4i32 = icmp uge undef, undef + %nxv8i32 = icmp uge undef, undef + %nxv16i32 = icmp uge undef, undef + + %v2i64 = icmp uge <2 x i64> undef, undef + %v4i64 = icmp uge <4 x i64> undef, undef + %v8i64 = icmp uge <8 x i64> undef, undef + + %nxv2i64 = icmp uge undef, undef + %nxv4i64 = icmp uge undef, undef + %nxv8i64 = icmp uge undef, undef + + ret void +} + +define void @icmp_ult() { +; CHECK-LABEL: 'icmp_ult' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp ult <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp ult <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp ult <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp ult <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp ult <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp ult <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp ult <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp ult <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp ult <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp ult <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp ult <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp ult <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp ult <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp ult <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp ult <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp ult <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp ult <2 x i8> undef, undef + %v4i8 = icmp ult <4 x i8> undef, undef + %v8i8 = icmp ult <8 x i8> undef, undef + %v16i8 = icmp ult <16 x i8> undef, undef + %v32i8 = icmp ult <32 x i8> undef, undef + + %nxv2i8 = icmp ult undef, undef + %nxv4i8 = icmp ult undef, undef + %nxv8i8 = icmp ult undef, undef + %nxv16i8 = icmp ult undef, undef + %nxv32i8 = icmp ult undef, undef + + %v2i16 = icmp ult <2 x i16> undef, undef + %v4i16 = icmp ult <4 x i16> undef, undef + %v8i16 = icmp ult <8 x i16> undef, undef + %v16i16 = icmp ult <16 x i16> undef, undef + + %nxv2i16 = icmp ult undef, undef + %nxv4i16 = icmp ult undef, undef + %nxv8i16 = icmp ult undef, undef + %nxv16i16 = icmp ult undef, undef + + %v2i32 = icmp ult <2 x i32> undef, undef + %v4i32 = icmp ult <4 x i32> undef, undef + %v8i32 = icmp ult <8 x i32> undef, undef + %v16i32 = icmp ult <16 x i32> undef, undef + + %nxv2i32 = icmp ult undef, undef + %nxv4i32 = icmp ult undef, undef + %nxv8i32 = icmp ult undef, undef + %nxv16i32 = icmp ult undef, undef + + %v2i64 = icmp ult <2 x i64> undef, undef + %v4i64 = icmp ult <4 x i64> undef, undef + %v8i64 = icmp ult <8 x i64> undef, undef + + %nxv2i64 = icmp ult undef, undef + %nxv4i64 = icmp ult undef, undef + %nxv8i64 = icmp ult undef, undef + + ret void +} + +define void @icmp_ule() { +; CHECK-LABEL: 'icmp_ule' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp ule <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp ule <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp ule <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp ule <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp ule <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp ule <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp ule <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp ule <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp ule <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp ule <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp ule <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp ule <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp ule <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp ule <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp ule <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp ule <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp ule <2 x i8> undef, undef + %v4i8 = icmp ule <4 x i8> undef, undef + %v8i8 = icmp ule <8 x i8> undef, undef + %v16i8 = icmp ule <16 x i8> undef, undef + %v32i8 = icmp ule <32 x i8> undef, undef + + %nxv2i8 = icmp ule undef, undef + %nxv4i8 = icmp ule undef, undef + %nxv8i8 = icmp ule undef, undef + %nxv16i8 = icmp ule undef, undef + %nxv32i8 = icmp ule undef, undef + + %v2i16 = icmp ule <2 x i16> undef, undef + %v4i16 = icmp ule <4 x i16> undef, undef + %v8i16 = icmp ule <8 x i16> undef, undef + %v16i16 = icmp ule <16 x i16> undef, undef + + %nxv2i16 = icmp ule undef, undef + %nxv4i16 = icmp ule undef, undef + %nxv8i16 = icmp ule undef, undef + %nxv16i16 = icmp ule undef, undef + + %v2i32 = icmp ule <2 x i32> undef, undef + %v4i32 = icmp ule <4 x i32> undef, undef + %v8i32 = icmp ule <8 x i32> undef, undef + %v16i32 = icmp ule <16 x i32> undef, undef + + %nxv2i32 = icmp ule undef, undef + %nxv4i32 = icmp ule undef, undef + %nxv8i32 = icmp ule undef, undef + %nxv16i32 = icmp ule undef, undef + + %v2i64 = icmp ule <2 x i64> undef, undef + %v4i64 = icmp ule <4 x i64> undef, undef + %v8i64 = icmp ule <8 x i64> undef, undef + + %nxv2i64 = icmp ule undef, undef + %nxv4i64 = icmp ule undef, undef + %nxv8i64 = icmp ule undef, undef + + ret void +} + +define void @icmp_sgt() { +; CHECK-LABEL: 'icmp_sgt' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp sgt <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp sgt <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp sgt <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp sgt <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp sgt <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp sgt <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp sgt <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp sgt <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp sgt <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp sgt <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp sgt <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp sgt <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp sgt <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp sgt <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp sgt <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp sgt <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp sgt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp sgt <2 x i8> undef, undef + %v4i8 = icmp sgt <4 x i8> undef, undef + %v8i8 = icmp sgt <8 x i8> undef, undef + %v16i8 = icmp sgt <16 x i8> undef, undef + %v32i8 = icmp sgt <32 x i8> undef, undef + + %nxv2i8 = icmp sgt undef, undef + %nxv4i8 = icmp sgt undef, undef + %nxv8i8 = icmp sgt undef, undef + %nxv16i8 = icmp sgt undef, undef + %nxv32i8 = icmp sgt undef, undef + + %v2i16 = icmp sgt <2 x i16> undef, undef + %v4i16 = icmp sgt <4 x i16> undef, undef + %v8i16 = icmp sgt <8 x i16> undef, undef + %v16i16 = icmp sgt <16 x i16> undef, undef + + %nxv2i16 = icmp sgt undef, undef + %nxv4i16 = icmp sgt undef, undef + %nxv8i16 = icmp sgt undef, undef + %nxv16i16 = icmp sgt undef, undef + + %v2i32 = icmp sgt <2 x i32> undef, undef + %v4i32 = icmp sgt <4 x i32> undef, undef + %v8i32 = icmp sgt <8 x i32> undef, undef + %v16i32 = icmp sgt <16 x i32> undef, undef + + %nxv2i32 = icmp sgt undef, undef + %nxv4i32 = icmp sgt undef, undef + %nxv8i32 = icmp sgt undef, undef + %nxv16i32 = icmp sgt undef, undef + + %v2i64 = icmp sgt <2 x i64> undef, undef + %v4i64 = icmp sgt <4 x i64> undef, undef + %v8i64 = icmp sgt <8 x i64> undef, undef + + %nxv2i64 = icmp sgt undef, undef + %nxv4i64 = icmp sgt undef, undef + %nxv8i64 = icmp sgt undef, undef + + ret void +} + +define void @icmp_sge() { +; CHECK-LABEL: 'icmp_sge' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp sge <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp sge <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp sge <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp sge <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp sge <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp sge <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp sge <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp sge <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp sge <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp sge <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp sge <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp sge <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp sge <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp sge <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp sge <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp sge <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp sge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp sge <2 x i8> undef, undef + %v4i8 = icmp sge <4 x i8> undef, undef + %v8i8 = icmp sge <8 x i8> undef, undef + %v16i8 = icmp sge <16 x i8> undef, undef + %v32i8 = icmp sge <32 x i8> undef, undef + + %nxv2i8 = icmp sge undef, undef + %nxv4i8 = icmp sge undef, undef + %nxv8i8 = icmp sge undef, undef + %nxv16i8 = icmp sge undef, undef + %nxv32i8 = icmp sge undef, undef + + %v2i16 = icmp sge <2 x i16> undef, undef + %v4i16 = icmp sge <4 x i16> undef, undef + %v8i16 = icmp sge <8 x i16> undef, undef + %v16i16 = icmp sge <16 x i16> undef, undef + + %nxv2i16 = icmp sge undef, undef + %nxv4i16 = icmp sge undef, undef + %nxv8i16 = icmp sge undef, undef + %nxv16i16 = icmp sge undef, undef + + %v2i32 = icmp sge <2 x i32> undef, undef + %v4i32 = icmp sge <4 x i32> undef, undef + %v8i32 = icmp sge <8 x i32> undef, undef + %v16i32 = icmp sge <16 x i32> undef, undef + + %nxv2i32 = icmp sge undef, undef + %nxv4i32 = icmp sge undef, undef + %nxv8i32 = icmp sge undef, undef + %nxv16i32 = icmp sge undef, undef + + %v2i64 = icmp sge <2 x i64> undef, undef + %v4i64 = icmp sge <4 x i64> undef, undef + %v8i64 = icmp sge <8 x i64> undef, undef + + %nxv2i64 = icmp sge undef, undef + %nxv4i64 = icmp sge undef, undef + %nxv8i64 = icmp sge undef, undef + + ret void +} + +define void @icmp_slt() { +; CHECK-LABEL: 'icmp_slt' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp slt <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp slt <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp slt <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp slt <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp slt <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp slt <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp slt <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp slt <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp slt <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp slt <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp slt <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp slt <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp slt <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp slt <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp slt <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp slt <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp slt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp slt <2 x i8> undef, undef + %v4i8 = icmp slt <4 x i8> undef, undef + %v8i8 = icmp slt <8 x i8> undef, undef + %v16i8 = icmp slt <16 x i8> undef, undef + %v32i8 = icmp slt <32 x i8> undef, undef + + %nxv2i8 = icmp slt undef, undef + %nxv4i8 = icmp slt undef, undef + %nxv8i8 = icmp slt undef, undef + %nxv16i8 = icmp slt undef, undef + %nxv32i8 = icmp slt undef, undef + + %v2i16 = icmp slt <2 x i16> undef, undef + %v4i16 = icmp slt <4 x i16> undef, undef + %v8i16 = icmp slt <8 x i16> undef, undef + %v16i16 = icmp slt <16 x i16> undef, undef + + %nxv2i16 = icmp slt undef, undef + %nxv4i16 = icmp slt undef, undef + %nxv8i16 = icmp slt undef, undef + %nxv16i16 = icmp slt undef, undef + + %v2i32 = icmp slt <2 x i32> undef, undef + %v4i32 = icmp slt <4 x i32> undef, undef + %v8i32 = icmp slt <8 x i32> undef, undef + %v16i32 = icmp slt <16 x i32> undef, undef + + %nxv2i32 = icmp slt undef, undef + %nxv4i32 = icmp slt undef, undef + %nxv8i32 = icmp slt undef, undef + %nxv16i32 = icmp slt undef, undef + + %v2i64 = icmp slt <2 x i64> undef, undef + %v4i64 = icmp slt <4 x i64> undef, undef + %v8i64 = icmp slt <8 x i64> undef, undef + + %nxv2i64 = icmp slt undef, undef + %nxv4i64 = icmp slt undef, undef + %nxv8i64 = icmp slt undef, undef + + ret void +} + +define void @icmp_sle() { +; CHECK-LABEL: 'icmp_sle' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8 = icmp sle <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = icmp sle <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = icmp sle <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = icmp sle <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8 = icmp sle <32 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = icmp sle <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = icmp sle <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = icmp sle <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16 = icmp sle <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = icmp sle <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32 = icmp sle <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32 = icmp sle <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i32 = icmp sle <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64 = icmp sle <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = icmp sle <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64 = icmp sle <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp sle undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2i8 = icmp sle <2 x i8> undef, undef + %v4i8 = icmp sle <4 x i8> undef, undef + %v8i8 = icmp sle <8 x i8> undef, undef + %v16i8 = icmp sle <16 x i8> undef, undef + %v32i8 = icmp sle <32 x i8> undef, undef + + %nxv2i8 = icmp sle undef, undef + %nxv4i8 = icmp sle undef, undef + %nxv8i8 = icmp sle undef, undef + %nxv16i8 = icmp sle undef, undef + %nxv32i8 = icmp sle undef, undef + + %v2i16 = icmp sle <2 x i16> undef, undef + %v4i16 = icmp sle <4 x i16> undef, undef + %v8i16 = icmp sle <8 x i16> undef, undef + %v16i16 = icmp sle <16 x i16> undef, undef + + %nxv2i16 = icmp sle undef, undef + %nxv4i16 = icmp sle undef, undef + %nxv8i16 = icmp sle undef, undef + %nxv16i16 = icmp sle undef, undef + + %v2i32 = icmp sle <2 x i32> undef, undef + %v4i32 = icmp sle <4 x i32> undef, undef + %v8i32 = icmp sle <8 x i32> undef, undef + %v16i32 = icmp sle <16 x i32> undef, undef + + %nxv2i32 = icmp sle undef, undef + %nxv4i32 = icmp sle undef, undef + %nxv8i32 = icmp sle undef, undef + %nxv16i32 = icmp sle undef, undef + + %v2i64 = icmp sle <2 x i64> undef, undef + %v4i64 = icmp sle <4 x i64> undef, undef + %v8i64 = icmp sle <8 x i64> undef, undef + + %nxv2i64 = icmp sle undef, undef + %nxv4i64 = icmp sle undef, undef + %nxv8i64 = icmp sle undef, undef + + ret void +} + +define void @fcmp_oeq() { +; CHECK-LABEL: 'fcmp_oeq' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fcmp oeq <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16 = fcmp oeq <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16 = fcmp oeq <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16 = fcmp oeq <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32 = fcmp oeq <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32 = fcmp oeq <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32 = fcmp oeq <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16f32 = fcmp oeq <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = fcmp oeq <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64 = fcmp oeq <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8f64 = fcmp oeq <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp oeq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp oeq <2 x half> undef, undef + %v4f16 = fcmp oeq <4 x half> undef, undef + %v8f16 = fcmp oeq <8 x half> undef, undef + %v16f16 = fcmp oeq <16 x half> undef, undef + + %nxv2f16 = fcmp oeq undef, undef + %nxv4f16 = fcmp oeq undef, undef + %nxv8f16 = fcmp oeq undef, undef + %nxv16f16 = fcmp oeq undef, undef + + %v2f32 = fcmp oeq <2 x float> undef, undef + %v4f32 = fcmp oeq <4 x float> undef, undef + %v8f32 = fcmp oeq <8 x float> undef, undef + %v16f32 = fcmp oeq <16 x float> undef, undef + + %nxv2f32 = fcmp oeq undef, undef + %nxv4f32 = fcmp oeq undef, undef + %nxv8f32 = fcmp oeq undef, undef + %nxv16f32 = fcmp oeq undef, undef + + %v2f64 = fcmp oeq <2 x double> undef, undef + %v4f64 = fcmp oeq <4 x double> undef, undef + %v8f64 = fcmp oeq <8 x double> undef, undef + + %nxv2f64 = fcmp oeq undef, undef + %nxv4f64 = fcmp oeq undef, undef + %nxv8f64 = fcmp oeq undef, undef + + ret void +} + +define void @fcmp_one() { +; CHECK-LABEL: 'fcmp_one' +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16 = fcmp one <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f16 = fcmp one <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f16 = fcmp one <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f16 = fcmp one <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f32 = fcmp one <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f32 = fcmp one <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f32 = fcmp one <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f32 = fcmp one <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = fcmp one <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f64 = fcmp one <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f64 = fcmp one <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp one undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp one <2 x half> undef, undef + %v4f16 = fcmp one <4 x half> undef, undef + %v8f16 = fcmp one <8 x half> undef, undef + %v16f16 = fcmp one <16 x half> undef, undef + + %nxv2f16 = fcmp one undef, undef + %nxv4f16 = fcmp one undef, undef + %nxv8f16 = fcmp one undef, undef + %nxv16f16 = fcmp one undef, undef + + %v2f32 = fcmp one <2 x float> undef, undef + %v4f32 = fcmp one <4 x float> undef, undef + %v8f32 = fcmp one <8 x float> undef, undef + %v16f32 = fcmp one <16 x float> undef, undef + + %nxv2f32 = fcmp one undef, undef + %nxv4f32 = fcmp one undef, undef + %nxv8f32 = fcmp one undef, undef + %nxv16f32 = fcmp one undef, undef + + %v2f64 = fcmp one <2 x double> undef, undef + %v4f64 = fcmp one <4 x double> undef, undef + %v8f64 = fcmp one <8 x double> undef, undef + + %nxv2f64 = fcmp one undef, undef + %nxv4f64 = fcmp one undef, undef + %nxv8f64 = fcmp one undef, undef + + ret void +} + +define void @fcmp_olt() { +; CHECK-LABEL: 'fcmp_olt' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fcmp olt <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16 = fcmp olt <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16 = fcmp olt <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16 = fcmp olt <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32 = fcmp olt <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32 = fcmp olt <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32 = fcmp olt <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16f32 = fcmp olt <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = fcmp olt <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64 = fcmp olt <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8f64 = fcmp olt <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp olt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp olt <2 x half> undef, undef + %v4f16 = fcmp olt <4 x half> undef, undef + %v8f16 = fcmp olt <8 x half> undef, undef + %v16f16 = fcmp olt <16 x half> undef, undef + + %nxv2f16 = fcmp olt undef, undef + %nxv4f16 = fcmp olt undef, undef + %nxv8f16 = fcmp olt undef, undef + %nxv16f16 = fcmp olt undef, undef + + %v2f32 = fcmp olt <2 x float> undef, undef + %v4f32 = fcmp olt <4 x float> undef, undef + %v8f32 = fcmp olt <8 x float> undef, undef + %v16f32 = fcmp olt <16 x float> undef, undef + + %nxv2f32 = fcmp olt undef, undef + %nxv4f32 = fcmp olt undef, undef + %nxv8f32 = fcmp olt undef, undef + %nxv16f32 = fcmp olt undef, undef + + %v2f64 = fcmp olt <2 x double> undef, undef + %v4f64 = fcmp olt <4 x double> undef, undef + %v8f64 = fcmp olt <8 x double> undef, undef + + %nxv2f64 = fcmp olt undef, undef + %nxv4f64 = fcmp olt undef, undef + %nxv8f64 = fcmp olt undef, undef + + ret void +} + +define void @fcmp_ole() { +; CHECK-LABEL: 'fcmp_ole' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fcmp ole <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16 = fcmp ole <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16 = fcmp ole <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16 = fcmp ole <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32 = fcmp ole <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32 = fcmp ole <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32 = fcmp ole <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16f32 = fcmp ole <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = fcmp ole <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64 = fcmp ole <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8f64 = fcmp ole <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ole undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp ole <2 x half> undef, undef + %v4f16 = fcmp ole <4 x half> undef, undef + %v8f16 = fcmp ole <8 x half> undef, undef + %v16f16 = fcmp ole <16 x half> undef, undef + + %nxv2f16 = fcmp ole undef, undef + %nxv4f16 = fcmp ole undef, undef + %nxv8f16 = fcmp ole undef, undef + %nxv16f16 = fcmp ole undef, undef + + %v2f32 = fcmp ole <2 x float> undef, undef + %v4f32 = fcmp ole <4 x float> undef, undef + %v8f32 = fcmp ole <8 x float> undef, undef + %v16f32 = fcmp ole <16 x float> undef, undef + + %nxv2f32 = fcmp ole undef, undef + %nxv4f32 = fcmp ole undef, undef + %nxv8f32 = fcmp ole undef, undef + %nxv16f32 = fcmp ole undef, undef + + %v2f64 = fcmp ole <2 x double> undef, undef + %v4f64 = fcmp ole <4 x double> undef, undef + %v8f64 = fcmp ole <8 x double> undef, undef + + %nxv2f64 = fcmp ole undef, undef + %nxv4f64 = fcmp ole undef, undef + %nxv8f64 = fcmp ole undef, undef + + ret void +} + +define void @fcmp_ogt() { +; CHECK-LABEL: 'fcmp_ogt' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fcmp ogt <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16 = fcmp ogt <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16 = fcmp ogt <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16 = fcmp ogt <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32 = fcmp ogt <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32 = fcmp ogt <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32 = fcmp ogt <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16f32 = fcmp ogt <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = fcmp ogt <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64 = fcmp ogt <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8f64 = fcmp ogt <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ogt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp ogt <2 x half> undef, undef + %v4f16 = fcmp ogt <4 x half> undef, undef + %v8f16 = fcmp ogt <8 x half> undef, undef + %v16f16 = fcmp ogt <16 x half> undef, undef + + %nxv2f16 = fcmp ogt undef, undef + %nxv4f16 = fcmp ogt undef, undef + %nxv8f16 = fcmp ogt undef, undef + %nxv16f16 = fcmp ogt undef, undef + + %v2f32 = fcmp ogt <2 x float> undef, undef + %v4f32 = fcmp ogt <4 x float> undef, undef + %v8f32 = fcmp ogt <8 x float> undef, undef + %v16f32 = fcmp ogt <16 x float> undef, undef + + %nxv2f32 = fcmp ogt undef, undef + %nxv4f32 = fcmp ogt undef, undef + %nxv8f32 = fcmp ogt undef, undef + %nxv16f32 = fcmp ogt undef, undef + + %v2f64 = fcmp ogt <2 x double> undef, undef + %v4f64 = fcmp ogt <4 x double> undef, undef + %v8f64 = fcmp ogt <8 x double> undef, undef + + %nxv2f64 = fcmp ogt undef, undef + %nxv4f64 = fcmp ogt undef, undef + %nxv8f64 = fcmp ogt undef, undef + + ret void +} + +define void @fcmp_oge() { +; CHECK-LABEL: 'fcmp_oge' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fcmp oge <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16 = fcmp oge <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16 = fcmp oge <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16 = fcmp oge <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32 = fcmp oge <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32 = fcmp oge <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32 = fcmp oge <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16f32 = fcmp oge <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = fcmp oge <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64 = fcmp oge <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8f64 = fcmp oge <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp oge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp oge <2 x half> undef, undef + %v4f16 = fcmp oge <4 x half> undef, undef + %v8f16 = fcmp oge <8 x half> undef, undef + %v16f16 = fcmp oge <16 x half> undef, undef + + %nxv2f16 = fcmp oge undef, undef + %nxv4f16 = fcmp oge undef, undef + %nxv8f16 = fcmp oge undef, undef + %nxv16f16 = fcmp oge undef, undef + + %v2f32 = fcmp oge <2 x float> undef, undef + %v4f32 = fcmp oge <4 x float> undef, undef + %v8f32 = fcmp oge <8 x float> undef, undef + %v16f32 = fcmp oge <16 x float> undef, undef + + %nxv2f32 = fcmp oge undef, undef + %nxv4f32 = fcmp oge undef, undef + %nxv8f32 = fcmp oge undef, undef + %nxv16f32 = fcmp oge undef, undef + + %v2f64 = fcmp oge <2 x double> undef, undef + %v4f64 = fcmp oge <4 x double> undef, undef + %v8f64 = fcmp oge <8 x double> undef, undef + + %nxv2f64 = fcmp oge undef, undef + %nxv4f64 = fcmp oge undef, undef + %nxv8f64 = fcmp oge undef, undef + + ret void +} + +define void @fcmp_ueq() { +; CHECK-LABEL: 'fcmp_ueq' +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16 = fcmp ueq <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f16 = fcmp ueq <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f16 = fcmp ueq <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f16 = fcmp ueq <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f32 = fcmp ueq <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f32 = fcmp ueq <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f32 = fcmp ueq <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f32 = fcmp ueq <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = fcmp ueq <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f64 = fcmp ueq <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f64 = fcmp ueq <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ueq undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp ueq <2 x half> undef, undef + %v4f16 = fcmp ueq <4 x half> undef, undef + %v8f16 = fcmp ueq <8 x half> undef, undef + %v16f16 = fcmp ueq <16 x half> undef, undef + + %nxv2f16 = fcmp ueq undef, undef + %nxv4f16 = fcmp ueq undef, undef + %nxv8f16 = fcmp ueq undef, undef + %nxv16f16 = fcmp ueq undef, undef + + %v2f32 = fcmp ueq <2 x float> undef, undef + %v4f32 = fcmp ueq <4 x float> undef, undef + %v8f32 = fcmp ueq <8 x float> undef, undef + %v16f32 = fcmp ueq <16 x float> undef, undef + + %nxv2f32 = fcmp ueq undef, undef + %nxv4f32 = fcmp ueq undef, undef + %nxv8f32 = fcmp ueq undef, undef + %nxv16f32 = fcmp ueq undef, undef + + %v2f64 = fcmp ueq <2 x double> undef, undef + %v4f64 = fcmp ueq <4 x double> undef, undef + %v8f64 = fcmp ueq <8 x double> undef, undef + + %nxv2f64 = fcmp ueq undef, undef + %nxv4f64 = fcmp ueq undef, undef + %nxv8f64 = fcmp ueq undef, undef + + ret void +} + +define void @fcmp_une() { +; CHECK-LABEL: 'fcmp_une' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fcmp une <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16 = fcmp une <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16 = fcmp une <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16 = fcmp une <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32 = fcmp une <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32 = fcmp une <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32 = fcmp une <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16f32 = fcmp une <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = fcmp une <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64 = fcmp une <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8f64 = fcmp une <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp une undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp une <2 x half> undef, undef + %v4f16 = fcmp une <4 x half> undef, undef + %v8f16 = fcmp une <8 x half> undef, undef + %v16f16 = fcmp une <16 x half> undef, undef + + %nxv2f16 = fcmp une undef, undef + %nxv4f16 = fcmp une undef, undef + %nxv8f16 = fcmp une undef, undef + %nxv16f16 = fcmp une undef, undef + + %v2f32 = fcmp une <2 x float> undef, undef + %v4f32 = fcmp une <4 x float> undef, undef + %v8f32 = fcmp une <8 x float> undef, undef + %v16f32 = fcmp une <16 x float> undef, undef + + %nxv2f32 = fcmp une undef, undef + %nxv4f32 = fcmp une undef, undef + %nxv8f32 = fcmp une undef, undef + %nxv16f32 = fcmp une undef, undef + + %v2f64 = fcmp une <2 x double> undef, undef + %v4f64 = fcmp une <4 x double> undef, undef + %v8f64 = fcmp une <8 x double> undef, undef + + %nxv2f64 = fcmp une undef, undef + %nxv4f64 = fcmp une undef, undef + %nxv8f64 = fcmp une undef, undef + + ret void +} + +define void @fcmp_ult() { +; CHECK-LABEL: 'fcmp_ult' +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16 = fcmp ult <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f16 = fcmp ult <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f16 = fcmp ult <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f16 = fcmp ult <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f32 = fcmp ult <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f32 = fcmp ult <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f32 = fcmp ult <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f32 = fcmp ult <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = fcmp ult <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f64 = fcmp ult <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f64 = fcmp ult <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ult undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp ult <2 x half> undef, undef + %v4f16 = fcmp ult <4 x half> undef, undef + %v8f16 = fcmp ult <8 x half> undef, undef + %v16f16 = fcmp ult <16 x half> undef, undef + + %nxv2f16 = fcmp ult undef, undef + %nxv4f16 = fcmp ult undef, undef + %nxv8f16 = fcmp ult undef, undef + %nxv16f16 = fcmp ult undef, undef + + %v2f32 = fcmp ult <2 x float> undef, undef + %v4f32 = fcmp ult <4 x float> undef, undef + %v8f32 = fcmp ult <8 x float> undef, undef + %v16f32 = fcmp ult <16 x float> undef, undef + + %nxv2f32 = fcmp ult undef, undef + %nxv4f32 = fcmp ult undef, undef + %nxv8f32 = fcmp ult undef, undef + %nxv16f32 = fcmp ult undef, undef + + %v2f64 = fcmp ult <2 x double> undef, undef + %v4f64 = fcmp ult <4 x double> undef, undef + %v8f64 = fcmp ult <8 x double> undef, undef + + %nxv2f64 = fcmp ult undef, undef + %nxv4f64 = fcmp ult undef, undef + %nxv8f64 = fcmp ult undef, undef + + ret void +} + +define void @fcmp_ule() { +; CHECK-LABEL: 'fcmp_ule' +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16 = fcmp ule <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f16 = fcmp ule <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f16 = fcmp ule <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f16 = fcmp ule <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f32 = fcmp ule <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f32 = fcmp ule <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f32 = fcmp ule <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f32 = fcmp ule <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = fcmp ule <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f64 = fcmp ule <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f64 = fcmp ule <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ule undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp ule <2 x half> undef, undef + %v4f16 = fcmp ule <4 x half> undef, undef + %v8f16 = fcmp ule <8 x half> undef, undef + %v16f16 = fcmp ule <16 x half> undef, undef + + %nxv2f16 = fcmp ule undef, undef + %nxv4f16 = fcmp ule undef, undef + %nxv8f16 = fcmp ule undef, undef + %nxv16f16 = fcmp ule undef, undef + + %v2f32 = fcmp ule <2 x float> undef, undef + %v4f32 = fcmp ule <4 x float> undef, undef + %v8f32 = fcmp ule <8 x float> undef, undef + %v16f32 = fcmp ule <16 x float> undef, undef + + %nxv2f32 = fcmp ule undef, undef + %nxv4f32 = fcmp ule undef, undef + %nxv8f32 = fcmp ule undef, undef + %nxv16f32 = fcmp ule undef, undef + + %v2f64 = fcmp ule <2 x double> undef, undef + %v4f64 = fcmp ule <4 x double> undef, undef + %v8f64 = fcmp ule <8 x double> undef, undef + + %nxv2f64 = fcmp ule undef, undef + %nxv4f64 = fcmp ule undef, undef + %nxv8f64 = fcmp ule undef, undef + + ret void +} + +define void @fcmp_ugt() { +; CHECK-LABEL: 'fcmp_ugt' +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16 = fcmp ugt <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f16 = fcmp ugt <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f16 = fcmp ugt <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f16 = fcmp ugt <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f32 = fcmp ugt <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f32 = fcmp ugt <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f32 = fcmp ugt <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f32 = fcmp ugt <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = fcmp ugt <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f64 = fcmp ugt <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f64 = fcmp ugt <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ugt undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp ugt <2 x half> undef, undef + %v4f16 = fcmp ugt <4 x half> undef, undef + %v8f16 = fcmp ugt <8 x half> undef, undef + %v16f16 = fcmp ugt <16 x half> undef, undef + + %nxv2f16 = fcmp ugt undef, undef + %nxv4f16 = fcmp ugt undef, undef + %nxv8f16 = fcmp ugt undef, undef + %nxv16f16 = fcmp ugt undef, undef + + %v2f32 = fcmp ugt <2 x float> undef, undef + %v4f32 = fcmp ugt <4 x float> undef, undef + %v8f32 = fcmp ugt <8 x float> undef, undef + %v16f32 = fcmp ugt <16 x float> undef, undef + + %nxv2f32 = fcmp ugt undef, undef + %nxv4f32 = fcmp ugt undef, undef + %nxv8f32 = fcmp ugt undef, undef + %nxv16f32 = fcmp ugt undef, undef + + %v2f64 = fcmp ugt <2 x double> undef, undef + %v4f64 = fcmp ugt <4 x double> undef, undef + %v8f64 = fcmp ugt <8 x double> undef, undef + + %nxv2f64 = fcmp ugt undef, undef + %nxv4f64 = fcmp ugt undef, undef + %nxv8f64 = fcmp ugt undef, undef + + ret void +} + +define void @fcmp_uge() { +; CHECK-LABEL: 'fcmp_uge' +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16 = fcmp uge <2 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f16 = fcmp uge <4 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f16 = fcmp uge <8 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f16 = fcmp uge <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f32 = fcmp uge <2 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f32 = fcmp uge <4 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f32 = fcmp uge <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f32 = fcmp uge <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = fcmp uge <2 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f64 = fcmp uge <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f64 = fcmp uge <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp uge undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %v2f16 = fcmp uge <2 x half> undef, undef + %v4f16 = fcmp uge <4 x half> undef, undef + %v8f16 = fcmp uge <8 x half> undef, undef + %v16f16 = fcmp uge <16 x half> undef, undef + + %nxv2f16 = fcmp uge undef, undef + %nxv4f16 = fcmp uge undef, undef + %nxv8f16 = fcmp uge undef, undef + %nxv16f16 = fcmp uge undef, undef + + %v2f32 = fcmp uge <2 x float> undef, undef + %v4f32 = fcmp uge <4 x float> undef, undef + %v8f32 = fcmp uge <8 x float> undef, undef + %v16f32 = fcmp uge <16 x float> undef, undef + + %nxv2f32 = fcmp uge undef, undef + %nxv4f32 = fcmp uge undef, undef + %nxv8f32 = fcmp uge undef, undef + %nxv16f32 = fcmp uge undef, undef + + %v2f64 = fcmp uge <2 x double> undef, undef + %v4f64 = fcmp uge <4 x double> undef, undef + %v8f64 = fcmp uge <8 x double> undef, undef + + %nxv2f64 = fcmp uge undef, undef + %nxv4f64 = fcmp uge undef, undef + %nxv8f64 = fcmp uge undef, undef + + ret void +} diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll --- a/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll @@ -6,18 +6,18 @@ define void @select() { ; CHECK-LABEL: 'select' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = select i1 undef, i1 undef, i1 undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = select <1 x i1> undef, <1 x i1> undef, <1 x i1> undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %3 = select <2 x i1> undef, <2 x i1> undef, <2 x i1> undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = select <4 x i1> undef, <4 x i1> undef, <4 x i1> undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = select <8 x i1> undef, <8 x i1> undef, <8 x i1> undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = select <16 x i1> undef, <16 x i1> undef, <16 x i1> undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %7 = select <32 x i1> undef, <32 x i1> undef, <32 x i1> undef -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = select undef, undef, undef -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = select undef, undef, undef -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = select undef, undef, undef -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %11 = select undef, undef, undef -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %12 = select undef, undef, undef -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %13 = select undef, undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = select <1 x i1> undef, <1 x i1> undef, <1 x i1> undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = select <2 x i1> undef, <2 x i1> undef, <2 x i1> undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = select <4 x i1> undef, <4 x i1> undef, <4 x i1> undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %5 = select <8 x i1> undef, <8 x i1> undef, <8 x i1> undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %6 = select <16 x i1> undef, <16 x i1> undef, <16 x i1> undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %7 = select <32 x i1> undef, <32 x i1> undef, <32 x i1> undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %8 = select undef, undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %9 = select undef, undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %10 = select undef, undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = select undef, undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %12 = select undef, undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %13 = select undef, undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = select i1 undef, i8 undef, i8 undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = select <1 x i1> undef, <1 x i8> undef, <1 x i8> undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef