diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp index d5ea0c5d52293..8a50aeede5258 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -1533,6 +1533,9 @@ InstructionCost RISCVTTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst, std::pair SrcLT = getTypeLegalizationCost(Src); std::pair DstLT = getTypeLegalizationCost(Dst); + if (!SrcLT.first.isValid() || !DstLT.first.isValid()) + return InstructionCost::getInvalid(); + // Handle i1 source and dest cases *before* calling logic in BasicTTI. // The shared implementation doesn't model vector widening during legalization // and instead assumes scalarization. In order to scalarize an diff --git a/llvm/test/Analysis/CostModel/RISCV/cast-half.ll b/llvm/test/Analysis/CostModel/RISCV/cast-half.ll index 244c42cc94ba0..acd932636c966 100644 --- a/llvm/test/Analysis/CostModel/RISCV/cast-half.ll +++ b/llvm/test/Analysis/CostModel/RISCV/cast-half.ll @@ -74,7 +74,7 @@ define void @fptosi() { ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %nxv64f16_nxv64i8 = fptosi undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_nxv64i16 = fptosi undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %nxv64f16_nxv64i32 = fptosi undef to -; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %nxv64f16_nxv64i64 = fptosi undef to +; RV32ZVFH-NEXT: Cost Model: Invalid cost for instruction: %nxv64f16_nxv64i64 = fptosi undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %nxv64f16_nxv64i1 = fptosi undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -147,7 +147,7 @@ define void @fptosi() { ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %nxv64f16_nxv64i8 = fptosi undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_nxv64i16 = fptosi undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %nxv64f16_nxv64i32 = fptosi undef to -; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %nxv64f16_nxv64i64 = fptosi undef to +; RV32ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %nxv64f16_nxv64i64 = fptosi undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 83 for instruction: %nxv64f16_nxv64i1 = fptosi undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -440,7 +440,7 @@ define void @fptoui() { ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %nxv64f16_nxv64i8 = fptoui undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_nxv64i16 = fptoui undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %nxv64f16_nxv64i32 = fptoui undef to -; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %nxv64f16_nxv64i64 = fptoui undef to +; RV32ZVFH-NEXT: Cost Model: Invalid cost for instruction: %nxv64f16_nxv64i64 = fptoui undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %nxv64f16_nxv64i1 = fptoui undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -513,7 +513,7 @@ define void @fptoui() { ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %nxv64f16_nxv64i8 = fptoui undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_nxv64i16 = fptoui undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %nxv64f16_nxv64i32 = fptoui undef to -; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %nxv64f16_nxv64i64 = fptoui undef to +; RV32ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %nxv64f16_nxv64i64 = fptoui undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 83 for instruction: %nxv64f16_nxv64i1 = fptoui undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -806,7 +806,7 @@ define void @sitofp() { ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64i8_nxv64f16 = sitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_nxv64f16 = sitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %nxv64i32_nxv64f16 = sitofp undef to -; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %nxv64i64_nxv64f16 = sitofp undef to +; RV32ZVFH-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f16 = sitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64i1_nxv64f16 = sitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -879,7 +879,7 @@ define void @sitofp() { ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 83 for instruction: %nxv64i8_nxv64f16 = sitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_nxv64f16 = sitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %nxv64i32_nxv64f16 = sitofp undef to -; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %nxv64i64_nxv64f16 = sitofp undef to +; RV32ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f16 = sitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 99 for instruction: %nxv64i1_nxv64f16 = sitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -1172,7 +1172,7 @@ define void @uitofp() { ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64i8_nxv64f16 = uitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_nxv64f16 = uitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %nxv64i32_nxv64f16 = uitofp undef to -; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %nxv64i64_nxv64f16 = uitofp undef to +; RV32ZVFH-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f16 = uitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64i1_nxv64f16 = uitofp undef to ; RV32ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -1245,7 +1245,7 @@ define void @uitofp() { ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 83 for instruction: %nxv64i8_nxv64f16 = uitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_nxv64f16 = uitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %nxv64i32_nxv64f16 = uitofp undef to -; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %nxv64i64_nxv64f16 = uitofp undef to +; RV32ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f16 = uitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 99 for instruction: %nxv64i1_nxv64f16 = uitofp undef to ; RV32ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; diff --git a/llvm/test/Analysis/CostModel/RISCV/cast.ll b/llvm/test/Analysis/CostModel/RISCV/cast.ll index e498ccc733040..c570c6ec63e77 100644 --- a/llvm/test/Analysis/CostModel/RISCV/cast.ll +++ b/llvm/test/Analysis/CostModel/RISCV/cast.ll @@ -288,8 +288,8 @@ define void @sext() { ; RV32-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %nxv64i8_nxv64i32 = sext undef to ; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i8_nxv64i64 = sext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %nxv64i16_nxv64i32 = sext undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %nxv64i16_nxv64i64 = sext undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %nxv64i32_nxv64i64 = sext undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i16_nxv64i64 = sext undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i32_nxv64i64 = sext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %nxv64i1_nxv64i8 = sext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %nxv64i1_nxv64i16 = sext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %nxv64i1_nxv64i32 = sext undef to @@ -298,8 +298,8 @@ define void @sext() { ; RV32-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %vp_nxv64i8_nxv64i32 = call @llvm.vp.sext.nxv64i32.nxv64i8( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i8_nxv64i64 = call @llvm.vp.sext.nxv64i64.nxv64i8( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vp_nxv64i16_nxv64i32 = call @llvm.vp.sext.nxv64i32.nxv64i16( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %vp_nxv64i16_nxv64i64 = call @llvm.vp.sext.nxv64i64.nxv64i16( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vp_nxv64i32_nxv64i64 = call @llvm.vp.sext.nxv64i64.nxv64i32( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i16_nxv64i64 = call @llvm.vp.sext.nxv64i64.nxv64i16( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i32_nxv64i64 = call @llvm.vp.sext.nxv64i64.nxv64i32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vp_nxv64i1_nxv64i8 = call @llvm.vp.sext.nxv64i8.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %vp_nxv64i1_nxv64i16 = call @llvm.vp.sext.nxv64i16.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %vp_nxv64i1_nxv64i32 = call @llvm.vp.sext.nxv64i32.nxv64i1( undef, undef, i32 undef) @@ -1290,8 +1290,8 @@ define void @zext() { ; RV32-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %nxv64i8_nxv64i32 = zext undef to ; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i8_nxv64i64 = zext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %nxv64i16_nxv64i32 = zext undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %nxv64i16_nxv64i64 = zext undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %nxv64i32_nxv64i64 = zext undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i16_nxv64i64 = zext undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i32_nxv64i64 = zext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %nxv64i1_nxv64i8 = zext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %nxv64i1_nxv64i16 = zext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %nxv64i1_nxv64i32 = zext undef to @@ -1300,8 +1300,8 @@ define void @zext() { ; RV32-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %vp_nxv64i8_nxv64i32 = call @llvm.vp.zext.nxv64i32.nxv64i8( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i8_nxv64i64 = call @llvm.vp.zext.nxv64i64.nxv64i8( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vp_nxv64i16_nxv64i32 = call @llvm.vp.zext.nxv64i32.nxv64i16( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %vp_nxv64i16_nxv64i64 = call @llvm.vp.zext.nxv64i64.nxv64i16( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vp_nxv64i32_nxv64i64 = call @llvm.vp.zext.nxv64i64.nxv64i32( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i16_nxv64i64 = call @llvm.vp.zext.nxv64i64.nxv64i16( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i32_nxv64i64 = call @llvm.vp.zext.nxv64i64.nxv64i32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vp_nxv64i1_nxv64i8 = call @llvm.vp.zext.nxv64i8.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %vp_nxv64i1_nxv64i16 = call @llvm.vp.zext.nxv64i16.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %vp_nxv64i1_nxv64i32 = call @llvm.vp.zext.nxv64i32.nxv64i1( undef, undef, i32 undef) @@ -2302,8 +2302,8 @@ define void @trunc() { ; RV32-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %nxv64i32_nxv64i8 = trunc undef to ; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64i8 = trunc undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %nxv64i32_nxv64i16 = trunc undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %nxv64i64_nxv64i16 = trunc undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %nxv64i64_nxv64i32 = trunc undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64i16 = trunc undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64i32 = trunc undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %nxv64i8_nxv64i1 = trunc undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64i16_nxv64i1 = trunc undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %nxv64i32_nxv64i1 = trunc undef to @@ -2312,8 +2312,8 @@ define void @trunc() { ; RV32-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %vp_nxv64i32_nxv64i8 = call @llvm.vp.trunc.nxv64i8.nxv64i32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i64_nxv64i8 = call @llvm.vp.trunc.nxv64i8.nxv64i64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vp_nxv64i32_nxv64i16 = call @llvm.vp.trunc.nxv64i16.nxv64i32( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %vp_nxv64i64_nxv64i16 = call @llvm.vp.trunc.nxv64i16.nxv64i64( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %vp_nxv64i64_nxv64i32 = call @llvm.vp.trunc.nxv64i32.nxv64i64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i64_nxv64i16 = call @llvm.vp.trunc.nxv64i16.nxv64i64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64i64_nxv64i32 = call @llvm.vp.trunc.nxv64i32.nxv64i64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vp_nxv64i8_nxv64i1 = call @llvm.vp.trunc.nxv64i1.nxv64i8( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %vp_nxv64i16_nxv64i1 = call @llvm.vp.trunc.nxv64i1.nxv64i16( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %vp_nxv64i32_nxv64i1 = call @llvm.vp.trunc.nxv64i1.nxv64i32( undef, undef, i32 undef) @@ -3653,8 +3653,8 @@ define void @fptosi() { ; RV32-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %nxv64f64_nxv64i16 = fptosi undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv64f32_nxv64i32 = fptosi undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %nxv64f64_nxv64i32 = fptosi undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %nxv64f32_nxv64i64 = fptosi undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %nxv64f64_nxv64i64 = fptosi undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64f32_nxv64i64 = fptosi undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64f64_nxv64i64 = fptosi undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %nxv64f32_nxv64i1 = fptosi undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %nxv64f64_nxv64i1 = fptosi undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %vp_nxv64f32_nxv64i8 = call @llvm.vp.fptosi.nxv64i8.nxv64f32( undef, undef, i32 undef) @@ -3663,8 +3663,8 @@ define void @fptosi() { ; RV32-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %vp_nxv64f64_nxv64i16 = call @llvm.vp.fptosi.nxv64i16.nxv64f64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %vp_nxv64f32_nxv64i32 = call @llvm.vp.fptosi.nxv64i32.nxv64f32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %vp_nxv64f64_nxv64i32 = call @llvm.vp.fptosi.nxv64i32.nxv64f64( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vp_nxv64f32_nxv64i64 = call @llvm.vp.fptosi.nxv64i64.nxv64f32( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %vp_nxv64f64_nxv64i64 = call @llvm.vp.fptosi.nxv64i64.nxv64f64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64f32_nxv64i64 = call @llvm.vp.fptosi.nxv64i64.nxv64f32( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64f64_nxv64i64 = call @llvm.vp.fptosi.nxv64i64.nxv64f64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %vp_nxv64f32_nxv64i1 = call @llvm.vp.fptosi.nxv64i1.nxv64f32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %vp_nxv64f64_nxv64i1 = call @llvm.vp.fptosi.nxv64i1.nxv64f64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void @@ -4531,8 +4531,8 @@ define void @fptoui() { ; RV32-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %nxv64f64_nxv64i16 = fptoui undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv64f32_nxv64i32 = fptoui undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %nxv64f64_nxv64i32 = fptoui undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %nxv64f32_nxv64i64 = fptoui undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %nxv64f64_nxv64i64 = fptoui undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64f32_nxv64i64 = fptoui undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64f64_nxv64i64 = fptoui undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %nxv64f32_nxv64i1 = fptoui undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %nxv64f64_nxv64i1 = fptoui undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %vp_nxv64f32_nxv64i8 = call @llvm.vp.fptoui.nxv64i8.nxv64f32( undef, undef, i32 undef) @@ -4541,8 +4541,8 @@ define void @fptoui() { ; RV32-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %vp_nxv64f64_nxv64i16 = call @llvm.vp.fptoui.nxv64i16.nxv64f64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %vp_nxv64f32_nxv64i32 = call @llvm.vp.fptoui.nxv64i32.nxv64f32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %vp_nxv64f64_nxv64i32 = call @llvm.vp.fptoui.nxv64i32.nxv64f64( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vp_nxv64f32_nxv64i64 = call @llvm.vp.fptoui.nxv64i64.nxv64f32( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %vp_nxv64f64_nxv64i64 = call @llvm.vp.fptoui.nxv64i64.nxv64f64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64f32_nxv64i64 = call @llvm.vp.fptoui.nxv64i64.nxv64f32( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64f64_nxv64i64 = call @llvm.vp.fptoui.nxv64i64.nxv64f64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %vp_nxv64f32_nxv64i1 = call @llvm.vp.fptoui.nxv64i1.nxv64f32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %vp_nxv64f64_nxv64i1 = call @llvm.vp.fptoui.nxv64i1.nxv64f64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void @@ -5409,8 +5409,8 @@ define void @sitofp() { ; RV32-NEXT: Cost Model: Found an estimated cost of 102 for instruction: %nxv64i16_nxv64f64 = sitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv64i32_nxv64f32 = sitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %nxv64i32_nxv64f64 = sitofp undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %nxv64i64_nxv64f32 = sitofp undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %nxv64i64_nxv64f64 = sitofp undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f32 = sitofp undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f64 = sitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %nxv64i1_nxv64f32 = sitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %nxv64i1_nxv64f64 = sitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %vp_nxv64fi8_nxv64f32 = call @llvm.vp.sitofp.nxv64f32.nxv64i8( undef, undef, i32 undef) @@ -5419,8 +5419,8 @@ define void @sitofp() { ; RV32-NEXT: Cost Model: Found an estimated cost of 102 for instruction: %vp_nxv64fi16_nxv64f64 = call @llvm.vp.sitofp.nxv64f64.nxv64i16( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %vp_nxv64fi32_nxv64f32 = call @llvm.vp.sitofp.nxv64f32.nxv64i32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %vp_nxv64fi32_nxv64f64 = call @llvm.vp.sitofp.nxv64f64.nxv64i32( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %vp_nxv64fi64_nxv64f32 = call @llvm.vp.sitofp.nxv64f32.nxv64i64( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %vp_nxv64fi64_nxv64f64 = call @llvm.vp.sitofp.nxv64f64.nxv64i64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64fi64_nxv64f32 = call @llvm.vp.sitofp.nxv64f32.nxv64i64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64fi64_nxv64f64 = call @llvm.vp.sitofp.nxv64f64.nxv64i64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %vp_nxv64fi1_nxv64f32 = call @llvm.vp.sitofp.nxv64f32.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %vp_nxv64fi1_nxv64f64 = call @llvm.vp.sitofp.nxv64f64.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void @@ -6287,8 +6287,8 @@ define void @uitofp() { ; RV32-NEXT: Cost Model: Found an estimated cost of 102 for instruction: %nxv64i16_nxv64f64 = uitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv64i32_nxv64f32 = uitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %nxv64i32_nxv64f64 = uitofp undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %nxv64i64_nxv64f32 = uitofp undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %nxv64i64_nxv64f64 = uitofp undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f32 = uitofp undef to +; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64f64 = uitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %nxv64i1_nxv64f32 = uitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %nxv64i1_nxv64f64 = uitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %vp_nxv64fi8_nxv64f32 = call @llvm.vp.uitofp.nxv64f32.nxv64i8( undef, undef, i32 undef) @@ -6297,8 +6297,8 @@ define void @uitofp() { ; RV32-NEXT: Cost Model: Found an estimated cost of 102 for instruction: %vp_nxv64fi16_nxv64f64 = call @llvm.vp.uitofp.nxv64f64.nxv64i16( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %vp_nxv64fi32_nxv64f32 = call @llvm.vp.uitofp.nxv64f32.nxv64i32( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %vp_nxv64fi32_nxv64f64 = call @llvm.vp.uitofp.nxv64f64.nxv64i32( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %vp_nxv64fi64_nxv64f32 = call @llvm.vp.uitofp.nxv64f32.nxv64i64( undef, undef, i32 undef) -; RV32-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %vp_nxv64fi64_nxv64f64 = call @llvm.vp.uitofp.nxv64f64.nxv64i64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64fi64_nxv64f32 = call @llvm.vp.uitofp.nxv64f32.nxv64i64( undef, undef, i32 undef) +; RV32-NEXT: Cost Model: Invalid cost for instruction: %vp_nxv64fi64_nxv64f64 = call @llvm.vp.uitofp.nxv64f64.nxv64i64( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %vp_nxv64fi1_nxv64f32 = call @llvm.vp.uitofp.nxv64f32.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %vp_nxv64fi1_nxv64f64 = call @llvm.vp.uitofp.nxv64f64.nxv64i1( undef, undef, i32 undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void