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 @@ -300,6 +300,20 @@ case ISD::FP_TO_UINT: case ISD::SINT_TO_FP: case ISD::UINT_TO_FP: + if (Src->getScalarSizeInBits() == 1 || Dst->getScalarSizeInBits() == 1) { + // The cost of convert from or to mask vector is different from other + // cases. We could not use PowDiff to calculate it. + // For mask vector to fp, we should use the following instructions: + // vmv.v.i v8, 0 + // vmerge.vim v8, v8, -1, v0 + // vfcvt.f.x.v v8, v8 + + // And for fp vector to mask, we use: + // vfncvt.rtz.x.f.w v9, v8 + // vand.vi v8, v9, 1 + // vmsne.vi v0, v8, 0 + return 3; + } if (std::abs(PowDiff) <= 1) return 1; // Backend could lower (v[sz]ext i8 to double) to vfcvt(v[sz]ext.f8 i8), diff --git a/llvm/test/Analysis/CostModel/RISCV/cast.ll b/llvm/test/Analysis/CostModel/RISCV/cast.ll --- a/llvm/test/Analysis/CostModel/RISCV/cast.ll +++ b/llvm/test/Analysis/CostModel/RISCV/cast.ll @@ -4,54 +4,55 @@ define void @ext() { ; RISCV32-LABEL: 'ext' -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = sext <4 x i8> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i16 = zext <4 x i8> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = sext <4 x i8> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i32 = zext <4 x i8> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i64 = sext <4 x i8> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i64 = zext <4 x i8> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = sext <4 x i16> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i32 = zext <4 x i16> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i64 = sext <4 x i16> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i64 = zext <4 x i16> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = sext <4 x i32> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i32i64 = zext <4 x i32> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = sext <8 x i8> undef to <8 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i16 = zext <8 x i8> undef to <8 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i32 = sext <8 x i8> undef to <8 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i32 = zext <8 x i8> undef to <8 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i64 = sext <8 x i8> undef to <8 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i64 = zext <8 x i8> undef to <8 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i32 = sext <8 x i16> undef to <8 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i32 = zext <8 x i16> undef to <8 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i64 = sext <8 x i16> undef to <8 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i64 = zext <8 x i16> undef to <8 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = sext <4 x i8> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i16 = zext <4 x i8> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = sext <4 x i8> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i32 = zext <4 x i8> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i64 = sext <4 x i8> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i64 = zext <4 x i8> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = sext <4 x i16> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i32 = zext <4 x i16> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i64 = sext <4 x i16> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i64 = zext <4 x i16> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = sext <4 x i32> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i32i64 = zext <4 x i32> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = sext <8 x i8> undef to <8 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i16 = zext <8 x i8> undef to <8 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i32 = sext <8 x i8> undef to <8 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i32 = zext <8 x i8> undef to <8 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i64 = sext <8 x i8> undef to <8 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i64 = zext <8 x i8> undef to <8 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i32 = sext <8 x i16> undef to <8 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i32 = zext <8 x i16> undef to <8 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i64 = sext <8 x i16> undef to <8 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i64 = zext <8 x i16> undef to <8 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RISCV64-LABEL: 'ext' -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = sext <4 x i8> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i16 = zext <4 x i8> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = sext <4 x i8> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i32 = zext <4 x i8> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i64 = sext <4 x i8> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i64 = zext <4 x i8> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = sext <4 x i16> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i32 = zext <4 x i16> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i64 = sext <4 x i16> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i64 = zext <4 x i16> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = sext <4 x i32> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i32i64 = zext <4 x i32> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = sext <8 x i8> undef to <8 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i16 = zext <8 x i8> undef to <8 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i32 = sext <8 x i8> undef to <8 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i32 = zext <8 x i8> undef to <8 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i64 = sext <8 x i8> undef to <8 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i64 = zext <8 x i8> undef to <8 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i32 = sext <8 x i16> undef to <8 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i32 = zext <8 x i16> undef to <8 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i64 = sext <8 x i16> undef to <8 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i64 = zext <8 x i16> undef to <8 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = sext <4 x i8> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i16 = zext <4 x i8> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = sext <4 x i8> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i32 = zext <4 x i8> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i64 = sext <4 x i8> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i64 = zext <4 x i8> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = sext <4 x i16> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i32 = zext <4 x i16> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i64 = sext <4 x i16> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i64 = zext <4 x i16> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = sext <4 x i32> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i32i64 = zext <4 x i32> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = sext <8 x i8> undef to <8 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i16 = zext <8 x i8> undef to <8 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i32 = sext <8 x i8> undef to <8 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i32 = zext <8 x i8> undef to <8 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i64 = sext <8 x i8> undef to <8 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i64 = zext <8 x i8> undef to <8 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i32 = sext <8 x i16> undef to <8 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i32 = zext <8 x i16> undef to <8 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i64 = sext <8 x i16> undef to <8 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i16i64 = zext <8 x i16> undef to <8 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; %s4i8i16 = sext <4 x i8> undef to <4 x i16> %z4i8i16 = zext <4 x i8> undef to <4 x i16> %s4i8i32 = sext <4 x i8> undef to <4 x i32> @@ -80,22 +81,23 @@ define void @trunc() { ; RISCV32-LABEL: 'trunc' -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = trunc <4 x i16> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i8i32 = trunc <4 x i32> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = trunc <4 x i64> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = trunc <4 x i32> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i16i64 = trunc <4 x i64> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = trunc <4 x i64> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = trunc <4 x i16> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i8i32 = trunc <4 x i32> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = trunc <4 x i64> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = trunc <4 x i32> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i16i64 = trunc <4 x i64> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = trunc <4 x i64> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RISCV64-LABEL: 'trunc' -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = trunc <4 x i16> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i8i32 = trunc <4 x i32> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = trunc <4 x i64> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = trunc <4 x i32> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i16i64 = trunc <4 x i64> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = trunc <4 x i64> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = trunc <4 x i16> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i8i32 = trunc <4 x i32> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = trunc <4 x i64> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = trunc <4 x i32> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i16i64 = trunc <4 x i64> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i32i64 = trunc <4 x i64> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; %s4i8i16 = trunc <4 x i16> undef to <4 x i8> %s4i8i32 = trunc <4 x i32> undef to <4 x i8> %s4i8i64 = trunc <4 x i64> undef to <4 x i8> @@ -107,16 +109,17 @@ define void @fpext() { ; RISCV32-LABEL: 'fpext' -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fpext <8 x half> undef to <8 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fpext <8 x half> undef to <8 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fpext <8 x float> undef to <8 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fpext <8 x half> undef to <8 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fpext <8 x half> undef to <8 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fpext <8 x float> undef to <8 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RISCV64-LABEL: 'fpext' -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fpext <8 x half> undef to <8 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fpext <8 x half> undef to <8 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fpext <8 x float> undef to <8 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fpext <8 x half> undef to <8 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fpext <8 x half> undef to <8 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fpext <8 x float> undef to <8 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; %v0 = fpext <8 x half> undef to <8 x float> %v1 = fpext <8 x half> undef to <8 x double> %v2 = fpext <8 x float> undef to <8 x double> @@ -125,16 +128,17 @@ define void @ftrunc() { ; RISCV32-LABEL: 'ftrunc' -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fptrunc <8 x float> undef to <8 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fptrunc <8 x double> undef to <8 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fptrunc <8 x double> undef to <8 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fptrunc <8 x float> undef to <8 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fptrunc <8 x double> undef to <8 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fptrunc <8 x double> undef to <8 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RISCV64-LABEL: 'ftrunc' -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fptrunc <8 x float> undef to <8 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fptrunc <8 x double> undef to <8 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fptrunc <8 x double> undef to <8 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = fptrunc <8 x float> undef to <8 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = fptrunc <8 x double> undef to <8 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = fptrunc <8 x double> undef to <8 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; %v0 = fptrunc <8 x float> undef to <8 x half> %v1 = fptrunc <8 x double> undef to <8 x half> %v2 = fptrunc <8 x double> undef to <8 x float> @@ -143,58 +147,63 @@ define void @fp_to_int() { ; RISCV32-LABEL: 'fp_to_int' -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = fptosi <4 x half> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = fptosi <4 x float> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s2 = fptosi <4 x double> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = fptosi <4 x half> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = fptosi <4 x float> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = fptosi <4 x double> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = fptosi <4 x half> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = fptosi <4 x float> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = fptosi <4 x double> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = fptosi <4 x half> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = fptosi <4 x float> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = fptosi <4 x double> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = fptoui <4 x half> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = fptoui <4 x float> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u2 = fptoui <4 x double> undef to <4 x i8> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = fptoui <4 x half> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = fptoui <4 x float> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = fptoui <4 x double> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = fptoui <4 x half> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = fptoui <4 x float> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = fptoui <4 x double> undef to <4 x i32> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = fptoui <4 x half> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = fptoui <4 x float> undef to <4 x i64> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = fptoui <4 x double> undef to <4 x i16> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = fptosi <4 x half> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = fptosi <4 x float> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s2 = fptosi <4 x double> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = fptosi <4 x half> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = fptosi <4 x float> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = fptosi <4 x double> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = fptosi <4 x half> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = fptosi <4 x float> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = fptosi <4 x double> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = fptosi <4 x half> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = fptosi <4 x float> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = fptosi <4 x double> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s12 = fptosi <4 x double> undef to <4 x i1> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = fptoui <4 x half> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = fptoui <4 x float> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u2 = fptoui <4 x double> undef to <4 x i8> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = fptoui <4 x half> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = fptoui <4 x float> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = fptoui <4 x double> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = fptoui <4 x half> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = fptoui <4 x float> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = fptoui <4 x double> undef to <4 x i32> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = fptoui <4 x half> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = fptoui <4 x float> undef to <4 x i64> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = fptoui <4 x double> undef to <4 x i16> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u12 = fptoui <4 x double> undef to <4 x i1> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RISCV64-LABEL: 'fp_to_int' -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = fptosi <4 x half> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = fptosi <4 x float> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s2 = fptosi <4 x double> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = fptosi <4 x half> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = fptosi <4 x float> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = fptosi <4 x double> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = fptosi <4 x half> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = fptosi <4 x float> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = fptosi <4 x double> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = fptosi <4 x half> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = fptosi <4 x float> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = fptosi <4 x double> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = fptoui <4 x half> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = fptoui <4 x float> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u2 = fptoui <4 x double> undef to <4 x i8> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = fptoui <4 x half> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = fptoui <4 x float> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = fptoui <4 x double> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = fptoui <4 x half> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = fptoui <4 x float> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = fptoui <4 x double> undef to <4 x i32> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = fptoui <4 x half> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = fptoui <4 x float> undef to <4 x i64> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = fptoui <4 x double> undef to <4 x i16> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = fptosi <4 x half> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = fptosi <4 x float> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s2 = fptosi <4 x double> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = fptosi <4 x half> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = fptosi <4 x float> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = fptosi <4 x double> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = fptosi <4 x half> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = fptosi <4 x float> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = fptosi <4 x double> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = fptosi <4 x half> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = fptosi <4 x float> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = fptosi <4 x double> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s12 = fptosi <4 x double> undef to <4 x i1> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = fptoui <4 x half> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = fptoui <4 x float> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u2 = fptoui <4 x double> undef to <4 x i8> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = fptoui <4 x half> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = fptoui <4 x float> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = fptoui <4 x double> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = fptoui <4 x half> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = fptoui <4 x float> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = fptoui <4 x double> undef to <4 x i32> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = fptoui <4 x half> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = fptoui <4 x float> undef to <4 x i64> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = fptoui <4 x double> undef to <4 x i16> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u12 = fptoui <4 x double> undef to <4 x i1> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; %s0 = fptosi <4 x half> undef to <4 x i8> %s1 = fptosi <4 x float> undef to <4 x i8> %s2 = fptosi <4 x double> undef to <4 x i8> @@ -207,6 +216,7 @@ %s9 = fptosi <4 x half> undef to <4 x i64> %s10 = fptosi <4 x float> undef to <4 x i64> %s11 = fptosi <4 x double> undef to <4 x i16> + %s12 = fptosi <4 x double> undef to <4 x i1> %u0 = fptoui <4 x half> undef to <4 x i8> %u1 = fptoui <4 x float> undef to <4 x i8> @@ -220,63 +230,70 @@ %u9 = fptoui <4 x half> undef to <4 x i64> %u10 = fptoui <4 x float> undef to <4 x i64> %u11 = fptoui <4 x double> undef to <4 x i16> + %u12 = fptoui <4 x double> undef to <4 x i1> + ret void } define void @int_to_fp() { ; RISCV32-LABEL: 'int_to_fp' -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = sitofp <4 x i8> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = sitofp <4 x i8> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s2 = sitofp <4 x i8> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = sitofp <4 x i16> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = sitofp <4 x i16> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = sitofp <4 x i16> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = sitofp <4 x i32> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = sitofp <4 x i32> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = sitofp <4 x i32> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = sitofp <4 x i64> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = sitofp <4 x i64> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = sitofp <4 x i16> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = uitofp <4 x i8> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = uitofp <4 x i8> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u2 = uitofp <4 x i8> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = uitofp <4 x i16> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = uitofp <4 x i16> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = uitofp <4 x i16> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = uitofp <4 x i32> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = uitofp <4 x i32> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = uitofp <4 x i32> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = uitofp <4 x i64> undef to <4 x half> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = uitofp <4 x i64> undef to <4 x float> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = uitofp <4 x i16> undef to <4 x double> -; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = sitofp <4 x i8> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = sitofp <4 x i8> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s2 = sitofp <4 x i8> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = sitofp <4 x i16> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = sitofp <4 x i16> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = sitofp <4 x i16> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = sitofp <4 x i32> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = sitofp <4 x i32> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = sitofp <4 x i32> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = sitofp <4 x i64> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = sitofp <4 x i64> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = sitofp <4 x i16> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s12 = sitofp <4 x i1> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = uitofp <4 x i8> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = uitofp <4 x i8> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u2 = uitofp <4 x i8> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = uitofp <4 x i16> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = uitofp <4 x i16> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = uitofp <4 x i16> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = uitofp <4 x i32> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = uitofp <4 x i32> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = uitofp <4 x i32> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = uitofp <4 x i64> undef to <4 x half> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = uitofp <4 x i64> undef to <4 x float> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = uitofp <4 x i16> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u12 = uitofp <4 x i1> undef to <4 x double> +; RISCV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RISCV64-LABEL: 'int_to_fp' -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = sitofp <4 x i8> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = sitofp <4 x i8> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s2 = sitofp <4 x i8> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = sitofp <4 x i16> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = sitofp <4 x i16> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = sitofp <4 x i16> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = sitofp <4 x i32> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = sitofp <4 x i32> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = sitofp <4 x i32> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = sitofp <4 x i64> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = sitofp <4 x i64> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = sitofp <4 x i16> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = uitofp <4 x i8> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = uitofp <4 x i8> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u2 = uitofp <4 x i8> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = uitofp <4 x i16> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = uitofp <4 x i16> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = uitofp <4 x i16> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = uitofp <4 x i32> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = uitofp <4 x i32> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = uitofp <4 x i32> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = uitofp <4 x i64> undef to <4 x half> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = uitofp <4 x i64> undef to <4 x float> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = uitofp <4 x i16> undef to <4 x double> -; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s0 = sitofp <4 x i8> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s1 = sitofp <4 x i8> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s2 = sitofp <4 x i8> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s3 = sitofp <4 x i16> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4 = sitofp <4 x i16> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s5 = sitofp <4 x i16> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s6 = sitofp <4 x i32> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s7 = sitofp <4 x i32> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8 = sitofp <4 x i32> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s9 = sitofp <4 x i64> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s10 = sitofp <4 x i64> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s11 = sitofp <4 x i16> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s12 = sitofp <4 x i1> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u0 = uitofp <4 x i8> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u1 = uitofp <4 x i8> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u2 = uitofp <4 x i8> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u3 = uitofp <4 x i16> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u4 = uitofp <4 x i16> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u5 = uitofp <4 x i16> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u6 = uitofp <4 x i32> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u7 = uitofp <4 x i32> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u8 = uitofp <4 x i32> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u9 = uitofp <4 x i64> undef to <4 x half> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %u10 = uitofp <4 x i64> undef to <4 x float> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %u11 = uitofp <4 x i16> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %u12 = uitofp <4 x i1> undef to <4 x double> +; RISCV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; %s0 = sitofp <4 x i8> undef to <4 x half> %s1 = sitofp <4 x i8> undef to <4 x float> %s2 = sitofp <4 x i8> undef to <4 x double> @@ -289,6 +306,7 @@ %s9 = sitofp <4 x i64> undef to <4 x half> %s10 = sitofp <4 x i64> undef to <4 x float> %s11 = sitofp <4 x i16> undef to <4 x double> + %s12 = sitofp <4 x i1> undef to <4 x double> %u0 = uitofp <4 x i8> undef to <4 x half> %u1 = uitofp <4 x i8> undef to <4 x float> @@ -302,5 +320,7 @@ %u9 = uitofp <4 x i64> undef to <4 x half> %u10 = uitofp <4 x i64> undef to <4 x float> %u11 = uitofp <4 x i16> undef to <4 x double> + %u12 = uitofp <4 x i1> undef to <4 x double> + ret void }