diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp index 446a08124957f9..7a26959f111644 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -353,6 +353,153 @@ static const CostTblEntry VectorIntrinsicCostTable[]{ {Intrinsic::sqrt, MVT::nxv2f64, 1}, {Intrinsic::sqrt, MVT::nxv4f64, 1}, {Intrinsic::sqrt, MVT::nxv8f64, 1}, + {Intrinsic::bswap, MVT::v2i16, 3}, + {Intrinsic::bswap, MVT::v4i16, 3}, + {Intrinsic::bswap, MVT::v8i16, 3}, + {Intrinsic::bswap, MVT::v16i16, 3}, + {Intrinsic::bswap, MVT::nxv2i16, 3}, + {Intrinsic::bswap, MVT::nxv4i16, 3}, + {Intrinsic::bswap, MVT::nxv8i16, 3}, + {Intrinsic::bswap, MVT::nxv16i16, 3}, + {Intrinsic::bswap, MVT::v2i32, 12}, + {Intrinsic::bswap, MVT::v4i32, 12}, + {Intrinsic::bswap, MVT::v8i32, 12}, + {Intrinsic::bswap, MVT::v16i32, 12}, + {Intrinsic::bswap, MVT::nxv2i32, 12}, + {Intrinsic::bswap, MVT::nxv4i32, 12}, + {Intrinsic::bswap, MVT::nxv8i32, 12}, + {Intrinsic::bswap, MVT::nxv16i32, 12}, + {Intrinsic::bswap, MVT::v2i64, 31}, + {Intrinsic::bswap, MVT::v4i64, 31}, + {Intrinsic::bswap, MVT::v8i64, 31}, + {Intrinsic::bswap, MVT::v16i64, 31}, + {Intrinsic::bswap, MVT::nxv2i64, 31}, + {Intrinsic::bswap, MVT::nxv4i64, 31}, + {Intrinsic::bswap, MVT::nxv8i64, 31}, + {Intrinsic::bitreverse, MVT::v2i8, 17}, + {Intrinsic::bitreverse, MVT::v4i8, 17}, + {Intrinsic::bitreverse, MVT::v8i8, 17}, + {Intrinsic::bitreverse, MVT::v16i8, 17}, + {Intrinsic::bitreverse, MVT::nxv2i8, 17}, + {Intrinsic::bitreverse, MVT::nxv4i8, 17}, + {Intrinsic::bitreverse, MVT::nxv8i8, 17}, + {Intrinsic::bitreverse, MVT::nxv16i8, 17}, + {Intrinsic::bitreverse, MVT::v2i16, 24}, + {Intrinsic::bitreverse, MVT::v4i16, 24}, + {Intrinsic::bitreverse, MVT::v8i16, 24}, + {Intrinsic::bitreverse, MVT::v16i16, 24}, + {Intrinsic::bitreverse, MVT::nxv2i16, 24}, + {Intrinsic::bitreverse, MVT::nxv4i16, 24}, + {Intrinsic::bitreverse, MVT::nxv8i16, 24}, + {Intrinsic::bitreverse, MVT::nxv16i16, 24}, + {Intrinsic::bitreverse, MVT::v2i32, 33}, + {Intrinsic::bitreverse, MVT::v4i32, 33}, + {Intrinsic::bitreverse, MVT::v8i32, 33}, + {Intrinsic::bitreverse, MVT::v16i32, 33}, + {Intrinsic::bitreverse, MVT::nxv2i32, 33}, + {Intrinsic::bitreverse, MVT::nxv4i32, 33}, + {Intrinsic::bitreverse, MVT::nxv8i32, 33}, + {Intrinsic::bitreverse, MVT::nxv16i32, 33}, + {Intrinsic::bitreverse, MVT::v2i64, 52}, + {Intrinsic::bitreverse, MVT::v4i64, 52}, + {Intrinsic::bitreverse, MVT::v8i64, 52}, + {Intrinsic::bitreverse, MVT::v16i64, 52}, + {Intrinsic::bitreverse, MVT::nxv2i64, 52}, + {Intrinsic::bitreverse, MVT::nxv4i64, 52}, + {Intrinsic::bitreverse, MVT::nxv8i64, 52}, + {Intrinsic::ctpop, MVT::v2i8, 12}, + {Intrinsic::ctpop, MVT::v4i8, 12}, + {Intrinsic::ctpop, MVT::v8i8, 12}, + {Intrinsic::ctpop, MVT::v16i8, 12}, + {Intrinsic::ctpop, MVT::nxv2i8, 12}, + {Intrinsic::ctpop, MVT::nxv4i8, 12}, + {Intrinsic::ctpop, MVT::nxv8i8, 12}, + {Intrinsic::ctpop, MVT::nxv16i8, 12}, + {Intrinsic::ctpop, MVT::v2i16, 19}, + {Intrinsic::ctpop, MVT::v4i16, 19}, + {Intrinsic::ctpop, MVT::v8i16, 19}, + {Intrinsic::ctpop, MVT::v16i16, 19}, + {Intrinsic::ctpop, MVT::nxv2i16, 19}, + {Intrinsic::ctpop, MVT::nxv4i16, 19}, + {Intrinsic::ctpop, MVT::nxv8i16, 19}, + {Intrinsic::ctpop, MVT::nxv16i16, 19}, + {Intrinsic::ctpop, MVT::v2i32, 20}, + {Intrinsic::ctpop, MVT::v4i32, 20}, + {Intrinsic::ctpop, MVT::v8i32, 20}, + {Intrinsic::ctpop, MVT::v16i32, 20}, + {Intrinsic::ctpop, MVT::nxv2i32, 20}, + {Intrinsic::ctpop, MVT::nxv4i32, 20}, + {Intrinsic::ctpop, MVT::nxv8i32, 20}, + {Intrinsic::ctpop, MVT::nxv16i32, 20}, + {Intrinsic::ctpop, MVT::v2i64, 21}, + {Intrinsic::ctpop, MVT::v4i64, 21}, + {Intrinsic::ctpop, MVT::v8i64, 21}, + {Intrinsic::ctpop, MVT::v16i64, 21}, + {Intrinsic::ctpop, MVT::nxv2i64, 21}, + {Intrinsic::ctpop, MVT::nxv4i64, 21}, + {Intrinsic::ctpop, MVT::nxv8i64, 21}, + {Intrinsic::ctlz, MVT::v2i8, 10}, + {Intrinsic::ctlz, MVT::v4i8, 10}, + {Intrinsic::ctlz, MVT::v8i8, 10}, + {Intrinsic::ctlz, MVT::v16i8, 10}, + {Intrinsic::ctlz, MVT::nxv2i8, 10}, + {Intrinsic::ctlz, MVT::nxv4i8, 10}, + {Intrinsic::ctlz, MVT::nxv8i8, 10}, + {Intrinsic::ctlz, MVT::nxv16i8, 10}, + {Intrinsic::ctlz, MVT::v2i16, 7}, + {Intrinsic::ctlz, MVT::v4i16, 7}, + {Intrinsic::ctlz, MVT::v8i16, 7}, + {Intrinsic::ctlz, MVT::v16i16, 7}, + {Intrinsic::ctlz, MVT::nxv2i16, 7}, + {Intrinsic::ctlz, MVT::nxv4i16, 7}, + {Intrinsic::ctlz, MVT::nxv8i16, 7}, + {Intrinsic::ctlz, MVT::nxv16i16, 7}, + {Intrinsic::ctlz, MVT::v2i32, 8}, + {Intrinsic::ctlz, MVT::v4i32, 8}, + {Intrinsic::ctlz, MVT::v8i32, 8}, + {Intrinsic::ctlz, MVT::v16i32, 8}, + {Intrinsic::ctlz, MVT::nxv2i32, 11}, + {Intrinsic::ctlz, MVT::nxv4i32, 11}, + {Intrinsic::ctlz, MVT::nxv8i32, 11}, + {Intrinsic::ctlz, MVT::nxv16i32, 31}, + {Intrinsic::ctlz, MVT::v2i64, 35}, + {Intrinsic::ctlz, MVT::v4i64, 35}, + {Intrinsic::ctlz, MVT::v8i64, 35}, + {Intrinsic::ctlz, MVT::v16i64, 35}, + {Intrinsic::ctlz, MVT::nxv2i64, 35}, + {Intrinsic::ctlz, MVT::nxv4i64, 35}, + {Intrinsic::ctlz, MVT::nxv8i64, 35}, + {Intrinsic::cttz, MVT::v2i8, 13}, + {Intrinsic::cttz, MVT::v4i8, 13}, + {Intrinsic::cttz, MVT::v8i8, 13}, + {Intrinsic::cttz, MVT::v16i8, 13}, + {Intrinsic::cttz, MVT::nxv2i8, 13}, + {Intrinsic::cttz, MVT::nxv4i8, 13}, + {Intrinsic::cttz, MVT::nxv8i8, 13}, + {Intrinsic::cttz, MVT::nxv16i8, 13}, + {Intrinsic::cttz, MVT::v2i16, 9}, + {Intrinsic::cttz, MVT::v4i16, 9}, + {Intrinsic::cttz, MVT::v8i16, 9}, + {Intrinsic::cttz, MVT::v16i16, 9}, + {Intrinsic::cttz, MVT::nxv2i16, 9}, + {Intrinsic::cttz, MVT::nxv4i16, 9}, + {Intrinsic::cttz, MVT::nxv8i16, 9}, + {Intrinsic::cttz, MVT::nxv16i16, 9}, + {Intrinsic::cttz, MVT::v2i32, 10}, + {Intrinsic::cttz, MVT::v4i32, 10}, + {Intrinsic::cttz, MVT::v8i32, 10}, + {Intrinsic::cttz, MVT::v16i32, 10}, + {Intrinsic::cttz, MVT::nxv2i32, 13}, + {Intrinsic::cttz, MVT::nxv4i32, 13}, + {Intrinsic::cttz, MVT::nxv8i32, 13}, + {Intrinsic::cttz, MVT::nxv16i32, 24}, + {Intrinsic::cttz, MVT::v2i64, 25}, + {Intrinsic::cttz, MVT::v4i64, 25}, + {Intrinsic::cttz, MVT::v8i64, 25}, + {Intrinsic::cttz, MVT::v16i64, 25}, + {Intrinsic::cttz, MVT::nxv2i64, 25}, + {Intrinsic::cttz, MVT::nxv4i64, 25}, + {Intrinsic::cttz, MVT::nxv8i64, 25}, }; InstructionCost diff --git a/llvm/test/Analysis/CostModel/RISCV/integer-bit-manip.ll b/llvm/test/Analysis/CostModel/RISCV/integer-bit-manip.ll index decf95973e28bb..d74c61a41a916c 100644 --- a/llvm/test/Analysis/CostModel/RISCV/integer-bit-manip.ll +++ b/llvm/test/Analysis/CostModel/RISCV/integer-bit-manip.ll @@ -4,32 +4,32 @@ define void @bswap() { ; CHECK-LABEL: 'bswap' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call i16 @llvm.bswap.i16(i16 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x i16> @llvm.bswap.v2i16(<2 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x i16> @llvm.bswap.v4i16(<4 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x i16> @llvm.bswap.v8i16(<8 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %5 = call <16 x i16> @llvm.bswap.v16i16(<16 x i16> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.bswap.nxv2i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.bswap.nxv4i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.bswap.nxv8i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.bswap.nxv16i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x i16> @llvm.bswap.v2i16(<2 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = call <4 x i16> @llvm.bswap.v4i16(<4 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = call <8 x i16> @llvm.bswap.v8i16(<8 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %5 = call <16 x i16> @llvm.bswap.v16i16(<16 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %6 = call @llvm.bswap.nxv2i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call @llvm.bswap.nxv4i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %8 = call @llvm.bswap.nxv8i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %9 = call @llvm.bswap.nxv16i16( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call i32 @llvm.bswap.i32(i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %11 = call <2 x i32> @llvm.bswap.v2i32(<2 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %12 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %13 = call <8 x i32> @llvm.bswap.v8i32(<8 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %14 = call <16 x i32> @llvm.bswap.v16i32(<16 x i32> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.bswap.nxv2i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.bswap.nxv4i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.bswap.nxv8i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.bswap.nxv16i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %11 = call <2 x i32> @llvm.bswap.v2i32(<2 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %12 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %13 = call <8 x i32> @llvm.bswap.v8i32(<8 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %14 = call <16 x i32> @llvm.bswap.v16i32(<16 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %15 = call @llvm.bswap.nxv2i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %16 = call @llvm.bswap.nxv4i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %17 = call @llvm.bswap.nxv8i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %18 = call @llvm.bswap.nxv16i32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %19 = call i64 @llvm.bswap.i64(i64 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %20 = call <2 x i64> @llvm.bswap.v2i64(<2 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %21 = call <4 x i64> @llvm.bswap.v4i64(<4 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %22 = call <8 x i64> @llvm.bswap.v8i64(<8 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %23 = call <16 x i64> @llvm.bswap.v16i64(<16 x i64> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %24 = call @llvm.bswap.nxv2i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %25 = call @llvm.bswap.nxv4i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.bswap.nxv8i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.bswap.nxv16i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %20 = call <2 x i64> @llvm.bswap.v2i64(<2 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %21 = call <4 x i64> @llvm.bswap.v4i64(<4 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %22 = call <8 x i64> @llvm.bswap.v8i64(<8 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %23 = call <16 x i64> @llvm.bswap.v16i64(<16 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %24 = call @llvm.bswap.nxv2i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %25 = call @llvm.bswap.nxv4i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %26 = call @llvm.bswap.nxv8i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %27 = call @llvm.bswap.nxv16i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call i16 @llvm.bswap.i16(i16 undef) @@ -65,41 +65,41 @@ define void @bswap() { define void @bitreverse() { ; CHECK-LABEL: 'bitreverse' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call i8 @llvm.bitreverse.i8(i8 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x i8> @llvm.bitreverse.v2i8(<2 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x i8> @llvm.bitreverse.v4i8(<4 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x i8> @llvm.bitreverse.v8i8(<8 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %5 = call <16 x i8> @llvm.bitreverse.v16i8(<16 x i8> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.bitreverse.nxv2i8( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.bitreverse.nxv4i8( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.bitreverse.nxv8i8( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.bitreverse.nxv16i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %2 = call <2 x i8> @llvm.bitreverse.v2i8(<2 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %3 = call <4 x i8> @llvm.bitreverse.v4i8(<4 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %4 = call <8 x i8> @llvm.bitreverse.v8i8(<8 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %5 = call <16 x i8> @llvm.bitreverse.v16i8(<16 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %6 = call @llvm.bitreverse.nxv2i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %7 = call @llvm.bitreverse.nxv4i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %8 = call @llvm.bitreverse.nxv8i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %9 = call @llvm.bitreverse.nxv16i8( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call i16 @llvm.bitreverse.i16(i16 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %11 = call <2 x i16> @llvm.bitreverse.v2i16(<2 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %12 = call <4 x i16> @llvm.bitreverse.v4i16(<4 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %13 = call <8 x i16> @llvm.bitreverse.v8i16(<8 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %14 = call <16 x i16> @llvm.bitreverse.v16i16(<16 x i16> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.bitreverse.nxv2i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.bitreverse.nxv4i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.bitreverse.nxv8i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.bitreverse.nxv16i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %11 = call <2 x i16> @llvm.bitreverse.v2i16(<2 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %12 = call <4 x i16> @llvm.bitreverse.v4i16(<4 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %13 = call <8 x i16> @llvm.bitreverse.v8i16(<8 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %14 = call <16 x i16> @llvm.bitreverse.v16i16(<16 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %15 = call @llvm.bitreverse.nxv2i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %16 = call @llvm.bitreverse.nxv4i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %17 = call @llvm.bitreverse.nxv8i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %18 = call @llvm.bitreverse.nxv16i16( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %19 = call i32 @llvm.bitreverse.i32(i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %20 = call <2 x i32> @llvm.bitreverse.v2i32(<2 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %21 = call <4 x i32> @llvm.bitreverse.v4i32(<4 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %22 = call <8 x i32> @llvm.bitreverse.v8i32(<8 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %23 = call <16 x i32> @llvm.bitreverse.v16i32(<16 x i32> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %24 = call @llvm.bitreverse.nxv2i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %25 = call @llvm.bitreverse.nxv4i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.bitreverse.nxv8i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.bitreverse.nxv16i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %20 = call <2 x i32> @llvm.bitreverse.v2i32(<2 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %21 = call <4 x i32> @llvm.bitreverse.v4i32(<4 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %22 = call <8 x i32> @llvm.bitreverse.v8i32(<8 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %23 = call <16 x i32> @llvm.bitreverse.v16i32(<16 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %24 = call @llvm.bitreverse.nxv2i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %25 = call @llvm.bitreverse.nxv4i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %26 = call @llvm.bitreverse.nxv8i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %27 = call @llvm.bitreverse.nxv16i32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %28 = call i64 @llvm.bitreverse.i64(i64 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %29 = call <2 x i64> @llvm.bitreverse.v2i64(<2 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %30 = call <4 x i64> @llvm.bitreverse.v4i64(<4 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %31 = call <8 x i64> @llvm.bitreverse.v8i64(<8 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %32 = call <16 x i64> @llvm.bitreverse.v16i64(<16 x i64> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %33 = call @llvm.bitreverse.nxv2i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %34 = call @llvm.bitreverse.nxv4i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %35 = call @llvm.bitreverse.nxv8i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %36 = call @llvm.bitreverse.nxv16i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %29 = call <2 x i64> @llvm.bitreverse.v2i64(<2 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %30 = call <4 x i64> @llvm.bitreverse.v4i64(<4 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %31 = call <8 x i64> @llvm.bitreverse.v8i64(<8 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %32 = call <16 x i64> @llvm.bitreverse.v16i64(<16 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %33 = call @llvm.bitreverse.nxv2i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %34 = call @llvm.bitreverse.nxv4i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %35 = call @llvm.bitreverse.nxv8i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 104 for instruction: %36 = call @llvm.bitreverse.nxv16i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call i8 @llvm.bitreverse.i8(i8 undef) @@ -144,41 +144,41 @@ define void @bitreverse() { define void @ctpop() { ; CHECK-LABEL: 'ctpop' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = call i8 @llvm.ctpop.i8(i8 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %2 = call <2 x i8> @llvm.ctpop.v2i8(<2 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %3 = call <4 x i8> @llvm.ctpop.v4i8(<4 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %4 = call <8 x i8> @llvm.ctpop.v8i8(<8 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %5 = call <16 x i8> @llvm.ctpop.v16i8(<16 x i8> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.ctpop.nxv2i8( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.ctpop.nxv4i8( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.ctpop.nxv8i8( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.ctpop.nxv16i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = call <2 x i8> @llvm.ctpop.v2i8(<2 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %3 = call <4 x i8> @llvm.ctpop.v4i8(<4 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %4 = call <8 x i8> @llvm.ctpop.v8i8(<8 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %5 = call <16 x i8> @llvm.ctpop.v16i8(<16 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %6 = call @llvm.ctpop.nxv2i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %7 = call @llvm.ctpop.nxv4i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %8 = call @llvm.ctpop.nxv8i8( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %9 = call @llvm.ctpop.nxv16i8( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %10 = call i16 @llvm.ctpop.i16(i16 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call <2 x i16> @llvm.ctpop.v2i16(<2 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %12 = call <4 x i16> @llvm.ctpop.v4i16(<4 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %13 = call <8 x i16> @llvm.ctpop.v8i16(<8 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %14 = call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.ctpop.nxv2i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.ctpop.nxv4i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.ctpop.nxv8i16( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.ctpop.nxv16i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %11 = call <2 x i16> @llvm.ctpop.v2i16(<2 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %12 = call <4 x i16> @llvm.ctpop.v4i16(<4 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %13 = call <8 x i16> @llvm.ctpop.v8i16(<8 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %14 = call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %15 = call @llvm.ctpop.nxv2i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %16 = call @llvm.ctpop.nxv4i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %17 = call @llvm.ctpop.nxv8i16( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %18 = call @llvm.ctpop.nxv16i16( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = call i32 @llvm.ctpop.i32(i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %20 = call <2 x i32> @llvm.ctpop.v2i32(<2 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %20 = call <2 x i32> @llvm.ctpop.v2i32(<2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %21 = call <4 x i32> @llvm.ctpop.v4i32(<4 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %22 = call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %23 = call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %24 = call @llvm.ctpop.nxv2i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %25 = call @llvm.ctpop.nxv4i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.ctpop.nxv8i32( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.ctpop.nxv16i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %22 = call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %23 = call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %24 = call @llvm.ctpop.nxv2i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %25 = call @llvm.ctpop.nxv4i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %26 = call @llvm.ctpop.nxv8i32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %27 = call @llvm.ctpop.nxv16i32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %28 = call i64 @llvm.ctpop.i64(i64 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %29 = call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %30 = call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %31 = call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %32 = call <16 x i64> @llvm.ctpop.v16i64(<16 x i64> undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %33 = call @llvm.ctpop.nxv2i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %34 = call @llvm.ctpop.nxv4i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %35 = call @llvm.ctpop.nxv8i64( undef) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %36 = call @llvm.ctpop.nxv16i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %29 = call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %30 = call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %31 = call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %32 = call <16 x i64> @llvm.ctpop.v16i64(<16 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %33 = call @llvm.ctpop.nxv2i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %34 = call @llvm.ctpop.nxv4i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %35 = call @llvm.ctpop.nxv8i64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %36 = call @llvm.ctpop.nxv16i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call i8 @llvm.ctpop.i8(i8 undef) @@ -223,41 +223,41 @@ define void @ctpop() { define void @ctlz() { ; CHECK-LABEL: 'ctlz' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call i8 @llvm.ctlz.i8(i8 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x i8> @llvm.ctlz.v2i8(<2 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x i8> @llvm.ctlz.v4i8(<4 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x i8> @llvm.ctlz.v8i8(<8 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %5 = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.ctlz.nxv2i8( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.ctlz.nxv4i8( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.ctlz.nxv8i8( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.ctlz.nxv16i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %2 = call <2 x i8> @llvm.ctlz.v2i8(<2 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %3 = call <4 x i8> @llvm.ctlz.v4i8(<4 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %4 = call <8 x i8> @llvm.ctlz.v8i8(<8 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %5 = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %6 = call @llvm.ctlz.nxv2i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %7 = call @llvm.ctlz.nxv4i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %8 = call @llvm.ctlz.nxv8i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %9 = call @llvm.ctlz.nxv16i8( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call i16 @llvm.ctlz.i16(i16 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %11 = call <2 x i16> @llvm.ctlz.v2i16(<2 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %12 = call <4 x i16> @llvm.ctlz.v4i16(<4 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %13 = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %14 = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.ctlz.nxv2i16( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.ctlz.nxv4i16( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.ctlz.nxv8i16( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.ctlz.nxv16i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %11 = call <2 x i16> @llvm.ctlz.v2i16(<2 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %12 = call <4 x i16> @llvm.ctlz.v4i16(<4 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %13 = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %14 = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.ctlz.nxv2i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.ctlz.nxv4i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.ctlz.nxv8i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %18 = call @llvm.ctlz.nxv16i16( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %19 = call i32 @llvm.ctlz.i32(i32 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %20 = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %21 = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %22 = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %23 = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %24 = call @llvm.ctlz.nxv2i32( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %25 = call @llvm.ctlz.nxv4i32( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.ctlz.nxv8i32( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.ctlz.nxv16i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %20 = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %21 = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %22 = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %23 = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %24 = call @llvm.ctlz.nxv2i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %25 = call @llvm.ctlz.nxv4i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %26 = call @llvm.ctlz.nxv8i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %27 = call @llvm.ctlz.nxv16i32( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %28 = call i64 @llvm.ctlz.i64(i64 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %29 = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %30 = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %31 = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %32 = call <16 x i64> @llvm.ctlz.v16i64(<16 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %33 = call @llvm.ctlz.nxv2i64( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %34 = call @llvm.ctlz.nxv4i64( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %35 = call @llvm.ctlz.nxv8i64( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %36 = call @llvm.ctlz.nxv16i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %29 = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %30 = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %31 = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %32 = call <16 x i64> @llvm.ctlz.v16i64(<16 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %33 = call @llvm.ctlz.nxv2i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %34 = call @llvm.ctlz.nxv4i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %35 = call @llvm.ctlz.nxv8i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 70 for instruction: %36 = call @llvm.ctlz.nxv16i64( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call i8 @llvm.ctlz.i8(i8 undef) @@ -302,41 +302,41 @@ define void @ctlz() { define void @cttz() { ; CHECK-LABEL: 'cttz' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call i8 @llvm.cttz.i8(i8 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x i8> @llvm.cttz.v2i8(<2 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x i8> @llvm.cttz.v4i8(<4 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x i8> @llvm.cttz.v8i8(<8 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %5 = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.cttz.nxv2i8( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.cttz.nxv4i8( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.cttz.nxv8i8( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.cttz.nxv16i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %2 = call <2 x i8> @llvm.cttz.v2i8(<2 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %3 = call <4 x i8> @llvm.cttz.v4i8(<4 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %4 = call <8 x i8> @llvm.cttz.v8i8(<8 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %5 = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %6 = call @llvm.cttz.nxv2i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %7 = call @llvm.cttz.nxv4i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %8 = call @llvm.cttz.nxv8i8( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %9 = call @llvm.cttz.nxv16i8( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call i16 @llvm.cttz.i16(i16 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %11 = call <2 x i16> @llvm.cttz.v2i16(<2 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %12 = call <4 x i16> @llvm.cttz.v4i16(<4 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %13 = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %14 = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.cttz.nxv2i16( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.cttz.nxv4i16( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.cttz.nxv8i16( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.cttz.nxv16i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %11 = call <2 x i16> @llvm.cttz.v2i16(<2 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %12 = call <4 x i16> @llvm.cttz.v4i16(<4 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %13 = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %14 = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %15 = call @llvm.cttz.nxv2i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %16 = call @llvm.cttz.nxv4i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %17 = call @llvm.cttz.nxv8i16( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %18 = call @llvm.cttz.nxv16i16( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %19 = call i32 @llvm.cttz.i32(i32 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %20 = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %21 = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %22 = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %23 = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %24 = call @llvm.cttz.nxv2i32( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %25 = call @llvm.cttz.nxv4i32( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.cttz.nxv8i32( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.cttz.nxv16i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %20 = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %21 = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %22 = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %23 = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %24 = call @llvm.cttz.nxv2i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %25 = call @llvm.cttz.nxv4i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %26 = call @llvm.cttz.nxv8i32( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %27 = call @llvm.cttz.nxv16i32( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %28 = call i64 @llvm.cttz.i64(i64 undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %29 = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %30 = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %31 = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %32 = call <16 x i64> @llvm.cttz.v16i64(<16 x i64> undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %33 = call @llvm.cttz.nxv2i64( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %34 = call @llvm.cttz.nxv4i64( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %35 = call @llvm.cttz.nxv8i64( undef, i1 false) -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %36 = call @llvm.cttz.nxv16i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %29 = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %30 = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %31 = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %32 = call <16 x i64> @llvm.cttz.v16i64(<16 x i64> undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %33 = call @llvm.cttz.nxv2i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %34 = call @llvm.cttz.nxv4i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %35 = call @llvm.cttz.nxv8i64( undef, i1 false) +; CHECK-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %36 = call @llvm.cttz.nxv16i64( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call i8 @llvm.cttz.i8(i8 undef)