diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp index 6b950cd8a49fc..4a34362a792f1 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -1437,6 +1437,15 @@ InstructionCost RISCVTTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy, return BaseT::getCmpSelInstrCost(Opcode, ValTy, CondTy, VecPred, CostKind, I); } +InstructionCost RISCVTTIImpl::getCFInstrCost(unsigned Opcode, + TTI::TargetCostKind CostKind, + const Instruction *I) { + if (CostKind != TTI::TCK_RecipThroughput) + return Opcode == Instruction::PHI ? 0 : 1; + // Branches are assumed to be predicted. + return 0; +} + InstructionCost RISCVTTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index, Value *Op0, diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h index f836799649c26..81a45f623d294 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -169,6 +169,9 @@ class RISCVTTIImpl : public BasicTTIImplBase { TTI::TargetCostKind CostKind, const Instruction *I = nullptr); + InstructionCost getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind, + const Instruction *I = nullptr); + using BaseT::getVectorInstrCost; InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, diff --git a/llvm/test/Analysis/CostModel/RISCV/abs.ll b/llvm/test/Analysis/CostModel/RISCV/abs.ll index 1929a631fc41a..c9d5c8d18df85 100644 --- a/llvm/test/Analysis/CostModel/RISCV/abs.ll +++ b/llvm/test/Analysis/CostModel/RISCV/abs.ll @@ -75,7 +75,7 @@ define i32 @abs(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %30 = call @llvm.abs.nxv16i8( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = call @llvm.abs.nxv32i8( undef, i1 false) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %32 = call @llvm.abs.nxv64i8( undef, i1 false) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; call <2 x i64> @llvm.abs.v2i64(<2 x i64> undef, i1 false) call <4 x i64> @llvm.abs.v4i64(<4 x i64> undef, i1 false) @@ -114,4 +114,4 @@ define i32 @abs(i32 %arg) { call @llvm.abs.nxv64i8( undef, i1 false) ret i32 undef -} \ No newline at end of file +} diff --git a/llvm/test/Analysis/CostModel/RISCV/active_lane_mask.ll b/llvm/test/Analysis/CostModel/RISCV/active_lane_mask.ll index 71dac08a4b8ec..ba62056f5851b 100644 --- a/llvm/test/Analysis/CostModel/RISCV/active_lane_mask.ll +++ b/llvm/test/Analysis/CostModel/RISCV/active_lane_mask.ll @@ -25,7 +25,7 @@ define void @get_lane_mask() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %mask_v2i1_i32 = call <2 x i1> @llvm.get.active.lane.mask.v2i1.i32(i32 undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %mask_v32i1_i64 = call <32 x i1> @llvm.get.active.lane.mask.v32i1.i64(i64 undef, i64 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %mask_v16i1_i16 = call <16 x i1> @llvm.get.active.lane.mask.v16i1.i16(i16 undef, i16 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %mask_nxv16i1_i64 = call @llvm.get.active.lane.mask.nxv16i1.i64(i64 undef, i64 undef) %mask_nxv8i1_i64 = call @llvm.get.active.lane.mask.nxv8i1.i64(i64 undef, i64 undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/arith-fp.ll b/llvm/test/Analysis/CostModel/RISCV/arith-fp.ll index b0d071f808443..306277e46fa5b 100644 --- a/llvm/test/Analysis/CostModel/RISCV/arith-fp.ll +++ b/llvm/test/Analysis/CostModel/RISCV/arith-fp.ll @@ -38,7 +38,7 @@ define i32 @fadd() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2F64 = fadd undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4F64 = fadd undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8F64 = fadd undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = fadd half undef, undef %F32 = fadd float undef, undef @@ -118,7 +118,7 @@ define i32 @fsub() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2F64 = fsub undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4F64 = fsub undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8F64 = fsub undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = fsub half undef, undef %F32 = fsub float undef, undef @@ -198,7 +198,7 @@ define i32 @fmul() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2F64 = fmul undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4F64 = fmul undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8F64 = fmul undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = fmul half undef, undef %F32 = fmul float undef, undef @@ -278,7 +278,7 @@ define i32 @fdiv() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2F64 = fdiv undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV4F64 = fdiv undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV8F64 = fdiv undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = fdiv half undef, undef %F32 = fdiv float undef, undef @@ -358,7 +358,7 @@ define i32 @frem() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV2F64 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV4F64 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV8F64 = frem undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = frem half undef, undef %F32 = frem float undef, undef @@ -438,7 +438,7 @@ define i32 @fneg() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2F64 = fneg undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4F64 = fneg undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8F64 = fneg undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = fneg half undef %F32 = fneg float undef @@ -518,7 +518,7 @@ define i32 @fcopysign() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2F64 = call @llvm.copysign.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4F64 = call @llvm.copysign.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8F64 = call @llvm.copysign.nxv8f64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = call half @llvm.copysign.f16(half undef, half undef) %F32 = call float @llvm.copysign.f32(float undef, float undef) @@ -598,7 +598,7 @@ define i32 @fma() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2F64 = call @llvm.fma.nxv2f64( undef, undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4F64 = call @llvm.fma.nxv4f64( undef, undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8F64 = call @llvm.fma.nxv8f64( undef, undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %F16 = call half @llvm.fma.f16(half undef, half undef, half undef) %F32 = call float @llvm.fma.f32(float undef, float undef, float undef) @@ -675,7 +675,7 @@ define void @fmuladd() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call @llvm.fmuladd.nxv4f64( undef, undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %29 = call @llvm.fmuladd.nxv8f64( undef, undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %30 = call @llvm.fmuladd.nxv16f64( undef, undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.fmuladd.f16(half undef, half undef, half undef) call float @llvm.fmuladd.f32(float undef, float undef, float undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/arith-int.ll b/llvm/test/Analysis/CostModel/RISCV/arith-int.ll index 0f27fd9a4cee1..00f2cd7b63a4a 100644 --- a/llvm/test/Analysis/CostModel/RISCV/arith-int.ll +++ b/llvm/test/Analysis/CostModel/RISCV/arith-int.ll @@ -39,7 +39,7 @@ define i32 @add() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2I64 = add undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4I64 = add undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8I64 = add undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'add' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = add i16 undef, undef @@ -75,7 +75,7 @@ define i32 @add() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV2I64 = add undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV4I64 = add undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %NXV8I64 = add undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = add i16 undef, undef %I32 = add i32 undef, undef @@ -155,7 +155,7 @@ define i32 @sub() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2I64 = sub undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4I64 = sub undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8I64 = sub undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'sub' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = sub i16 undef, undef @@ -191,7 +191,7 @@ define i32 @sub() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV2I64 = sub undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV4I64 = sub undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %NXV8I64 = sub undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = sub i16 undef, undef %I32 = sub i32 undef, undef @@ -271,7 +271,7 @@ define i32 @mul() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2I64 = mul undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4I64 = mul undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8I64 = mul undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'mul' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = mul i16 undef, undef @@ -307,7 +307,7 @@ define i32 @mul() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV2I64 = mul undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV4I64 = mul undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %NXV8I64 = mul undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = mul i16 undef, undef %I32 = mul i32 undef, undef @@ -387,7 +387,7 @@ define i32 @shl() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2I64 = shl undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4I64 = shl undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8I64 = shl undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'shl' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = shl i16 undef, undef @@ -423,7 +423,7 @@ define i32 @shl() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV2I64 = shl undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV4I64 = shl undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %NXV8I64 = shl undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = shl i16 undef, undef %I32 = shl i32 undef, undef @@ -503,7 +503,7 @@ define i32 @lshr() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2I64 = lshr undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4I64 = lshr undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8I64 = lshr undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'lshr' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = lshr i16 undef, undef @@ -539,7 +539,7 @@ define i32 @lshr() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV2I64 = lshr undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV4I64 = lshr undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %NXV8I64 = lshr undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = lshr i16 undef, undef %I32 = lshr i32 undef, undef @@ -619,7 +619,7 @@ define i32 @ashr() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %NXV2I64 = ashr undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV4I64 = ashr undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV8I64 = ashr undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'ashr' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = ashr i16 undef, undef @@ -655,7 +655,7 @@ define i32 @ashr() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %NXV2I64 = ashr undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %NXV4I64 = ashr undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %NXV8I64 = ashr undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = ashr i16 undef, undef %I32 = ashr i32 undef, undef @@ -735,7 +735,7 @@ define i32 @udiv() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = udiv undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = udiv undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = udiv undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'udiv' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, undef @@ -771,7 +771,7 @@ define i32 @udiv() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = udiv undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = udiv undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = udiv undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = udiv i16 undef, undef %I32 = udiv i32 undef, undef @@ -851,7 +851,7 @@ define i32 @urem() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = urem undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = urem undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = urem undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'urem' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = urem i16 undef, undef @@ -887,7 +887,7 @@ define i32 @urem() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = urem undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = urem undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = urem undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = urem i16 undef, undef %I32 = urem i32 undef, undef @@ -967,7 +967,7 @@ define i32 @sdiv() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = sdiv undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = sdiv undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = sdiv undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'sdiv' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = sdiv i16 undef, undef @@ -1003,7 +1003,7 @@ define i32 @sdiv() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = sdiv undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = sdiv undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = sdiv undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = sdiv i16 undef, undef %I32 = sdiv i32 undef, undef @@ -1083,7 +1083,7 @@ define i32 @srem() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = srem undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = srem undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = srem undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIFIVE-X280-LABEL: 'srem' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = srem i16 undef, undef @@ -1119,7 +1119,7 @@ define i32 @srem() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV2I64 = srem undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV4I64 = srem undef, undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %NXV8I64 = srem undef, undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; %I16 = srem i16 undef, undef %I32 = srem i32 undef, undef @@ -1184,7 +1184,7 @@ define void @add_of_constant() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = add <4 x i32> , undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %14 = add <4 x i32> , undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %15 = add <4 x i32> , undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIFIVE-X280-LABEL: 'add_of_constant' ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = add <4 x i32> poison, undef @@ -1202,7 +1202,7 @@ define void @add_of_constant() { ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = add <4 x i32> , undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %14 = add <4 x i32> , undef ; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %15 = add <4 x i32> , undef -; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; SIFIVE-X280-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; poison and undef diff --git a/llvm/test/Analysis/CostModel/RISCV/cast.ll b/llvm/test/Analysis/CostModel/RISCV/cast.ll index 9fe78c3ec51c6..c486af1cfd4a8 100644 --- a/llvm/test/Analysis/CostModel/RISCV/cast.ll +++ b/llvm/test/Analysis/CostModel/RISCV/cast.ll @@ -164,7 +164,7 @@ define void @sext() { ; RV32-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %nxv128i1_nxv128i16 = sext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %nxv128i1_nxv128i32 = sext undef to ; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv128i1_nxv128i128 = sext undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'sext' ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_v2i16 = sext <2 x i8> undef to <2 x i16> @@ -327,7 +327,7 @@ define void @sext() { ; RV64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %nxv128i1_nxv128i16 = sext undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %nxv128i1_nxv128i32 = sext undef to ; RV64-NEXT: Cost Model: Invalid cost for instruction: %nxv128i1_nxv128i128 = sext undef to -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8_v2i16 = sext <2 x i8> undef to <2 x i16> %v2i8_v2i32 = sext <2 x i8> undef to <2 x i32> @@ -670,7 +670,7 @@ define void @zext() { ; RV32-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %nxv128i1_nxv128i16 = zext undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %nxv128i1_nxv128i32 = zext undef to ; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv128i1_nxv128i128 = zext undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'zext' ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_v2i16 = zext <2 x i8> undef to <2 x i16> @@ -833,7 +833,7 @@ define void @zext() { ; RV64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %nxv128i1_nxv128i16 = zext undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %nxv128i1_nxv128i32 = zext undef to ; RV64-NEXT: Cost Model: Invalid cost for instruction: %nxv128i1_nxv128i128 = zext undef to -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8_v2i16 = zext <2 x i8> undef to <2 x i16> %v2i8_v2i32 = zext <2 x i8> undef to <2 x i32> @@ -1166,7 +1166,7 @@ define void @trunc() { ; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv64i16_nxv64i1 = trunc undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %nxv64i32_nxv64i1 = trunc undef to ; RV32-NEXT: Cost Model: Invalid cost for instruction: %nxv64i64_nxv64i1 = trunc undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'trunc' ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i8 = trunc <2 x i16> undef to <2 x i8> @@ -1319,7 +1319,7 @@ define void @trunc() { ; RV64-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv64i16_nxv64i1 = trunc undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %nxv64i32_nxv64i1 = trunc undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %nxv64i64_nxv64i1 = trunc undef to -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i16_v2i8 = trunc <2 x i16> undef to <2 x i8> %v2i32_v2i8 = trunc <2 x i32> undef to <2 x i8> @@ -1533,7 +1533,7 @@ define void @fpext() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv64f16_nxv64f32 = fpext undef to ; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %nxv64f16_nxv64f64 = fpext undef to ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %nxv64f32_nxv64f64 = fpext undef to -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16_v2f32 = fpext <2 x half> undef to <2 x float> %v2f16_v2f64 = fpext <2 x half> undef to <2 x double> @@ -1638,7 +1638,7 @@ define void @fptrunc() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv64f32_nxv64f16 = fptrunc undef to ; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %nxv64f64_nxv64f16 = fptrunc undef to ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %nxv64f64_nxv64f32 = fptrunc undef to -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f32_v2f16 = fptrunc <2 x float> undef to <2 x half> %v2f64_v2f16 = fptrunc <2 x double> undef to <2 x half> @@ -1911,7 +1911,7 @@ define void @fptosi() { ; RV32-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64f16_nxv64i1 = fptosi undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64f32_nxv64i1 = fptosi undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64f64_nxv64i1 = fptosi undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'fptosi' ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_v2i8 = fptosi <2 x half> undef to <2 x i8> @@ -2124,7 +2124,7 @@ define void @fptosi() { ; RV64-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64f16_nxv64i1 = fptosi undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64f32_nxv64i1 = fptosi undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64f64_nxv64i1 = fptosi undef to -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16_v2i8 = fptosi <2 x half> undef to <2 x i8> %v2f32_v2i8 = fptosi <2 x float> undef to <2 x i8> @@ -2565,7 +2565,7 @@ define void @fptoui() { ; RV32-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64f16_nxv64i1 = fptoui undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64f32_nxv64i1 = fptoui undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64f64_nxv64i1 = fptoui undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'fptoui' ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_v2i8 = fptoui <2 x half> undef to <2 x i8> @@ -2778,7 +2778,7 @@ define void @fptoui() { ; RV64-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64f16_nxv64i1 = fptoui undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64f32_nxv64i1 = fptoui undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64f64_nxv64i1 = fptoui undef to -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16_v2i8 = fptoui <2 x half> undef to <2 x i8> %v2f32_v2i8 = fptoui <2 x float> undef to <2 x i8> @@ -3219,7 +3219,7 @@ define void @sitofp() { ; RV32-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64i1_nxv64f16 = sitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64i1_nxv64f32 = sitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64i1_nxv64f64 = sitofp undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'sitofp' ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_v2f16 = sitofp <2 x i8> undef to <2 x half> @@ -3432,7 +3432,7 @@ define void @sitofp() { ; RV64-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64i1_nxv64f16 = sitofp undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64i1_nxv64f32 = sitofp undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64i1_nxv64f64 = sitofp undef to -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8_v2f16 = sitofp <2 x i8> undef to <2 x half> %v2i8_v2f32 = sitofp <2 x i8> undef to <2 x float> @@ -3873,7 +3873,7 @@ define void @uitofp() { ; RV32-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64i1_nxv64f16 = uitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64i1_nxv64f32 = uitofp undef to ; RV32-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64i1_nxv64f64 = uitofp undef to -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'uitofp' ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_v2f16 = uitofp <2 x i8> undef to <2 x half> @@ -4086,7 +4086,7 @@ define void @uitofp() { ; RV64-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv64i1_nxv64f16 = uitofp undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %nxv64i1_nxv64f32 = uitofp undef to ; RV64-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %nxv64i1_nxv64f64 = uitofp undef to -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8_v2f16 = uitofp <2 x i8> undef to <2 x half> %v2i8_v2f32 = uitofp <2 x i8> undef to <2 x float> diff --git a/llvm/test/Analysis/CostModel/RISCV/fca-load-store.ll b/llvm/test/Analysis/CostModel/RISCV/fca-load-store.ll index a072b5a7e6098..81299de2d4968 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fca-load-store.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fca-load-store.ll @@ -8,7 +8,7 @@ define void @load(ptr %p) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = load [4 x i64], ptr %p, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %3 = load { i64, i64 }, ptr %p, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = load { i64, i32 }, ptr %p, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; load [2 x i64], ptr %p load [4 x i64], ptr %p @@ -24,7 +24,7 @@ define void @store(ptr %p) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store [4 x i64] undef, ptr %p, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i64 } undef, ptr %p, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i32 } undef, ptr %p, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; store [2 x i64] undef, ptr %p store [4 x i64] undef, ptr %p diff --git a/llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll b/llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll index 0b9e8441bf341..510d33b8d9033 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll @@ -72,7 +72,7 @@ define i32 @masked_gather() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4I16.u = call <4 x i16> @llvm.masked.gather.v4i16.v4p0(<4 x ptr> undef, i32 1, <4 x i1> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2I16.u = call <2 x i16> @llvm.masked.gather.v2i16.v2p0(<2 x ptr> undef, i32 1, <2 x i1> undef, <2 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1I16.u = call <1 x i16> @llvm.masked.gather.v1i16.v1p0(<1 x ptr> undef, i32 1, <1 x i1> undef, <1 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 0 ; %V8F64 = call <8 x double> @llvm.masked.gather.v8f64.v8p0(<8 x ptr> undef, i32 8, <8 x i1> undef, <8 x double> undef) %V4F64 = call <4 x double> @llvm.masked.gather.v4f64.v4p0(<4 x ptr> undef, i32 8, <4 x i1> undef, <4 x double> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll b/llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll index 602f1c8b52fdb..caa5138287f2a 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll @@ -72,7 +72,7 @@ define i32 @masked_scatter() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: call void @llvm.masked.scatter.v4i16.v4p0(<4 x i16> undef, <4 x ptr> undef, i32 1, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: call void @llvm.masked.scatter.v2i16.v2p0(<2 x i16> undef, <2 x ptr> undef, i32 1, <2 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: call void @llvm.masked.scatter.v1i16.v1p0(<1 x i16> undef, <1 x ptr> undef, i32 1, <1 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 0 ; call void @llvm.masked.scatter.v8f64.v8p0(<8 x double> undef, <8 x ptr> undef, i32 8, <8 x i1> undef) call void @llvm.masked.scatter.v4f64.v4p0(<4 x double> undef, <4 x ptr> undef, i32 8, <4 x i1> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/fp-min-max-abs.ll b/llvm/test/Analysis/CostModel/RISCV/fp-min-max-abs.ll index af6bbc9f8fb70..f8fe84cba3231 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fp-min-max-abs.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fp-min-max-abs.ll @@ -31,7 +31,7 @@ define void @fabs() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = call @llvm.fabs.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = call @llvm.fabs.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call @llvm.fabs.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.fabs.f16(half undef) @@ -86,7 +86,7 @@ define void @minnum() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.minnum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.minnum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.minnum.nxv8f64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.minnum.f32(float undef, float undef) call <2 x float> @llvm.minnum.v2f32(<2 x float> undef, <2 x float> undef) @@ -131,7 +131,7 @@ define void @maxnum() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.maxnum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.maxnum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.maxnum.nxv8f64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.maxnum.f32(float undef, float undef) call <2 x float> @llvm.maxnum.v2f32(<2 x float> undef, <2 x float> undef) @@ -176,7 +176,7 @@ define void @minimum() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.minimum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.minimum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = call @llvm.minimum.nxv8f64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.minimum.f32(float undef, float undef) call <2 x float> @llvm.minimum.v2f32(<2 x float> undef, <2 x float> undef) @@ -221,7 +221,7 @@ define void @maximum() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.maximum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.maximum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = call @llvm.maximum.nxv8f64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.maximum.f32(float undef, float undef) call <2 x float> @llvm.maximum.v2f32(<2 x float> undef, <2 x float> undef) @@ -266,7 +266,7 @@ define void @copysign() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.copysign.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.copysign.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.copysign.nxv8f64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.copysign.f32(float undef, float undef) call <2 x float> @llvm.copysign.v2f32(<2 x float> undef, <2 x float> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll b/llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll index 9a417d98f8a26..71e98e5acde89 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll @@ -31,7 +31,7 @@ define void @sqrt() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = call @llvm.sqrt.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = call @llvm.sqrt.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call @llvm.sqrt.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.sqrt.f16(half undef) call <2 x half> @llvm.sqrt.v2f16(<2 x half> undef) @@ -114,7 +114,7 @@ define void @pow() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.pow.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.pow.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.pow.nxv8f64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.pow.f32(float undef, float undef) call <2 x float> @llvm.pow.v2f32(<2 x float> undef, <2 x float> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll b/llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll index 322a285191ea9..abf581a2e6406 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll @@ -22,7 +22,7 @@ define void @sin() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.sin.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.sin.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.sin.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.sin.f32(float undef) call <2 x float> @llvm.sin.v2f32(<2 x float> undef) @@ -67,7 +67,7 @@ define void @cos() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.cos.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.cos.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.cos.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.cos.f32(float undef) call <2 x float> @llvm.cos.v2f32(<2 x float> undef) @@ -112,7 +112,7 @@ define void @exp() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.exp.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.exp.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.exp.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.exp.f32(float undef) call <2 x float> @llvm.exp.v2f32(<2 x float> undef) @@ -157,7 +157,7 @@ define void @exp2() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.exp2.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.exp2.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.exp2.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.exp2.f32(float undef) call <2 x float> @llvm.exp2.v2f32(<2 x float> undef) @@ -202,7 +202,7 @@ define void @log() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.log.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.log.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.log.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.log.f32(float undef) call <2 x float> @llvm.log.v2f32(<2 x float> undef) @@ -247,7 +247,7 @@ define void @log10() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.log10.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.log10.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.log10.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.log10.f32(float undef) call <2 x float> @llvm.log10.v2f32(<2 x float> undef) @@ -292,7 +292,7 @@ define void @log2() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.log2.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.log2.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.log2.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.log2.f32(float undef) call <2 x float> @llvm.log2.v2f32(<2 x float> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/fround.ll b/llvm/test/Analysis/CostModel/RISCV/fround.ll index 7ec18e56012e2..84fc4c454b7f7 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fround.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fround.ll @@ -22,7 +22,7 @@ define void @floor() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %17 = call @llvm.floor.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %18 = call @llvm.floor.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %19 = call @llvm.floor.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.floor.f32(float undef) call <2 x float> @llvm.floor.v2f32(<2 x float> undef) @@ -67,7 +67,7 @@ define void @ceil() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %17 = call @llvm.ceil.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %18 = call @llvm.ceil.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %19 = call @llvm.ceil.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.ceil.f32(float undef) call <2 x float> @llvm.ceil.v2f32(<2 x float> undef) @@ -112,7 +112,7 @@ define void @trunc() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.trunc.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %18 = call @llvm.trunc.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %19 = call @llvm.trunc.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.trunc.f32(float undef) call <2 x float> @llvm.trunc.v2f32(<2 x float> undef) @@ -157,7 +157,7 @@ define void @rint() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.rint.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %18 = call @llvm.rint.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %19 = call @llvm.rint.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.rint.f32(float undef) call <2 x float> @llvm.rint.v2f32(<2 x float> undef) @@ -202,7 +202,7 @@ define void @nearbyint() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %17 = call @llvm.nearbyint.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %18 = call @llvm.nearbyint.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %19 = call @llvm.nearbyint.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.nearbyint.f32(float undef) call <2 x float> @llvm.nearbyint.v2f32(<2 x float> undef) @@ -247,7 +247,7 @@ define void @round() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %17 = call @llvm.round.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %18 = call @llvm.round.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %19 = call @llvm.round.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.round.f32(float undef) call <2 x float> @llvm.round.v2f32(<2 x float> undef) @@ -292,7 +292,7 @@ define void @roundeven() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %17 = call @llvm.roundeven.nxv2f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %18 = call @llvm.roundeven.nxv4f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %19 = call @llvm.roundeven.nxv8f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.roundeven.f32(float undef) call <2 x float> @llvm.roundeven.v2f32(<2 x float> undef) @@ -335,7 +335,7 @@ define void @vp_ceil() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.vp.ceil.nxv2f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.vp.ceil.nxv4f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.vp.ceil.nxv8f64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x float> @llvm.vp.ceil.v2f32(<2 x float> undef, <2 x i1> undef, i32 undef) call <4 x float> @llvm.vp.ceil.v4f32(<4 x float> undef, <4 x i1> undef, i32 undef) @@ -376,7 +376,7 @@ define void @vp_floor() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.vp.floor.nxv2f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.vp.floor.nxv4f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.vp.floor.nxv8f64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x float> @llvm.vp.floor.v2f32(<2 x float> undef, <2 x i1> undef, i32 undef) call <4 x float> @llvm.vp.floor.v4f32(<4 x float> undef, <4 x i1> undef, i32 undef) @@ -417,7 +417,7 @@ define void @vp_round() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.vp.round.nxv2f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.vp.round.nxv4f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.vp.round.nxv8f64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x float> @llvm.vp.round.v2f32(<2 x float> undef, <2 x i1> undef, i32 undef) call <4 x float> @llvm.vp.round.v4f32(<4 x float> undef, <4 x i1> undef, i32 undef) @@ -458,7 +458,7 @@ define void @vp_roundeven() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.vp.roundeven.nxv2f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.vp.roundeven.nxv4f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.vp.roundeven.nxv8f64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x float> @llvm.vp.roundeven.v2f32(<2 x float> undef, <2 x i1> undef, i32 undef) call <4 x float> @llvm.vp.roundeven.v4f32(<4 x float> undef, <4 x i1> undef, i32 undef) @@ -499,7 +499,7 @@ define void @vp_roundtozero() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.vp.roundtozero.nxv2f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.vp.roundtozero.nxv4f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.vp.roundtozero.nxv8f64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x float> @llvm.vp.roundtozero.v2f32(<2 x float> undef, <2 x i1> undef, i32 undef) call <4 x float> @llvm.vp.roundtozero.v4f32(<4 x float> undef, <4 x i1> undef, i32 undef) @@ -540,7 +540,7 @@ define void @vp_rint() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %15 = call @llvm.vp.rint.nxv2f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %16 = call @llvm.vp.rint.nxv4f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %17 = call @llvm.vp.rint.nxv8f64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x float> @llvm.vp.rint.v2f32(<2 x float> undef, <2 x i1> undef, i32 undef) call <4 x float> @llvm.vp.rint.v4f32(<4 x float> undef, <4 x i1> undef, i32 undef) @@ -581,7 +581,7 @@ define void @vp_nearbyint() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.vp.nearbyint.nxv2f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.vp.nearbyint.nxv4f64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.vp.nearbyint.nxv8f64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x float> @llvm.vp.nearbyint.v2f32(<2 x float> undef, <2 x i1> undef, i32 undef) call <4 x float> @llvm.vp.nearbyint.v4f32(<4 x float> undef, <4 x i1> undef, i32 undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/gep-zero-indices.ll b/llvm/test/Analysis/CostModel/RISCV/gep-zero-indices.ll index 08cd5f21d0b71..c01d3b166d3a2 100644 --- a/llvm/test/Analysis/CostModel/RISCV/gep-zero-indices.ll +++ b/llvm/test/Analysis/CostModel/RISCV/gep-zero-indices.ll @@ -10,7 +10,7 @@ define ptr @zero_indices_i8(ptr %p) { ; CHECK-LABEL: 'zero_indices_i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr i8, ptr %p, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret ptr %x ; %x = getelementptr i8, ptr %p, i32 0 ret ptr %x @@ -19,7 +19,7 @@ define ptr @zero_indices_i8(ptr %p) { define ptr @zero_indices_i16(ptr %p) { ; CHECK-LABEL: 'zero_indices_i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr i16, ptr %p, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret ptr %x ; %x = getelementptr i16, ptr %p, i32 0 ret ptr %x @@ -28,7 +28,7 @@ define ptr @zero_indices_i16(ptr %p) { define ptr @zero_indices_i32(ptr %p) { ; CHECK-LABEL: 'zero_indices_i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr i32, ptr %p, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret ptr %x ; %x = getelementptr i32, ptr %p, i32 0 ret ptr %x @@ -37,7 +37,7 @@ define ptr @zero_indices_i32(ptr %p) { define ptr @zero_indices_i64(ptr %p) { ; CHECK-LABEL: 'zero_indices_i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr i64, ptr %p, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret ptr %x ; %x = getelementptr i64, ptr %p, i32 0 ret ptr %x @@ -46,7 +46,7 @@ define ptr @zero_indices_i64(ptr %p) { define ptr @zero_indices_array(ptr %p) { ; CHECK-LABEL: 'zero_indices_array' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr [42 x i64], ptr %p, i32 0, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret ptr %x ; %x = getelementptr [42 x i64], ptr %p, i32 0, i32 0 ret ptr %x @@ -59,7 +59,7 @@ define ptr @zero_indices_array(ptr %p) { define ptr @zero_indices_struct(ptr %p) { ; CHECK-LABEL: 'zero_indices_struct' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr %struct, ptr %p, i32 0, i32 0, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret ptr %x ; %x = getelementptr %struct, ptr %p, i32 0, i32 0, i32 0 ret ptr %x @@ -68,7 +68,7 @@ define ptr @zero_indices_struct(ptr %p) { define <4 x ptr> @zero_indices_v4i32(<4 x ptr> %p) { ; CHECK-LABEL: 'zero_indices_v4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr i32, <4 x ptr> %p, <4 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x ptr> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x ptr> %x ; %x = getelementptr i32, <4 x ptr> %p, <4 x i32> zeroinitializer ret <4 x ptr> %x @@ -77,7 +77,7 @@ define <4 x ptr> @zero_indices_v4i32(<4 x ptr> %p) { define <16 x ptr> @zero_indices_v16i32(<16 x ptr> %p) { ; CHECK-LABEL: 'zero_indices_v16i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr i32, <16 x ptr> %p, <16 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x ptr> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x ptr> %x ; %x = getelementptr i32, <16 x ptr> %p, <16 x i32> zeroinitializer ret <16 x ptr> %x @@ -86,7 +86,7 @@ define <16 x ptr> @zero_indices_v16i32(<16 x ptr> %p) { define <4 x ptr> @zero_indices_v4f32(<4 x ptr> %p) { ; CHECK-LABEL: 'zero_indices_v4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr float, <4 x ptr> %p, <4 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x ptr> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x ptr> %x ; %x = getelementptr float, <4 x ptr> %p, <4 x i32> zeroinitializer ret <4 x ptr> %x @@ -95,7 +95,7 @@ define <4 x ptr> @zero_indices_v4f32(<4 x ptr> %p) { define <4 x ptr> @zero_indices_v4v4i32(<4 x ptr> %p) { ; CHECK-LABEL: 'zero_indices_v4v4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr <32 x i32>, <4 x ptr> %p, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x ptr> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x ptr> %x ; %x = getelementptr <32 x i32>, <4 x ptr> %p, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer ret <4 x ptr> %x diff --git a/llvm/test/Analysis/CostModel/RISCV/gep.ll b/llvm/test/Analysis/CostModel/RISCV/gep.ll index c7a3e5d30aba7..be518faf7e051 100644 --- a/llvm/test/Analysis/CostModel/RISCV/gep.ll +++ b/llvm/test/Analysis/CostModel/RISCV/gep.ll @@ -20,7 +20,7 @@ define void @testi8(ptr %a, i32 %i) { ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile i8 undef, ptr %a6, align 1 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i8, ptr %a, i32 %i ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile i8 undef, ptr %ai, align 1 -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %a1 = getelementptr inbounds i8, ptr %a, i32 1 store volatile i8 undef, ptr %a1 @@ -55,7 +55,7 @@ define void @testi16(ptr %a, i32 %i) { ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile i16 undef, ptr %a6, align 2 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i16, ptr %a, i32 %i ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile i16 undef, ptr %ai, align 2 -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %a1 = getelementptr inbounds i16, ptr %a, i32 1 store volatile i16 undef, ptr %a1 @@ -90,7 +90,7 @@ define void @testi32(ptr %a, i32 %i) { ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile i32 undef, ptr %a6, align 4 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i32, ptr %a, i32 %i ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile i32 undef, ptr %ai, align 4 -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %a1 = getelementptr inbounds i32, ptr %a, i32 1 store volatile i32 undef, ptr %a1 @@ -143,7 +143,7 @@ define void @testfloat(ptr %a, i32 %i) { ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile float undef, ptr %a6, align 4 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, ptr %a, i32 %i ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile float undef, ptr %ai, align 4 -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %a1 = getelementptr inbounds float, ptr %a, i32 1 store volatile float undef, ptr %a1 @@ -178,7 +178,7 @@ define void @testdouble(ptr %a, i32 %i) { ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile double undef, ptr %a6, align 8 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds double, ptr %a, i32 %i ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile double undef, ptr %ai, align 8 -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %a1 = getelementptr inbounds double, ptr %a, i32 1 store volatile double undef, ptr %a1 @@ -223,7 +223,7 @@ define void @testvecs(i32 %i) { ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store volatile <4 x float> undef, ptr %c5, align 16 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c6 = getelementptr inbounds <4 x double>, ptr undef, i32 128 ; RVI-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store volatile <4 x double> undef, ptr %c6, align 32 -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %b0 = getelementptr inbounds <4 x i8>, ptr undef, i32 1 @@ -285,7 +285,7 @@ define void @non_foldable_vector_uses(ptr %base, <2 x ptr> %base.vec) { ; RVI-NEXT: Cost Model: Found an estimated cost of 12 for instruction: call void @llvm.vp.store.v2i8.p0(<2 x i8> undef, ptr %11, <2 x i1> undef, i32 undef) ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = getelementptr i8, ptr %base, i32 42 ; RVI-NEXT: Cost Model: Found an estimated cost of 12 for instruction: call void @llvm.experimental.vp.strided.store.v2i8.p0.i64(<2 x i8> undef, ptr %12, i64 undef, <2 x i1> undef, i32 undef) -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = getelementptr i8, ptr %base, i32 42 %x1 = load volatile <2 x i8>, ptr %1 @@ -355,7 +355,7 @@ define void @foldable_vector_uses(ptr %base, <2 x ptr> %base.vec) { ; RVI-NEXT: Cost Model: Found an estimated cost of 12 for instruction: call void @llvm.vp.store.v2i8.p0(<2 x i8> undef, ptr %11, <2 x i1> undef, i32 undef) ; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %12 = getelementptr i8, ptr %base, i32 0 ; RVI-NEXT: Cost Model: Found an estimated cost of 12 for instruction: call void @llvm.experimental.vp.strided.store.v2i8.p0.i64(<2 x i8> undef, ptr %12, i64 undef, <2 x i1> undef, i32 undef) -; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = getelementptr i8, ptr %base, i32 0 %x1 = load volatile <2 x i8>, ptr %1 diff --git a/llvm/test/Analysis/CostModel/RISCV/int-bit-manip.ll b/llvm/test/Analysis/CostModel/RISCV/int-bit-manip.ll index 393e924022da7..7bdcd477090c0 100644 --- a/llvm/test/Analysis/CostModel/RISCV/int-bit-manip.ll +++ b/llvm/test/Analysis/CostModel/RISCV/int-bit-manip.ll @@ -33,7 +33,7 @@ define void @bswap() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %28 = call @llvm.bswap.nxv4i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %29 = call @llvm.bswap.nxv8i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %30 = call @llvm.bswap.nxv16i64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i16 @llvm.bswap.i16(i16 undef) call <2 x i16> @llvm.bswap.v2i16(<2 x i16> undef) @@ -110,7 +110,7 @@ define void @bitreverse() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %38 = call @llvm.bitreverse.nxv4i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %39 = call @llvm.bitreverse.nxv8i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 104 for instruction: %40 = call @llvm.bitreverse.nxv16i64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.bitreverse.i8(i8 undef) call <2 x i8> @llvm.bitreverse.v2i8(<2 x i8> undef) @@ -197,7 +197,7 @@ define void @ctpop() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %38 = call @llvm.ctpop.nxv4i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %39 = call @llvm.ctpop.nxv8i64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %40 = call @llvm.ctpop.nxv16i64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.ctpop.i8(i8 undef) call <2 x i8> @llvm.ctpop.v2i8(<2 x i8> undef) @@ -271,7 +271,7 @@ define void @vp_bswap() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %25 = call @llvm.vp.bswap.nxv4i64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %26 = call @llvm.vp.bswap.nxv8i64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %27 = call @llvm.vp.bswap.nxv16i64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x i16> @llvm.vp.bswap.v2i16(<2 x i16> undef, <2 x i1> undef, i32 undef) call <4 x i16> @llvm.vp.bswap.v4i16(<4 x i16> undef, <4 x i1> undef, i32 undef) @@ -341,7 +341,7 @@ define void @vp_ctpop() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %34 = call @llvm.vp.ctpop.nxv4i64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %35 = call @llvm.vp.ctpop.nxv8i64( undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %36 = call @llvm.vp.ctpop.nxv16i64( undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x i16> @llvm.vp.ctpop.v2i16(<2 x i16> undef, <2 x i1> undef, i32 undef) call <4 x i16> @llvm.vp.ctpop.v4i16(<4 x i16> undef, <4 x i1> undef, i32 undef) @@ -433,7 +433,7 @@ define void @vp_ctlz() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %47 = call @llvm.vp.ctlz.nxv4i64( undef, i1 false, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %48 = call @llvm.vp.ctlz.nxv8i64( undef, i1 false, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 70 for instruction: %49 = call @llvm.vp.ctlz.nxv16i64( undef, i1 false, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x i8> @llvm.vp.ctlz.v2i8(<2 x i8> undef, i1 false, <2 x i1> undef, i32 undef) call <4 x i8> @llvm.vp.ctlz.v4i8(<4 x i8> undef, i1 false, <4 x i1> undef, i32 undef) @@ -538,7 +538,7 @@ define void @vp_cttz() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %47 = call @llvm.vp.cttz.nxv4i64( undef, i1 false, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %48 = call @llvm.vp.cttz.nxv8i64( undef, i1 false, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %49 = call @llvm.vp.cttz.nxv16i64( undef, i1 false, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x i8> @llvm.vp.cttz.v2i8(<2 x i8> undef, i1 false, <2 x i1> undef, i32 undef) call <4 x i8> @llvm.vp.cttz.v4i8(<4 x i8> undef, i1 false, <4 x i1> undef, i32 undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/int-min-max.ll b/llvm/test/Analysis/CostModel/RISCV/int-min-max.ll index eed7c1edda725..ec669c986c150 100644 --- a/llvm/test/Analysis/CostModel/RISCV/int-min-max.ll +++ b/llvm/test/Analysis/CostModel/RISCV/int-min-max.ll @@ -42,7 +42,7 @@ define void @smax() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.smax.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.smax.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.smax.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.smax.i8(i8 undef, i8 undef) call <2 x i8> @llvm.smax.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -127,7 +127,7 @@ define void @smin() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.smin.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.smin.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.smin.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.smin.i8(i8 undef, i8 undef) call <2 x i8> @llvm.smin.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -212,7 +212,7 @@ define void @umax() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.umax.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.umax.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.umax.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.umax.i8(i8 undef, i8 undef) call <2 x i8> @llvm.umax.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -297,7 +297,7 @@ define void @umin() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.umin.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.umin.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.umin.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.umin.i8(i8 undef, i8 undef) call <2 x i8> @llvm.umin.v2i8(<2 x i8> undef, <2 x i8> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll b/llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll index fc8b672c17181..541534d2778aa 100644 --- a/llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll +++ b/llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll @@ -38,7 +38,7 @@ define void @sadd.sat() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call @llvm.sadd.sat.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call @llvm.sadd.sat.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call @llvm.sadd.sat.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.sadd.sat.i8(i8 undef, i8 undef) call <2 x i8> @llvm.sadd.sat.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -115,7 +115,7 @@ define void @uadd.sat() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call @llvm.uadd.sat.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call @llvm.uadd.sat.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call @llvm.uadd.sat.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.uadd.sat.i8(i8 undef, i8 undef) call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -192,7 +192,7 @@ define void @usub.sat() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call @llvm.usub.sat.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call @llvm.usub.sat.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call @llvm.usub.sat.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.usub.sat.i8(i8 undef, i8 undef) call <2 x i8> @llvm.usub.sat.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -269,7 +269,7 @@ define void @ssub.sat() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call @llvm.ssub.sat.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call @llvm.ssub.sat.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call @llvm.ssub.sat.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.ssub.sat.i8(i8 undef, i8 undef) call <2 x i8> @llvm.ssub.sat.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -346,7 +346,7 @@ define void @ushl.sat() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %33 = call @llvm.ushl.sat.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %34 = call @llvm.ushl.sat.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %35 = call @llvm.ushl.sat.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.ushl.sat.i8(i8 undef, i8 undef) call <2 x i8> @llvm.ushl.sat.v2i8(<2 x i8> undef, <2 x i8> undef) @@ -423,7 +423,7 @@ define void @sshl.sat() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %33 = call @llvm.sshl.sat.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %34 = call @llvm.sshl.sat.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %35 = call @llvm.sshl.sat.nxv8i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.sshl.sat.i8(i8 undef, i8 undef) call <2 x i8> @llvm.sshl.sat.v2i8(<2 x i8> undef, <2 x i8> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/logicalop.ll b/llvm/test/Analysis/CostModel/RISCV/logicalop.ll index 921c1f3049fb9..891c53b535dc6 100644 --- a/llvm/test/Analysis/CostModel/RISCV/logicalop.ll +++ b/llvm/test/Analysis/CostModel/RISCV/logicalop.ll @@ -17,7 +17,7 @@ define void @op() { ; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %band = and i1 undef, undef ; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sor = select i1 undef, i1 true, i1 undef ; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %bor = or i1 undef, undef -; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-SIZE-LABEL: 'op' ; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sand = select i1 undef, i1 undef, i1 false @@ -40,7 +40,7 @@ define void @vecop() { ; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %band = and <4 x i1> undef, undef ; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sor = select <4 x i1> undef, <4 x i1> , <4 x i1> undef ; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bor = or <4 x i1> undef, undef -; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-SIZE-LABEL: 'vecop' ; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sand = select <4 x i1> undef, <4 x i1> undef, <4 x i1> zeroinitializer diff --git a/llvm/test/Analysis/CostModel/RISCV/masked_ldst.ll b/llvm/test/Analysis/CostModel/RISCV/masked_ldst.ll index 5f7357ef3d124..387e6e43bb348 100644 --- a/llvm/test/Analysis/CostModel/RISCV/masked_ldst.ll +++ b/llvm/test/Analysis/CostModel/RISCV/masked_ldst.ll @@ -21,7 +21,7 @@ define void @fixed() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = call <2 x double> @llvm.masked.load.v2f64.p0(ptr undef, i32 8, <2 x i1> undef, <2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64 = call <4 x i64> @llvm.masked.load.v4i64.p0(ptr undef, i32 8, <4 x i1> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %v32f16 = call <32 x half> @llvm.masked.load.v32f16.p0(ptr undef, i32 8, <32 x i1> undef, <32 x half> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; entry: ; fixed-width integer types @@ -72,7 +72,7 @@ define void @scalable() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv1i64 = call @llvm.masked.load.nxv1i64.p0(ptr undef, i32 8, undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64 = call @llvm.masked.load.nxv4i64.p0(ptr undef, i32 8, undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %nxv32f16 = call @llvm.masked.load.nxv32f16.p0(ptr undef, i32 8, undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; entry: ; scalable integer types diff --git a/llvm/test/Analysis/CostModel/RISCV/phi-const.ll b/llvm/test/Analysis/CostModel/RISCV/phi-const.ll index b2f1dea4e81e1..00ff1925fc06c 100644 --- a/llvm/test/Analysis/CostModel/RISCV/phi-const.ll +++ b/llvm/test/Analysis/CostModel/RISCV/phi-const.ll @@ -3,11 +3,11 @@ define i8 @phi_i8(i1 %c) { ; CHECK-LABEL: 'phi_i8' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi i8 [ 16, %a ], [ 32, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi i8 [ 16, %a ], [ 32, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x ; br i1 %c, label %a, label %b a: @@ -21,11 +21,11 @@ d: define i16 @phi_i16_small(i1 %c) { ; CHECK-LABEL: 'phi_i16_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi i16 [ 1, %a ], [ 2, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi i16 [ 1, %a ], [ 2, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x ; br i1 %c, label %a, label %b a: @@ -39,11 +39,11 @@ d: define i16 @phi_i16_large(i1 %c) { ; CHECK-LABEL: 'phi_i16_large' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi i16 [ 42, %a ], [ -7616, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi i16 [ 42, %a ], [ -7616, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x ; br i1 %c, label %a, label %b a: @@ -57,11 +57,11 @@ d: define i32 @phi_i32_small(i1 %c) { ; CHECK-LABEL: 'phi_i32_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi i32 [ 1, %a ], [ 2, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi i32 [ 1, %a ], [ 2, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x ; br i1 %c, label %a, label %b a: @@ -75,11 +75,11 @@ d: define i32 @phi_i32_large(i1 %c) { ; CHECK-LABEL: 'phi_i32_large' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi i32 [ 42, %a ], [ 123456, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi i32 [ 42, %a ], [ 123456, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x ; br i1 %c, label %a, label %b a: @@ -93,11 +93,11 @@ d: define i64 @phi_i64_small(i1 %c) { ; CHECK-LABEL: 'phi_i64_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi i64 [ 1, %a ], [ 2, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi i64 [ 1, %a ], [ 2, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x ; br i1 %c, label %a, label %b a: @@ -111,11 +111,11 @@ d: define i64 @phi_i64_large(i1 %c) { ; CHECK-LABEL: 'phi_i64_large' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi i64 [ 42, %a ], [ 123456, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi i64 [ 42, %a ], [ 123456, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x ; br i1 %c, label %a, label %b a: @@ -129,11 +129,11 @@ d: define half @phi_f16(i1 %c) { ; CHECK-LABEL: 'phi_f16' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi half [ 0xHE3CE, %a ], [ 0xH5144, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi half [ 0xHE3CE, %a ], [ 0xH5144, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %x ; br i1 %c, label %a, label %b a: @@ -147,11 +147,11 @@ d: define float @phi_f32(i1 %c) { ; CHECK-LABEL: 'phi_f32' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi float [ -9.990000e+02, %a ], [ 4.212500e+01, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi float [ -9.990000e+02, %a ], [ 4.212500e+01, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %x ; br i1 %c, label %a, label %b a: @@ -165,11 +165,11 @@ d: define double @phi_f64(i1 %c) { ; CHECK-LABEL: 'phi_f64' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi double [ -9.990000e+02, %a ], [ 4.212500e+01, %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi double [ -9.990000e+02, %a ], [ 4.212500e+01, %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %x ; br i1 %c, label %a, label %b a: diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-add.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-add.ll index 9c6041c8f71f2..6fe098628ea07 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-add.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-add.ll @@ -14,7 +14,7 @@ define i32 @reduce_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i1 @llvm.vector.reduce.add.v32i1(<32 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i1 @llvm.vector.reduce.add.v64i1(<64 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V128 = call i1 @llvm.vector.reduce.add.v128i1(<128 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.add.v1i1(<1 x i1> undef) @@ -48,7 +48,7 @@ define i32 @reduce_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.add.v1i8(<1 x i8> undef) @@ -82,7 +82,7 @@ define i32 @reduce_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.add.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.add.v1i16(<1 x i16> undef) @@ -116,7 +116,7 @@ define i32 @reduce_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.add.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.add.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.add.v1i32(<1 x i32> undef) @@ -150,7 +150,7 @@ define i32 @reduce_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.add.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.add.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.add.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-and.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-and.ll index df82a17c3c10d..3e2344bb41aa3 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-and.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-and.ll @@ -17,7 +17,7 @@ define i32 @reduce_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V256 = call i1 @llvm.vector.reduce.and.v256i1(<256 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512 = call i1 @llvm.vector.reduce.and.v512i1(<512 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V1024 = call i1 @llvm.vector.reduce.and.v1024i1(<1024 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.and.v1i1(<1 x i1> undef) @@ -57,7 +57,7 @@ define i32 @reduce_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.and.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.and.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.and.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.and.v1i8(<1 x i8> undef) @@ -91,7 +91,7 @@ define i32 @reduce_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.and.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.and.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.and.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.and.v1i16(<1 x i16> undef) @@ -125,7 +125,7 @@ define i32 @reduce_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.and.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.and.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.and.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.and.v1i32(<1 x i32> undef) @@ -159,7 +159,7 @@ define i32 @reduce_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.and.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.and.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.and.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.and.v1i64(<1 x i64> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-fadd.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-fadd.ll index 4be769ff5eff6..e8ef6e9220431 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-fadd.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-fadd.ll @@ -12,7 +12,7 @@ define void @reduce_fadd_half() { ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v32 = call fast half @llvm.vector.reduce.fadd.v32f16(half 0xH0000, <32 x half> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call fast half @llvm.vector.reduce.fadd.v64f16(half 0xH0000, <64 x half> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call fast half @llvm.vector.reduce.fadd.v128f16(half 0xH0000, <128 x half> undef) -; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIZE-LABEL: 'reduce_fadd_half' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call fast half @llvm.vector.reduce.fadd.v1f16(half 0xH0000, <1 x half> undef) @@ -46,7 +46,7 @@ define void @reduce_fadd_float() { ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v32 = call fast float @llvm.vector.reduce.fadd.v32f32(float 0.000000e+00, <32 x float> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call fast float @llvm.vector.reduce.fadd.v64f32(float 0.000000e+00, <64 x float> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call fast float @llvm.vector.reduce.fadd.v128f32(float 0.000000e+00, <128 x float> undef) -; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIZE-LABEL: 'reduce_fadd_float' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call fast float @llvm.vector.reduce.fadd.v1f32(float 0.000000e+00, <1 x float> undef) @@ -80,7 +80,7 @@ define void @reduce_fadd_double() { ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v32 = call fast double @llvm.vector.reduce.fadd.v32f64(double 0.000000e+00, <32 x double> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call fast double @llvm.vector.reduce.fadd.v64f64(double 0.000000e+00, <64 x double> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call fast double @llvm.vector.reduce.fadd.v128f64(double 0.000000e+00, <128 x double> undef) -; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIZE-LABEL: 'reduce_fadd_double' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call fast double @llvm.vector.reduce.fadd.v1f64(double 0.000000e+00, <1 x double> undef) @@ -114,7 +114,7 @@ define void @reduce_oredered_fadd_half() { ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %v32 = call half @llvm.vector.reduce.fadd.v32f16(half 0xH0000, <32 x half> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %V64 = call half @llvm.vector.reduce.fadd.v64f16(half 0xH0000, <64 x half> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 130 for instruction: %V128 = call half @llvm.vector.reduce.fadd.v128f16(half 0xH0000, <128 x half> undef) -; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIZE-LABEL: 'reduce_oredered_fadd_half' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call half @llvm.vector.reduce.fadd.v1f16(half 0xH0000, <1 x half> undef) @@ -148,7 +148,7 @@ define void @reduce_oredered_fadd_float() { ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %v32 = call float @llvm.vector.reduce.fadd.v32f32(float 0.000000e+00, <32 x float> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %V64 = call float @llvm.vector.reduce.fadd.v64f32(float 0.000000e+00, <64 x float> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %V128 = call float @llvm.vector.reduce.fadd.v128f32(float 0.000000e+00, <128 x float> undef) -; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIZE-LABEL: 'reduce_oredered_fadd_float' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call float @llvm.vector.reduce.fadd.v1f32(float 0.000000e+00, <1 x float> undef) @@ -182,7 +182,7 @@ define void @reduce_oredered_fadd_double() { ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %v32 = call double @llvm.vector.reduce.fadd.v32f64(double 0.000000e+00, <32 x double> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %V64 = call double @llvm.vector.reduce.fadd.v64f64(double 0.000000e+00, <64 x double> undef) ; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 133 for instruction: %V128 = call double @llvm.vector.reduce.fadd.v128f64(double 0.000000e+00, <128 x double> undef) -; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; FP-REDUCE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIZE-LABEL: 'reduce_oredered_fadd_double' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call double @llvm.vector.reduce.fadd.v1f64(double 0.000000e+00, <1 x double> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-max.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-max.ll index ba169459b2a45..c21b8520112cf 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-max.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-max.ll @@ -14,7 +14,7 @@ define i32 @reduce_umin_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.umax.v32i1(<32 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.umax.v64i1(<64 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.umax.v128i1(<128 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umin_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.umax.v1i1(<1 x i1> undef) @@ -48,7 +48,7 @@ define i32 @reduce_umax_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.umax.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.umax.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.umax.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umax_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.umax.v1i8(<1 x i8> undef) @@ -82,7 +82,7 @@ define i32 @reduce_umax_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.umax.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.umax.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.umax.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umax_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.umax.v1i16(<1 x i16> undef) @@ -116,7 +116,7 @@ define i32 @reduce_umax_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.umax.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.umax.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.umax.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umax_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.umax.v1i32(<1 x i32> undef) @@ -150,7 +150,7 @@ define i32 @reduce_umax_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.umax.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.umax.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.umax.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umax_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.umax.v1i64(<1 x i64> undef) @@ -184,7 +184,7 @@ define i32 @reduce_smin_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.smax.v32i1(<32 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.smax.v64i1(<64 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.smax.v128i1(<128 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smin_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.smax.v1i1(<1 x i1> undef) @@ -218,7 +218,7 @@ define i32 @reduce_smax_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.smax.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.smax.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.smax.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smax_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.smax.v1i8(<1 x i8> undef) @@ -252,7 +252,7 @@ define i32 @reduce_smax_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.smax.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.smax.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.smax.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smax_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.smax.v1i16(<1 x i16> undef) @@ -286,7 +286,7 @@ define i32 @reduce_smax_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.smax.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.smax.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.smax.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smax_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.smax.v1i32(<1 x i32> undef) @@ -320,7 +320,7 @@ define i32 @reduce_smax_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.smax.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.smax.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.smax.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smax_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.smax.v1i64(<1 x i64> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-min.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-min.ll index f4249f0152eef..941c3cf8a999c 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-min.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-min.ll @@ -14,7 +14,7 @@ define i32 @reduce_umin_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.umin.v32i1(<32 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.umin.v64i1(<64 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.umin.v128i1(<128 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umin_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.umin.v1i1(<1 x i1> undef) @@ -48,7 +48,7 @@ define i32 @reduce_umin_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.umin.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.umin.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.umin.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umin_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.umin.v1i8(<1 x i8> undef) @@ -82,7 +82,7 @@ define i32 @reduce_umin_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.umin.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.umin.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.umin.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umin_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.umin.v1i16(<1 x i16> undef) @@ -116,7 +116,7 @@ define i32 @reduce_umin_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.umin.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.umin.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.umin.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umin_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.umin.v1i32(<1 x i32> undef) @@ -150,7 +150,7 @@ define i32 @reduce_umin_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.umin.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.umin.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.umin.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_umin_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.umin.v1i64(<1 x i64> undef) @@ -184,7 +184,7 @@ define i32 @reduce_smin_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.smin.v32i1(<32 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.smin.v64i1(<64 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.smin.v128i1(<128 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smin_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.smin.v1i1(<1 x i1> undef) @@ -218,7 +218,7 @@ define i32 @reduce_smin_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.smin.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.smin.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.smin.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smin_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.smin.v1i8(<1 x i8> undef) @@ -252,7 +252,7 @@ define i32 @reduce_smin_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.smin.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.smin.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.smin.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smin_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.smin.v1i16(<1 x i16> undef) @@ -286,7 +286,7 @@ define i32 @reduce_smin_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.smin.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.smin.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.smin.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smin_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.smin.v1i32(<1 x i32> undef) @@ -320,7 +320,7 @@ define i32 @reduce_smin_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.smin.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.smin.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.smin.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_smin_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.smin.v1i64(<1 x i64> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-or.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-or.ll index 550b94a374654..fb23b46140d39 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-or.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-or.ll @@ -17,7 +17,7 @@ define i32 @reduce_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V256 = call i1 @llvm.vector.reduce.or.v256i1(<256 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V512 = call i1 @llvm.vector.reduce.or.v512i1(<512 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V1024 = call i1 @llvm.vector.reduce.or.v1024i1(<1024 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.or.v1i1(<1 x i1> undef) @@ -57,7 +57,7 @@ define i32 @reduce_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.or.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.or.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.or.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.or.v1i8(<1 x i8> undef) @@ -91,7 +91,7 @@ define i32 @reduce_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.or.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.or.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.or.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.or.v1i16(<1 x i16> undef) @@ -125,7 +125,7 @@ define i32 @reduce_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.or.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.or.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.or.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.or.v1i32(<1 x i32> undef) @@ -159,7 +159,7 @@ define i32 @reduce_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.or.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.or.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.or.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.or.v1i64(<1 x i64> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll index 764d7afddbcee..9636151257945 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll @@ -9,7 +9,7 @@ declare half @llvm.vector.reduce.fadd.nxv1f16(half, ) define half @vreduce_fadd_nxv1f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv1f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv1f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) @@ -22,7 +22,7 @@ define half @vreduce_fadd_nxv1f16( %v, half %s) { define half @vreduce_ord_fadd_nxv1f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv1f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) @@ -37,7 +37,7 @@ declare half @llvm.vector.reduce.fadd.nxv2f16(half, ) define half @vreduce_fadd_nxv2f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv2f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv2f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) @@ -50,7 +50,7 @@ define half @vreduce_fadd_nxv2f16( %v, half %s) { define half @vreduce_ord_fadd_nxv2f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv2f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) @@ -65,7 +65,7 @@ declare half @llvm.vector.reduce.fadd.nxv4f16(half, ) define half @vreduce_fadd_nxv4f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv4f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv4f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) @@ -78,7 +78,7 @@ define half @vreduce_fadd_nxv4f16( %v, half %s) { define half @vreduce_ord_fadd_nxv4f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv4f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) @@ -93,7 +93,7 @@ declare float @llvm.vector.reduce.fadd.nxv1f32(float, ) define float @vreduce_fadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv1f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) @@ -106,7 +106,7 @@ define float @vreduce_fadd_nxv1f32( %v, float %s) { define float @vreduce_ord_fadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv1f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) @@ -120,7 +120,7 @@ define float @vreduce_fwadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fwadd_nxv1f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -136,7 +136,7 @@ define float @vreduce_ord_fwadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv1f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -153,7 +153,7 @@ declare float @llvm.vector.reduce.fadd.nxv2f32(float, ) define float @vreduce_fadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv2f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) @@ -166,7 +166,7 @@ define float @vreduce_fadd_nxv2f32( %v, float %s) { define float @vreduce_ord_fadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv2f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) @@ -180,7 +180,7 @@ define float @vreduce_fwadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fwadd_nxv2f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -196,7 +196,7 @@ define float @vreduce_ord_fwadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv2f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -213,7 +213,7 @@ declare float @llvm.vector.reduce.fadd.nxv4f32(float, ) define float @vreduce_fadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv4f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) @@ -226,7 +226,7 @@ define float @vreduce_fadd_nxv4f32( %v, float %s) { define float @vreduce_ord_fadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv4f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) @@ -240,7 +240,7 @@ define float @vreduce_fwadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fwadd_nxv4f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -256,7 +256,7 @@ define float @vreduce_ord_fwadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv4f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -273,7 +273,7 @@ declare double @llvm.vector.reduce.fadd.nxv1f64(double, ) define double @vreduce_fadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv1f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) @@ -286,7 +286,7 @@ define double @vreduce_fadd_nxv1f64( %v, double %s) { define double @vreduce_ord_fadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv1f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) @@ -300,7 +300,7 @@ define double @vreduce_fwadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fwadd_nxv1f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -316,7 +316,7 @@ define double @vreduce_ord_fwadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv1f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -333,7 +333,7 @@ declare double @llvm.vector.reduce.fadd.nxv2f64(double, ) define double @vreduce_fadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv2f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) @@ -346,7 +346,7 @@ define double @vreduce_fadd_nxv2f64( %v, double %s) { define double @vreduce_ord_fadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv2f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) @@ -360,7 +360,7 @@ define double @vreduce_fwadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fwadd_nxv2f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -376,7 +376,7 @@ define double @vreduce_ord_fwadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv2f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -393,7 +393,7 @@ declare double @llvm.vector.reduce.fadd.nxv4f64(double, ) define double @vreduce_fadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fadd_nxv4f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) @@ -406,7 +406,7 @@ define double @vreduce_fadd_nxv4f64( %v, double %s) { define double @vreduce_ord_fadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_ord_fadd_nxv4f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) @@ -420,7 +420,7 @@ define double @vreduce_fwadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fwadd_nxv4f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -436,7 +436,7 @@ define double @vreduce_ord_fwadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv4f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to @@ -453,7 +453,7 @@ declare half @llvm.vector.reduce.fmin.nxv1f16() define half @vreduce_fmin_nxv1f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv1f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv1f16( %v) @@ -466,7 +466,7 @@ define half @vreduce_fmin_nxv1f16( %v) { define half @vreduce_fmin_nxv1f16_nonans( %v) #0 { ; CHECK-LABEL: 'vreduce_fmin_nxv1f16_nonans' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f16_nonans' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16( %v) @@ -479,7 +479,7 @@ define half @vreduce_fmin_nxv1f16_nonans( %v) #0 { define half @vreduce_fmin_nxv1f16_nonans_noinfs( %v) #1 { ; CHECK-LABEL: 'vreduce_fmin_nxv1f16_nonans_noinfs' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f16_nonans_noinfs' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16( %v) @@ -494,7 +494,7 @@ declare half @llvm.vector.reduce.fmin.nxv2f16() define half @vreduce_fmin_nxv2f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv2f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv2f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv2f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv2f16( %v) @@ -509,7 +509,7 @@ declare half @llvm.vector.reduce.fmin.nxv4f16() define half @vreduce_fmin_nxv4f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv4f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv4f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv4f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv4f16( %v) @@ -524,7 +524,7 @@ declare half @llvm.vector.reduce.fmin.nxv64f16() define half @vreduce_fmin_nxv64f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv64f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv64f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv64f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv64f16( %v) @@ -539,7 +539,7 @@ declare float @llvm.vector.reduce.fmin.nxv1f32() define float @vreduce_fmin_nxv1f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv1f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv1f32( %v) @@ -552,7 +552,7 @@ define float @vreduce_fmin_nxv1f32( %v) { define float @vreduce_fmin_nxv1f32_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f32_nonans' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f32_nonans' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32( %v) @@ -565,7 +565,7 @@ define float @vreduce_fmin_nxv1f32_nonans( %v) { define float @vreduce_fmin_nxv1f32_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f32_nonans_noinfs' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f32_nonans_noinfs' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32( %v) @@ -580,7 +580,7 @@ declare float @llvm.vector.reduce.fmin.nxv2f32() define float @vreduce_fmin_nxv2f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv2f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv2f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv2f32( %v) @@ -595,7 +595,7 @@ declare float @llvm.vector.reduce.fmin.nxv4f32() define float @vreduce_fmin_nxv4f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv4f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv4f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv4f32( %v) @@ -610,7 +610,7 @@ declare float @llvm.vector.reduce.fmin.nxv32f32() define float @vreduce_fmin_nxv32f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv32f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv32f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv32f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv32f32( %v) @@ -625,7 +625,7 @@ declare double @llvm.vector.reduce.fmin.nxv1f64() define double @vreduce_fmin_nxv1f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv1f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv1f64( %v) @@ -638,7 +638,7 @@ define double @vreduce_fmin_nxv1f64( %v) { define double @vreduce_fmin_nxv1f64_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f64_nonans' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f64_nonans' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64( %v) @@ -651,7 +651,7 @@ define double @vreduce_fmin_nxv1f64_nonans( %v) { define double @vreduce_fmin_nxv1f64_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f64_nonans_noinfs' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv1f64_nonans_noinfs' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64( %v) @@ -666,7 +666,7 @@ declare double @llvm.vector.reduce.fmin.nxv2f64() define double @vreduce_fmin_nxv2f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv2f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv2f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv2f64( %v) @@ -681,7 +681,7 @@ declare double @llvm.vector.reduce.fmin.nxv4f64() define double @vreduce_fmin_nxv4f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv4f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv4f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv4f64( %v) @@ -696,7 +696,7 @@ declare double @llvm.vector.reduce.fmin.nxv16f64() define double @vreduce_fmin_nxv16f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv16f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv16f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmin_nxv16f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv16f64( %v) @@ -711,7 +711,7 @@ declare half @llvm.vector.reduce.fmax.nxv1f16() define half @vreduce_fmax_nxv1f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv1f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv1f16( %v) @@ -724,7 +724,7 @@ define half @vreduce_fmax_nxv1f16( %v) { define half @vreduce_fmax_nxv1f16_nonans( %v) #0 { ; CHECK-LABEL: 'vreduce_fmax_nxv1f16_nonans' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f16_nonans' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16( %v) @@ -737,7 +737,7 @@ define half @vreduce_fmax_nxv1f16_nonans( %v) #0 { define half @vreduce_fmax_nxv1f16_nonans_noinfs( %v) #1 { ; CHECK-LABEL: 'vreduce_fmax_nxv1f16_nonans_noinfs' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f16_nonans_noinfs' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16( %v) @@ -752,7 +752,7 @@ declare half @llvm.vector.reduce.fmax.nxv2f16() define half @vreduce_fmax_nxv2f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv2f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv2f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv2f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv2f16( %v) @@ -767,7 +767,7 @@ declare half @llvm.vector.reduce.fmax.nxv4f16() define half @vreduce_fmax_nxv4f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv4f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv4f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv4f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv4f16( %v) @@ -782,7 +782,7 @@ declare half @llvm.vector.reduce.fmax.nxv64f16() define half @vreduce_fmax_nxv64f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv64f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv64f16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret half %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv64f16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv64f16( %v) @@ -797,7 +797,7 @@ declare float @llvm.vector.reduce.fmax.nxv1f32() define float @vreduce_fmax_nxv1f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv1f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv1f32( %v) @@ -810,7 +810,7 @@ define float @vreduce_fmax_nxv1f32( %v) { define float @vreduce_fmax_nxv1f32_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f32_nonans' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f32_nonans' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32( %v) @@ -823,7 +823,7 @@ define float @vreduce_fmax_nxv1f32_nonans( %v) { define float @vreduce_fmax_nxv1f32_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f32_nonans_noinfs' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f32_nonans_noinfs' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32( %v) @@ -838,7 +838,7 @@ declare float @llvm.vector.reduce.fmax.nxv2f32() define float @vreduce_fmax_nxv2f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv2f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv2f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv2f32( %v) @@ -853,7 +853,7 @@ declare float @llvm.vector.reduce.fmax.nxv4f32() define float @vreduce_fmax_nxv4f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv4f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv4f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv4f32( %v) @@ -868,7 +868,7 @@ declare float @llvm.vector.reduce.fmax.nxv32f32() define float @vreduce_fmax_nxv32f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv32f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv32f32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv32f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv32f32( %v) @@ -883,7 +883,7 @@ declare double @llvm.vector.reduce.fmax.nxv1f64() define double @vreduce_fmax_nxv1f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv1f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv1f64( %v) @@ -896,7 +896,7 @@ define double @vreduce_fmax_nxv1f64( %v) { define double @vreduce_fmax_nxv1f64_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f64_nonans' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f64_nonans' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64( %v) @@ -909,7 +909,7 @@ define double @vreduce_fmax_nxv1f64_nonans( %v) { define double @vreduce_fmax_nxv1f64_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f64_nonans_noinfs' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv1f64_nonans_noinfs' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64( %v) @@ -924,7 +924,7 @@ declare double @llvm.vector.reduce.fmax.nxv2f64() define double @vreduce_fmax_nxv2f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv2f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv2f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv2f64( %v) @@ -939,7 +939,7 @@ declare double @llvm.vector.reduce.fmax.nxv4f64() define double @vreduce_fmax_nxv4f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv4f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv4f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv4f64( %v) @@ -954,7 +954,7 @@ declare double @llvm.vector.reduce.fmax.nxv16f64() define double @vreduce_fmax_nxv16f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv16f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv16f64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret double %red ; ; SIZE-LABEL: 'vreduce_fmax_nxv16f64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv16f64( %v) @@ -967,7 +967,7 @@ define double @vreduce_fmax_nxv16f64( %v) { define float @vreduce_nsz_fadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_nsz_fadd_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %red ; ; SIZE-LABEL: 'vreduce_nsz_fadd_nxv1f32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll index 1ec20ff5f9c91..ca5b9774160e8 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll @@ -9,7 +9,7 @@ declare i8 @llvm.vector.reduce.add.nxv1i8() define signext i8 @vreduce_add_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_add_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8( %v) @@ -24,7 +24,7 @@ declare i8 @llvm.vector.reduce.umax.nxv1i8() define signext i8 @vreduce_umax_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8( %v) @@ -39,7 +39,7 @@ declare i8 @llvm.vector.reduce.smax.nxv1i8() define signext i8 @vreduce_smax_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8( %v) @@ -54,7 +54,7 @@ declare i8 @llvm.vector.reduce.umin.nxv1i8() define signext i8 @vreduce_umin_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8( %v) @@ -69,7 +69,7 @@ declare i8 @llvm.vector.reduce.smin.nxv1i8() define signext i8 @vreduce_smin_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8( %v) @@ -84,7 +84,7 @@ declare i8 @llvm.vector.reduce.and.nxv1i8() define signext i8 @vreduce_and_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_and_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8( %v) @@ -99,7 +99,7 @@ declare i8 @llvm.vector.reduce.or.nxv1i8() define signext i8 @vreduce_or_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_or_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8( %v) @@ -114,7 +114,7 @@ declare i8 @llvm.vector.reduce.xor.nxv1i8() define signext i8 @vreduce_xor_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8( %v) @@ -129,7 +129,7 @@ declare i8 @llvm.vector.reduce.add.nxv2i8() define signext i8 @vreduce_add_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_add_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8( %v) @@ -144,7 +144,7 @@ declare i8 @llvm.vector.reduce.umax.nxv2i8() define signext i8 @vreduce_umax_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8( %v) @@ -159,7 +159,7 @@ declare i8 @llvm.vector.reduce.smax.nxv2i8() define signext i8 @vreduce_smax_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8( %v) @@ -174,7 +174,7 @@ declare i8 @llvm.vector.reduce.umin.nxv2i8() define signext i8 @vreduce_umin_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8( %v) @@ -189,7 +189,7 @@ declare i8 @llvm.vector.reduce.smin.nxv2i8() define signext i8 @vreduce_smin_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8( %v) @@ -204,7 +204,7 @@ declare i8 @llvm.vector.reduce.and.nxv2i8() define signext i8 @vreduce_and_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_and_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8( %v) @@ -219,7 +219,7 @@ declare i8 @llvm.vector.reduce.or.nxv2i8() define signext i8 @vreduce_or_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_or_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8( %v) @@ -234,7 +234,7 @@ declare i8 @llvm.vector.reduce.xor.nxv2i8() define signext i8 @vreduce_xor_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8( %v) @@ -249,7 +249,7 @@ declare i8 @llvm.vector.reduce.add.nxv4i8() define signext i8 @vreduce_add_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_add_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8( %v) @@ -264,7 +264,7 @@ declare i8 @llvm.vector.reduce.umax.nxv4i8() define signext i8 @vreduce_umax_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8( %v) @@ -279,7 +279,7 @@ declare i8 @llvm.vector.reduce.smax.nxv4i8() define signext i8 @vreduce_smax_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8( %v) @@ -294,7 +294,7 @@ declare i8 @llvm.vector.reduce.umin.nxv4i8() define signext i8 @vreduce_umin_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8( %v) @@ -309,7 +309,7 @@ declare i8 @llvm.vector.reduce.smin.nxv4i8() define signext i8 @vreduce_smin_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8( %v) @@ -324,7 +324,7 @@ declare i8 @llvm.vector.reduce.and.nxv4i8() define signext i8 @vreduce_and_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_and_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8( %v) @@ -339,7 +339,7 @@ declare i8 @llvm.vector.reduce.or.nxv4i8() define signext i8 @vreduce_or_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_or_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8( %v) @@ -354,7 +354,7 @@ declare i8 @llvm.vector.reduce.xor.nxv4i8() define signext i8 @vreduce_xor_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8( %v) @@ -369,7 +369,7 @@ declare i16 @llvm.vector.reduce.add.nxv1i16() define signext i16 @vreduce_add_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_add_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %v) @@ -383,7 +383,7 @@ define signext i16 @vwreduce_add_nxv1i8( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -399,7 +399,7 @@ define signext i16 @vwreduce_uadd_nxv1i8( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv1i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -416,7 +416,7 @@ declare i16 @llvm.vector.reduce.umax.nxv1i16() define signext i16 @vreduce_umax_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16( %v) @@ -431,7 +431,7 @@ declare i16 @llvm.vector.reduce.smax.nxv1i16() define signext i16 @vreduce_smax_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16( %v) @@ -446,7 +446,7 @@ declare i16 @llvm.vector.reduce.umin.nxv1i16() define signext i16 @vreduce_umin_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16( %v) @@ -461,7 +461,7 @@ declare i16 @llvm.vector.reduce.smin.nxv1i16() define signext i16 @vreduce_smin_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16( %v) @@ -476,7 +476,7 @@ declare i16 @llvm.vector.reduce.and.nxv1i16() define signext i16 @vreduce_and_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_and_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16( %v) @@ -491,7 +491,7 @@ declare i16 @llvm.vector.reduce.or.nxv1i16() define signext i16 @vreduce_or_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_or_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16( %v) @@ -506,7 +506,7 @@ declare i16 @llvm.vector.reduce.xor.nxv1i16() define signext i16 @vreduce_xor_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16( %v) @@ -521,7 +521,7 @@ declare i16 @llvm.vector.reduce.add.nxv2i16() define signext i16 @vreduce_add_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_add_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %v) @@ -535,7 +535,7 @@ define signext i16 @vwreduce_add_nxv2i8( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -551,7 +551,7 @@ define signext i16 @vwreduce_uadd_nxv2i8( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv2i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -568,7 +568,7 @@ declare i16 @llvm.vector.reduce.umax.nxv2i16() define signext i16 @vreduce_umax_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16( %v) @@ -583,7 +583,7 @@ declare i16 @llvm.vector.reduce.smax.nxv2i16() define signext i16 @vreduce_smax_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16( %v) @@ -598,7 +598,7 @@ declare i16 @llvm.vector.reduce.umin.nxv2i16() define signext i16 @vreduce_umin_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16( %v) @@ -613,7 +613,7 @@ declare i16 @llvm.vector.reduce.smin.nxv2i16() define signext i16 @vreduce_smin_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16( %v) @@ -628,7 +628,7 @@ declare i16 @llvm.vector.reduce.and.nxv2i16() define signext i16 @vreduce_and_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_and_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16( %v) @@ -643,7 +643,7 @@ declare i16 @llvm.vector.reduce.or.nxv2i16() define signext i16 @vreduce_or_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_or_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16( %v) @@ -658,7 +658,7 @@ declare i16 @llvm.vector.reduce.xor.nxv2i16() define signext i16 @vreduce_xor_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16( %v) @@ -673,7 +673,7 @@ declare i16 @llvm.vector.reduce.add.nxv4i16() define signext i16 @vreduce_add_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_add_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %v) @@ -687,7 +687,7 @@ define signext i16 @vwreduce_add_nxv4i8( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -703,7 +703,7 @@ define signext i16 @vwreduce_uadd_nxv4i8( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv4i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -720,7 +720,7 @@ declare i16 @llvm.vector.reduce.umax.nxv4i16() define signext i16 @vreduce_umax_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16( %v) @@ -735,7 +735,7 @@ declare i16 @llvm.vector.reduce.smax.nxv4i16() define signext i16 @vreduce_smax_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16( %v) @@ -750,7 +750,7 @@ declare i16 @llvm.vector.reduce.umin.nxv4i16() define signext i16 @vreduce_umin_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16( %v) @@ -765,7 +765,7 @@ declare i16 @llvm.vector.reduce.smin.nxv4i16() define signext i16 @vreduce_smin_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16( %v) @@ -780,7 +780,7 @@ declare i16 @llvm.vector.reduce.and.nxv4i16() define signext i16 @vreduce_and_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_and_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16( %v) @@ -795,7 +795,7 @@ declare i16 @llvm.vector.reduce.or.nxv4i16() define signext i16 @vreduce_or_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_or_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16( %v) @@ -810,7 +810,7 @@ declare i16 @llvm.vector.reduce.xor.nxv4i16() define signext i16 @vreduce_xor_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16( %v) @@ -825,7 +825,7 @@ declare i32 @llvm.vector.reduce.add.nxv1i32() define signext i32 @vreduce_add_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_add_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %v) @@ -839,7 +839,7 @@ define signext i32 @vwreduce_add_nxv1i16( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -855,7 +855,7 @@ define signext i32 @vwreduce_uadd_nxv1i16( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv1i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to @@ -872,7 +872,7 @@ declare i32 @llvm.vector.reduce.umax.nxv1i32() define signext i32 @vreduce_umax_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32( %v) @@ -887,7 +887,7 @@ declare i32 @llvm.vector.reduce.smax.nxv1i32() define signext i32 @vreduce_smax_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32( %v) @@ -902,7 +902,7 @@ declare i32 @llvm.vector.reduce.umin.nxv1i32() define signext i32 @vreduce_umin_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32( %v) @@ -917,7 +917,7 @@ declare i32 @llvm.vector.reduce.smin.nxv1i32() define signext i32 @vreduce_smin_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32( %v) @@ -932,7 +932,7 @@ declare i32 @llvm.vector.reduce.and.nxv1i32() define signext i32 @vreduce_and_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_and_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32( %v) @@ -947,7 +947,7 @@ declare i32 @llvm.vector.reduce.or.nxv1i32() define signext i32 @vreduce_or_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_or_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32( %v) @@ -962,7 +962,7 @@ declare i32 @llvm.vector.reduce.xor.nxv1i32() define signext i32 @vreduce_xor_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32( %v) @@ -977,7 +977,7 @@ declare i32 @llvm.vector.reduce.add.nxv2i32() define signext i32 @vreduce_add_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_add_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %v) @@ -991,7 +991,7 @@ define signext i32 @vwreduce_add_nxv2i16( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -1007,7 +1007,7 @@ define signext i32 @vwreduce_uadd_nxv2i16( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv2i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to @@ -1024,7 +1024,7 @@ declare i32 @llvm.vector.reduce.umax.nxv2i32() define signext i32 @vreduce_umax_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32( %v) @@ -1039,7 +1039,7 @@ declare i32 @llvm.vector.reduce.smax.nxv2i32() define signext i32 @vreduce_smax_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32( %v) @@ -1054,7 +1054,7 @@ declare i32 @llvm.vector.reduce.umin.nxv2i32() define signext i32 @vreduce_umin_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32( %v) @@ -1069,7 +1069,7 @@ declare i32 @llvm.vector.reduce.smin.nxv2i32() define signext i32 @vreduce_smin_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32( %v) @@ -1084,7 +1084,7 @@ declare i32 @llvm.vector.reduce.and.nxv2i32() define signext i32 @vreduce_and_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_and_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32( %v) @@ -1099,7 +1099,7 @@ declare i32 @llvm.vector.reduce.or.nxv2i32() define signext i32 @vreduce_or_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_or_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32( %v) @@ -1114,7 +1114,7 @@ declare i32 @llvm.vector.reduce.xor.nxv2i32() define signext i32 @vreduce_xor_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32( %v) @@ -1129,7 +1129,7 @@ declare i32 @llvm.vector.reduce.add.nxv4i32() define signext i32 @vreduce_add_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_add_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %v) @@ -1143,7 +1143,7 @@ define signext i32 @vwreduce_add_nxv4i16( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -1159,7 +1159,7 @@ define signext i32 @vwreduce_uadd_nxv4i16( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv4i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to @@ -1176,7 +1176,7 @@ declare i32 @llvm.vector.reduce.umax.nxv4i32() define signext i32 @vreduce_umax_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32( %v) @@ -1191,7 +1191,7 @@ declare i32 @llvm.vector.reduce.smax.nxv4i32() define signext i32 @vreduce_smax_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32( %v) @@ -1206,7 +1206,7 @@ declare i32 @llvm.vector.reduce.umin.nxv4i32() define signext i32 @vreduce_umin_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32( %v) @@ -1221,7 +1221,7 @@ declare i32 @llvm.vector.reduce.smin.nxv4i32() define signext i32 @vreduce_smin_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32( %v) @@ -1236,7 +1236,7 @@ declare i32 @llvm.vector.reduce.and.nxv4i32() define signext i32 @vreduce_and_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_and_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32( %v) @@ -1251,7 +1251,7 @@ declare i32 @llvm.vector.reduce.or.nxv4i32() define signext i32 @vreduce_or_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_or_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32( %v) @@ -1266,7 +1266,7 @@ declare i32 @llvm.vector.reduce.xor.nxv4i32() define signext i32 @vreduce_xor_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32( %v) @@ -1281,7 +1281,7 @@ declare i64 @llvm.vector.reduce.add.nxv1i64() define i64 @vreduce_add_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_add_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %v) @@ -1295,7 +1295,7 @@ define i64 @vwreduce_add_nxv1i32( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -1311,7 +1311,7 @@ define i64 @vwreduce_uadd_nxv1i32( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv1i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to @@ -1328,7 +1328,7 @@ declare i64 @llvm.vector.reduce.umax.nxv1i64() define i64 @vreduce_umax_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64( %v) @@ -1343,7 +1343,7 @@ declare i64 @llvm.vector.reduce.smax.nxv1i64() define i64 @vreduce_smax_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64( %v) @@ -1358,7 +1358,7 @@ declare i64 @llvm.vector.reduce.umin.nxv1i64() define i64 @vreduce_umin_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64( %v) @@ -1373,7 +1373,7 @@ declare i64 @llvm.vector.reduce.smin.nxv1i64() define i64 @vreduce_smin_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64( %v) @@ -1388,7 +1388,7 @@ declare i64 @llvm.vector.reduce.and.nxv1i64() define i64 @vreduce_and_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_and_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64( %v) @@ -1403,7 +1403,7 @@ declare i64 @llvm.vector.reduce.or.nxv1i64() define i64 @vreduce_or_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_or_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64( %v) @@ -1418,7 +1418,7 @@ declare i64 @llvm.vector.reduce.xor.nxv1i64() define i64 @vreduce_xor_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv1i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64( %v) @@ -1433,7 +1433,7 @@ declare i64 @llvm.vector.reduce.add.nxv2i64() define i64 @vreduce_add_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_add_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %v) @@ -1447,7 +1447,7 @@ define i64 @vwreduce_add_nxv2i32( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -1463,7 +1463,7 @@ define i64 @vwreduce_uadd_nxv2i32( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv2i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to @@ -1480,7 +1480,7 @@ declare i64 @llvm.vector.reduce.umax.nxv2i64() define i64 @vreduce_umax_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64( %v) @@ -1495,7 +1495,7 @@ declare i64 @llvm.vector.reduce.smax.nxv2i64() define i64 @vreduce_smax_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64( %v) @@ -1510,7 +1510,7 @@ declare i64 @llvm.vector.reduce.umin.nxv2i64() define i64 @vreduce_umin_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64( %v) @@ -1525,7 +1525,7 @@ declare i64 @llvm.vector.reduce.smin.nxv2i64() define i64 @vreduce_smin_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64( %v) @@ -1540,7 +1540,7 @@ declare i64 @llvm.vector.reduce.and.nxv2i64() define i64 @vreduce_and_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_and_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64( %v) @@ -1555,7 +1555,7 @@ declare i64 @llvm.vector.reduce.or.nxv2i64() define i64 @vreduce_or_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_or_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64( %v) @@ -1570,7 +1570,7 @@ declare i64 @llvm.vector.reduce.xor.nxv2i64() define i64 @vreduce_xor_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv2i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64( %v) @@ -1585,7 +1585,7 @@ declare i64 @llvm.vector.reduce.add.nxv4i64() define i64 @vreduce_add_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_add_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %v) @@ -1599,7 +1599,7 @@ define i64 @vwreduce_add_nxv4i32( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vwreduce_add_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to @@ -1615,7 +1615,7 @@ define i64 @vwreduce_uadd_nxv4i32( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %e) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vwreduce_uadd_nxv4i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to @@ -1632,7 +1632,7 @@ declare i64 @llvm.vector.reduce.umax.nxv4i64() define i64 @vreduce_umax_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_umax_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64( %v) @@ -1647,7 +1647,7 @@ declare i64 @llvm.vector.reduce.smax.nxv4i64() define i64 @vreduce_smax_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_smax_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64( %v) @@ -1662,7 +1662,7 @@ declare i64 @llvm.vector.reduce.umin.nxv4i64() define i64 @vreduce_umin_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_umin_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64( %v) @@ -1677,7 +1677,7 @@ declare i64 @llvm.vector.reduce.smin.nxv4i64() define i64 @vreduce_smin_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_smin_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64( %v) @@ -1692,7 +1692,7 @@ declare i64 @llvm.vector.reduce.and.nxv4i64() define i64 @vreduce_and_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_and_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64( %v) @@ -1707,7 +1707,7 @@ declare i64 @llvm.vector.reduce.or.nxv4i64() define i64 @vreduce_or_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_or_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64( %v) @@ -1722,7 +1722,7 @@ declare i64 @llvm.vector.reduce.xor.nxv4i64() define i64 @vreduce_xor_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64( %v) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red ; ; SIZE-LABEL: 'vreduce_xor_nxv4i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64( %v) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-xor.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-xor.ll index 26ba885fcaa82..b79cdb87a06a0 100644 --- a/llvm/test/Analysis/CostModel/RISCV/reduce-xor.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-xor.ll @@ -14,7 +14,7 @@ define i32 @reduce_i1(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i1 @llvm.vector.reduce.xor.v32i1(<32 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i1 @llvm.vector.reduce.xor.v64i1(<64 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V128 = call i1 @llvm.vector.reduce.xor.v128i1(<128 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i1' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.xor.v1i1(<1 x i1> undef) @@ -48,7 +48,7 @@ define i32 @reduce_i8(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i8 @llvm.vector.reduce.xor.v32i8(<32 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.xor.v64i8(<64 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.xor.v128i8(<128 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i8' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.xor.v1i8(<1 x i8> undef) @@ -82,7 +82,7 @@ define i32 @reduce_i16(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i16 @llvm.vector.reduce.xor.v32i16(<32 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.xor.v64i16(<64 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.xor.v128i16(<128 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i16' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.xor.v1i16(<1 x i16> undef) @@ -116,7 +116,7 @@ define i32 @reduce_i32(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i32 @llvm.vector.reduce.xor.v32i32(<32 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.xor.v64i32(<64 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.xor.v128i32(<128 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i32' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.xor.v1i32(<1 x i32> undef) @@ -150,7 +150,7 @@ define i32 @reduce_i64(i32 %arg) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i64 @llvm.vector.reduce.xor.v32i64(<32 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.xor.v64i64(<64 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.xor.v128i64(<128 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'reduce_i64' ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.xor.v1i64(<1 x i64> undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-cmp.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-cmp.ll index d335bd92c5786..27d24faf0a8da 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-cmp.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-cmp.ll @@ -41,7 +41,7 @@ define void @icmp_eq() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp eq undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp eq undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp eq undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp eq <2 x i8> undef, undef %v4i8 = icmp eq <4 x i8> undef, undef @@ -128,7 +128,7 @@ define void @icmp_ne() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ne undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ne undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ne undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp ne <2 x i8> undef, undef %v4i8 = icmp ne <4 x i8> undef, undef @@ -215,7 +215,7 @@ define void @icmp_ugt() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ugt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ugt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ugt undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp ugt <2 x i8> undef, undef %v4i8 = icmp ugt <4 x i8> undef, undef @@ -302,7 +302,7 @@ define void @icmp_uge() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp uge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp uge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp uge undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp uge <2 x i8> undef, undef %v4i8 = icmp uge <4 x i8> undef, undef @@ -389,7 +389,7 @@ define void @icmp_ult() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ult undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ult undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ult undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp ult <2 x i8> undef, undef %v4i8 = icmp ult <4 x i8> undef, undef @@ -476,7 +476,7 @@ define void @icmp_ule() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp ule undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp ule undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp ule undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp ule <2 x i8> undef, undef %v4i8 = icmp ule <4 x i8> undef, undef @@ -563,7 +563,7 @@ define void @icmp_sgt() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp sgt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp sgt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp sgt undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp sgt <2 x i8> undef, undef %v4i8 = icmp sgt <4 x i8> undef, undef @@ -650,7 +650,7 @@ define void @icmp_sge() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp sge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp sge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp sge undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp sge <2 x i8> undef, undef %v4i8 = icmp sge <4 x i8> undef, undef @@ -737,7 +737,7 @@ define void @icmp_slt() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp slt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp slt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp slt undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp slt <2 x i8> undef, undef %v4i8 = icmp slt <4 x i8> undef, undef @@ -824,7 +824,7 @@ define void @icmp_sle() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64 = icmp sle undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64 = icmp sle undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64 = icmp sle undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = icmp sle <2 x i8> undef, undef %v4i8 = icmp sle <4 x i8> undef, undef @@ -900,7 +900,7 @@ define void @fcmp_oeq() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp oeq undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp oeq undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp oeq undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp oeq <2 x half> undef, undef %v4f16 = fcmp oeq <4 x half> undef, undef @@ -963,7 +963,7 @@ define void @fcmp_one() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp one undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp one undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp one undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp one <2 x half> undef, undef %v4f16 = fcmp one <4 x half> undef, undef @@ -1026,7 +1026,7 @@ define void @fcmp_olt() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp olt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp olt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp olt undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp olt <2 x half> undef, undef %v4f16 = fcmp olt <4 x half> undef, undef @@ -1089,7 +1089,7 @@ define void @fcmp_ole() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ole undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ole undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ole undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp ole <2 x half> undef, undef %v4f16 = fcmp ole <4 x half> undef, undef @@ -1152,7 +1152,7 @@ define void @fcmp_ogt() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ogt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ogt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ogt undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp ogt <2 x half> undef, undef %v4f16 = fcmp ogt <4 x half> undef, undef @@ -1215,7 +1215,7 @@ define void @fcmp_oge() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp oge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp oge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp oge undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp oge <2 x half> undef, undef %v4f16 = fcmp oge <4 x half> undef, undef @@ -1278,7 +1278,7 @@ define void @fcmp_ueq() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ueq undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ueq undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ueq undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp ueq <2 x half> undef, undef %v4f16 = fcmp ueq <4 x half> undef, undef @@ -1341,7 +1341,7 @@ define void @fcmp_une() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp une undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp une undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp une undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp une <2 x half> undef, undef %v4f16 = fcmp une <4 x half> undef, undef @@ -1404,7 +1404,7 @@ define void @fcmp_ult() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ult undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ult undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ult undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp ult <2 x half> undef, undef %v4f16 = fcmp ult <4 x half> undef, undef @@ -1467,7 +1467,7 @@ define void @fcmp_ule() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ule undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ule undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ule undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp ule <2 x half> undef, undef %v4f16 = fcmp ule <4 x half> undef, undef @@ -1530,7 +1530,7 @@ define void @fcmp_ugt() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp ugt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp ugt undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp ugt undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp ugt <2 x half> undef, undef %v4f16 = fcmp ugt <4 x half> undef, undef @@ -1593,7 +1593,7 @@ define void @fcmp_uge() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64 = fcmp uge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64 = fcmp uge undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64 = fcmp uge undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16 = fcmp uge <2 x half> undef, undef %v4f16 = fcmp uge <4 x half> undef, undef diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll index c73ffa340d62b..e33beaac4f421 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll @@ -170,7 +170,7 @@ define void @extractelement_int(i32 %x) { ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_int' ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 @@ -335,7 +335,7 @@ define void @extractelement_int(i32 %x) { ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'extractelement_int' ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 @@ -500,7 +500,7 @@ define void @extractelement_int(i32 %x) { ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = extractelement undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'extractelement_int' ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 @@ -665,7 +665,7 @@ define void @extractelement_int(i32 %x) { ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = extractelement undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i1_0 = extractelement <2 x i1> undef, i32 0 %v4i1_0 = extractelement <4 x i1> undef, i32 0 @@ -879,7 +879,7 @@ define void @extractelement_int_lmul(i32 %x) { ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_int_lmul' ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 @@ -896,7 +896,7 @@ define void @extractelement_int_lmul(i32 %x) { ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'extractelement_int_lmul' ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 @@ -913,7 +913,7 @@ define void @extractelement_int_lmul(i32 %x) { ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'extractelement_int_lmul' ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 @@ -930,7 +930,7 @@ define void @extractelement_int_lmul(i32 %x) { ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v128i8_31 = extractelement <128 x i8> undef, i32 31 %v128i8_63 = extractelement <128 x i8> undef, i32 63 @@ -1046,7 +1046,7 @@ define void @extractelement_fp(i32 %x) { ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_fp' ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0 @@ -1139,7 +1139,7 @@ define void @extractelement_fp(i32 %x) { ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'extractelement_fp' ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0 @@ -1232,7 +1232,7 @@ define void @extractelement_fp(i32 %x) { ; RV32ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv4f64_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv8f64_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv16f64_x = extractelement undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'extractelement_fp' ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0 @@ -1325,7 +1325,7 @@ define void @extractelement_fp(i32 %x) { ; RV64ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv4f64_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv8f64_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv16f64_x = extractelement undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16_0 = extractelement <2 x half> undef, i32 0 %v4f16_0 = extractelement <4 x half> undef, i32 0 diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll index 125580f67b876..a193857e6e0f8 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll @@ -170,7 +170,7 @@ define void @insertelement_int(i32 %x) { ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_int' ; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 @@ -335,7 +335,7 @@ define void @insertelement_int(i32 %x) { ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'insertelement_int' ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 @@ -500,7 +500,7 @@ define void @insertelement_int(i32 %x) { ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'insertelement_int' ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 @@ -665,7 +665,7 @@ define void @insertelement_int(i32 %x) { ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 @@ -879,7 +879,7 @@ define void @insertelement_int_lmul(i32 %x) { ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_int_lmul' ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 @@ -896,7 +896,7 @@ define void @insertelement_int_lmul(i32 %x) { ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'insertelement_int_lmul' ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 @@ -913,7 +913,7 @@ define void @insertelement_int_lmul(i32 %x) { ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'insertelement_int_lmul' ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 @@ -930,7 +930,7 @@ define void @insertelement_int_lmul(i32 %x) { ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63 @@ -1046,7 +1046,7 @@ define void @insertelement_fp(i32 %x) { ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4f64_x = insertelement undef, double undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f64_x = insertelement undef, double undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_fp' ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 @@ -1139,7 +1139,7 @@ define void @insertelement_fp(i32 %x) { ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4f64_x = insertelement undef, double undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f64_x = insertelement undef, double undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64V-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'insertelement_fp' ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 @@ -1232,7 +1232,7 @@ define void @insertelement_fp(i32 %x) { ; RV32ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv4f64_x = insertelement undef, double undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv8f64_x = insertelement undef, double undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'insertelement_fp' ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 @@ -1325,7 +1325,7 @@ define void @insertelement_fp(i32 %x) { ; RV64ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv4f64_x = insertelement undef, double undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv8f64_x = insertelement undef, double undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Invalid cost for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0 diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-intrinsics.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-intrinsics.ll index 6dcc218981f7a..93de623cf1c6d 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-intrinsics.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-intrinsics.ll @@ -5,7 +5,7 @@ define void @unsupported_fp_ops( %vec, i32 %extraarg) { ; CHECK-LABEL: 'unsupported_fp_ops' ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %pow = call @llvm.pow.nxv4f32( %vec, %vec) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %powi = call @llvm.powi.nxv4f32.i32( %vec, i32 %extraarg) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %pow = call @llvm.pow.nxv4f32( %vec, %vec) @@ -16,7 +16,7 @@ define void @unsupported_fp_ops( %vec, i32 %extraarg) { define void @powi( %vec) { ; CHECK-LABEL: 'powi' ; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %powi = call @llvm.powi.nxv4f32.i32( %vec, i32 42) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %powi = call @llvm.powi.nxv4f32.i32( %vec, i32 42) ret void @@ -25,7 +25,7 @@ define void @powi( %vec) { define void @fshr( %a, %b, %c) { ; CHECK-LABEL: 'fshr' ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %1 = call @llvm.fshr.nxv1i32( %a, %b, %c) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call @llvm.fshr.nxv4i32( %a, %b, %c) ret void @@ -34,7 +34,7 @@ define void @fshr( %a, %b, %a, %b, %c) { ; CHECK-LABEL: 'fshl' ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %1 = call @llvm.fshl.nxv1i32( %a, %b, %c) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call @llvm.fshl.nxv4i32( %a, %b, %c) ret void @@ -80,7 +80,7 @@ define void @vp_fshr() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %36 = call @llvm.vp.fshr.nxv2i64( undef, undef, undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %37 = call @llvm.vp.fshr.nxv4i64( undef, undef, undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %38 = call @llvm.vp.fshr.nxv8i64( undef, undef, undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x i8> @llvm.vp.fshr.v2i8(<2 x i8> undef, <2 x i8> undef, <2 x i8> undef, <2 x i1> undef, i32 undef) call <4 x i8> @llvm.vp.fshr.v4i8(<4 x i8> undef, <4 x i8> undef, <4 x i8> undef, <4 x i1> undef, i32 undef) @@ -163,7 +163,7 @@ define void @vp_fshl() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %36 = call @llvm.vp.fshl.nxv2i64( undef, undef, undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %37 = call @llvm.vp.fshl.nxv4i64( undef, undef, undef, undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %38 = call @llvm.vp.fshl.nxv8i64( undef, undef, undef, undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call <2 x i8> @llvm.vp.fshl.v2i8(<2 x i8> undef, <2 x i8> undef, <2 x i8> undef, <2 x i1> undef, i32 undef) call <4 x i8> @llvm.vp.fshl.v4i8(<4 x i8> undef, <4 x i8> undef, <4 x i8> undef, <4 x i1> undef, i32 undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-load-store.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-load-store.ll index 3c988083bf9db..df02b5374f770 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-load-store.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-load-store.ll @@ -70,7 +70,7 @@ define void @load(ptr %p) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %63 = load , ptr %p, align 64 ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %64 = load , ptr %p, align 128 ; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %65 = load , ptr %p, align 256 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; load i8, ptr %p load <1 x i8>, ptr %p @@ -213,7 +213,7 @@ define void @store(ptr %p) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store undef, ptr %p, align 64 ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store undef, ptr %p, align 128 ; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store undef, ptr %p, align 256 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; store i8 undef, ptr %p store <1 x i8> undef, ptr %p @@ -308,7 +308,7 @@ define void @store_of_constant(ptr %p) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> , ptr %p, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> , ptr %p, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> , ptr %p, align 16 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; poison and undef diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-phi-const.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-phi-const.ll index 6a0137faad1e1..67b99f573aad2 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-phi-const.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-phi-const.ll @@ -3,11 +3,11 @@ define <2 x i8> @phi_v2i8_small(i1 %c) { ; CHECK-LABEL: 'phi_v2i8_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <2 x i8> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i8> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <2 x i8> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i8> %x ; br i1 %c, label %a, label %b a: @@ -21,11 +21,11 @@ d: define <4 x i8> @phi_v4i8_splat(i1 %c) { ; CHECK-LABEL: 'phi_v4i8_splat' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i8> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x ; br i1 %c, label %a, label %b a: @@ -39,11 +39,11 @@ d: define <4 x i8> @phi_v4i8_small(i1 %c) { ; CHECK-LABEL: 'phi_v4i8_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i8> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x ; br i1 %c, label %a, label %b a: @@ -57,11 +57,11 @@ d: define <4 x i8> @phi_v4i8_large(i1 %c) { ; CHECK-LABEL: 'phi_v4i8_large' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i8> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x ; br i1 %c, label %a, label %b a: @@ -76,11 +76,11 @@ d: ; The cost should be conservative and assume it will need to materialize the more expensive constant define <4 x i8> @phi_v4i8_cheap_and_expensive(i1 %c) { ; CHECK-LABEL: 'phi_v4i8_cheap_and_expensive' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i8> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x ; br i1 %c, label %a, label %b a: @@ -94,11 +94,11 @@ d: define <4 x i16> @phi_v4i16_splat(i1 %c) { ; CHECK-LABEL: 'phi_v4i16_splat' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x ; br i1 %c, label %a, label %b a: @@ -112,11 +112,11 @@ d: define <4 x i16> @phi_v4i16_small(i1 %c) { ; CHECK-LABEL: 'phi_v4i16_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x ; br i1 %c, label %a, label %b a: @@ -130,11 +130,11 @@ d: define <4 x i16> @phi_v4i16_large(i1 %c) { ; CHECK-LABEL: 'phi_v4i16_large' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x ; br i1 %c, label %a, label %b a: @@ -149,11 +149,11 @@ d: ; The cost should be conservative and assume it will need to materialize the more expensive constant define <4 x i16> @phi_v4i16_cheap_and_expensive(i1 %c) { ; CHECK-LABEL: 'phi_v4i16_cheap_and_expensive' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x ; br i1 %c, label %a, label %b a: @@ -167,11 +167,11 @@ d: define <4 x i32> @phi_v4i32_splat(i1 %c) { ; CHECK-LABEL: 'phi_v4i32_splat' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x ; br i1 %c, label %a, label %b a: @@ -185,11 +185,11 @@ d: define <4 x i32> @phi_v4i32_small(i1 %c) { ; CHECK-LABEL: 'phi_v4i32_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x ; br i1 %c, label %a, label %b a: @@ -203,11 +203,11 @@ d: define <4 x i32> @phi_v4i32_large(i1 %c) { ; CHECK-LABEL: 'phi_v4i32_large' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x ; br i1 %c, label %a, label %b a: @@ -222,11 +222,11 @@ d: ; The cost should be conservative and assume it will need to materialize the more expensive constant define <4 x i32> @phi_v4i32_cheap_and_expensive(i1 %c) { ; CHECK-LABEL: 'phi_v4i32_cheap_and_expensive' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x ; br i1 %c, label %a, label %b a: @@ -240,11 +240,11 @@ d: define <4 x i64> @phi_v4i64_splat(i1 %c) { ; CHECK-LABEL: 'phi_v4i64_splat' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x ; br i1 %c, label %a, label %b a: @@ -258,11 +258,11 @@ d: define <4 x i64> @phi_v4i64_small(i1 %c) { ; CHECK-LABEL: 'phi_v4i64_small' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x ; br i1 %c, label %a, label %b a: @@ -276,11 +276,11 @@ d: define <4 x i64> @phi_v4i64_large(i1 %c) { ; CHECK-LABEL: 'phi_v4i64_large' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x ; br i1 %c, label %a, label %b a: @@ -295,11 +295,11 @@ d: ; The cost should be conservative and assume it will need to materialize the more expensive constant define <4 x i64> @phi_v4i64_cheap_and_expensive(i1 %c) { ; CHECK-LABEL: 'phi_v4i64_cheap_and_expensive' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x ; br i1 %c, label %a, label %b a: @@ -313,11 +313,11 @@ d: define <4 x half> @phi_v4f16_splat(i1 %c) { ; CHECK-LABEL: 'phi_v4f16_splat' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x half> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %x ; br i1 %c, label %a, label %b a: @@ -331,11 +331,11 @@ d: define <4 x half> @phi_v4f16(i1 %c) { ; CHECK-LABEL: 'phi_v4f16' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x half> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %x ; br i1 %c, label %a, label %b a: @@ -350,11 +350,11 @@ d: ; The cost should be conservative and assume it will need to materialize the more expensive constant define <4 x half> @phi_v4f16_cheap_and_expensive(i1 %c) { ; CHECK-LABEL: 'phi_v4f16_cheap_and_expensive' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x half> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %x ; br i1 %c, label %a, label %b a: @@ -368,11 +368,11 @@ d: define <4 x float> @phi_v4f32_splat(i1 %c) { ; CHECK-LABEL: 'phi_v4f32_splat' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x float> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %x ; br i1 %c, label %a, label %b a: @@ -386,11 +386,11 @@ d: define <4 x float> @phi_v4f32(i1 %c) { ; CHECK-LABEL: 'phi_v4f32' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x float> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %x ; br i1 %c, label %a, label %b a: @@ -405,11 +405,11 @@ d: ; The cost should be conservative and assume it will need to materialize the more expensive constant define <4 x float> @phi_v4f32_cheap_and_expensive(i1 %c) { ; CHECK-LABEL: 'phi_v4f32_cheap_and_expensive' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x float> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %x ; br i1 %c, label %a, label %b a: @@ -423,11 +423,11 @@ d: define <4 x double> @phi_v4f64_splat(i1 %c) { ; CHECK-LABEL: 'phi_v4f64_splat' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x double> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %x ; br i1 %c, label %a, label %b a: @@ -441,11 +441,11 @@ d: define <4 x double> @phi_v4f64(i1 %c) { ; CHECK-LABEL: 'phi_v4f64' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x double> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %x ; br i1 %c, label %a, label %b a: @@ -460,11 +460,11 @@ d: ; The cost should be conservative and assume it will need to materialize the more expensive constant define <4 x double> @phi_v4f64_cheap_and_expensive(i1 %c) { ; CHECK-LABEL: 'phi_v4f64_cheap_and_expensive' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %c, label %a, label %b -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %d -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = phi <4 x double> [ , %a ], [ , %b ] -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %x +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ , %a ], [ , %b ] +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %x ; br i1 %c, label %a, label %b a: diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll index abec990c7aa98..264a74116449a 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-select.ll @@ -130,7 +130,7 @@ define void @select() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %123 = select undef, undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %124 = select undef, undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %125 = select undef, undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; select i1 undef, i1 undef, i1 undef select i1 undef, <1 x i1> undef, <1 x i1> undef diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-shuffle.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-shuffle.ll index a55d7388444db..e6e0a4c7ae8fb 100644 --- a/llvm/test/Analysis/CostModel/RISCV/rvv-shuffle.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-shuffle.ll @@ -17,7 +17,7 @@ define void @vector_broadcast() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %9 = shufflevector undef, undef, zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %10 = shufflevector undef, undef, zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %11 = shufflevector undef, undef, zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %zero = shufflevector undef, undef, zeroinitializer %1 = shufflevector undef, undef, zeroinitializer @@ -40,7 +40,7 @@ define void @vector_insert_extract( %v0, % ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %insert_fixed_into_scalable = call @llvm.vector.insert.nxv4i32.v16i32( %v0, <16 x i32> %v2, i64 0) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %extract_scalable_from_scalable = call @llvm.vector.extract.nxv4i32.nxv16i32( %v1, i64 0) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert_scalable_into_scalable = call @llvm.vector.insert.nxv16i32.nxv4i32( %v1, %v0, i64 0) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %extract_fixed_from_scalable = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32( %v0, i64 0) %insert_fixed_into_scalable = call @llvm.vector.insert.nxv4i32.v16i32( %v0, <16 x i32> %v2, i64 0) @@ -72,7 +72,7 @@ define void @vector_reverse() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %reverse_nxv8i1 = call @llvm.experimental.vector.reverse.nxv8i1( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %reverse_nxv4i1 = call @llvm.experimental.vector.reverse.nxv4i1( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %reverse_nxv2i1 = call @llvm.experimental.vector.reverse.nxv2i1( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %reverse_nxv16i8 = call @llvm.experimental.vector.reverse.nxv16i8( undef) %reverse_nxv32i8 = call @llvm.experimental.vector.reverse.nxv32i8( undef) @@ -129,7 +129,7 @@ define void @vector_splice() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splice_nxv8i1 = call @llvm.experimental.vector.splice.nxv8i1( zeroinitializer, zeroinitializer, i32 1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splice_nxv4i1 = call @llvm.experimental.vector.splice.nxv4i1( zeroinitializer, zeroinitializer, i32 1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splice_nxv2i1 = call @llvm.experimental.vector.splice.nxv2i1( zeroinitializer, zeroinitializer, i32 1) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %splice_nxv16i8 = call @llvm.experimental.vector.splice.nxv16i8( zeroinitializer, zeroinitializer, i32 1) %splice_nxv32i8 = call @llvm.experimental.vector.splice.nxv32i8( zeroinitializer, zeroinitializer, i32 1) diff --git a/llvm/test/Analysis/CostModel/RISCV/scalable-gather.ll b/llvm/test/Analysis/CostModel/RISCV/scalable-gather.ll index f0d76b5a8ddd9..3307ed32d4f36 100644 --- a/llvm/test/Analysis/CostModel/RISCV/scalable-gather.ll +++ b/llvm/test/Analysis/CostModel/RISCV/scalable-gather.ll @@ -46,7 +46,7 @@ define void @masked_gather_aligned() { ; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0.nxv4p0( undef, i32 8, undef, undef) ; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0.nxv2p0( undef, i32 8, undef, undef) ; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0.nxv1p0( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; GENERIC-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; MAX256-LABEL: 'masked_gather_aligned' ; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0( undef, i32 8, undef, undef) @@ -90,7 +90,7 @@ define void @masked_gather_aligned() { ; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0.nxv4p0( undef, i32 8, undef, undef) ; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0.nxv2p0( undef, i32 8, undef, undef) ; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0.nxv1p0( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; MAX256-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; UNSUPPORTED-LABEL: 'masked_gather_aligned' ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0( undef, i32 8, undef, undef) @@ -134,7 +134,7 @@ define void @masked_gather_aligned() { ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0.nxv4p0( undef, i32 8, undef, undef) ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0.nxv2p0( undef, i32 8, undef, undef) ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0.nxv1p0( undef, i32 8, undef, undef) -; UNSUPPORTED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; UNSUPPORTED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0( undef, i32 8, undef, undef) %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0( undef, i32 8, undef, undef) @@ -224,7 +224,7 @@ define void @masked_gather_unaligned() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0.nxv4p0( undef, i32 1, undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0.nxv2p0( undef, i32 1, undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0.nxv1p0( undef, i32 1, undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V8F64.u = call @llvm.masked.gather.nxv8f64.nxv8p0( undef, i32 2, undef, undef) %V4F64.u = call @llvm.masked.gather.nxv4f64.nxv4p0( undef, i32 2, undef, undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/scalable-scatter.ll b/llvm/test/Analysis/CostModel/RISCV/scalable-scatter.ll index 264c48e2419a8..4476c313c2b60 100644 --- a/llvm/test/Analysis/CostModel/RISCV/scalable-scatter.ll +++ b/llvm/test/Analysis/CostModel/RISCV/scalable-scatter.ll @@ -46,7 +46,7 @@ define void @masked_scatter_aligned() { ; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4p0.nxv4p0( undef, undef, i32 8, undef) ; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2p0.nxv2p0( undef, undef, i32 8, undef) ; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1p0.nxv1p0( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; GENERIC-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; MAX256-LABEL: 'masked_scatter_aligned' ; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8f64.nxv8p0( undef, undef, i32 8, undef) @@ -90,7 +90,7 @@ define void @masked_scatter_aligned() { ; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4p0.nxv4p0( undef, undef, i32 8, undef) ; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2p0.nxv2p0( undef, undef, i32 8, undef) ; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1p0.nxv1p0( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; MAX256-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; UNSUPPORTED-LABEL: 'masked_scatter_aligned' ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: call void @llvm.masked.scatter.nxv8f64.nxv8p0( undef, undef, i32 8, undef) @@ -134,7 +134,7 @@ define void @masked_scatter_aligned() { ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: call void @llvm.masked.scatter.nxv4p0.nxv4p0( undef, undef, i32 8, undef) ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: call void @llvm.masked.scatter.nxv2p0.nxv2p0( undef, undef, i32 8, undef) ; UNSUPPORTED-NEXT: Cost Model: Invalid cost for instruction: call void @llvm.masked.scatter.nxv1p0.nxv1p0( undef, undef, i32 8, undef) -; UNSUPPORTED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; UNSUPPORTED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call void @llvm.masked.scatter.nxv8f64.nxv8p0( undef, undef, i32 8, undef) call void @llvm.masked.scatter.nxv4f64.nxv4p0( undef, undef, i32 8, undef) @@ -224,7 +224,7 @@ define void @masked_scatter_unaligned() { ; CHECK-NEXT: Cost Model: Invalid cost for instruction: call void @llvm.masked.scatter.nxv4p0.nxv4p0( undef, undef, i32 1, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: call void @llvm.masked.scatter.nxv2p0.nxv2p0( undef, undef, i32 1, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: call void @llvm.masked.scatter.nxv1p0.nxv1p0( undef, undef, i32 1, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call void @llvm.masked.scatter.nxv8f64.nxv8p0( undef, undef, i32 2, undef) call void @llvm.masked.scatter.nxv4f64.nxv4p0( undef, undef, i32 2, undef) diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll index 002bdc25971a8..e281e2f8cc018 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll @@ -47,7 +47,7 @@ define void @broadcast_scalable() #0{ ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %41 = shufflevector undef, undef, zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %42 = shufflevector undef, undef, zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %43 = shufflevector undef, undef, zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %zero = shufflevector undef, undef, zeroinitializer %1 = shufflevector undef, undef, zeroinitializer @@ -153,7 +153,7 @@ define void @broadcast_fixed() #0{ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %44 = shufflevector <128 x i1> %ins1, <128 x i1> poison, <128 x i32> zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ins2 = insertelement <2 x i8> poison, i8 3, i32 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %45 = shufflevector <2 x i8> %ins2, <2 x i8> undef, <2 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %zero = shufflevector <2 x half> undef, <2 x half> undef, <2 x i32> zeroinitializer %1 = shufflevector <4 x half> undef, <4 x half> undef, <4 x i32> zeroinitializer diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-extract_subvector.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-extract_subvector.ll index a28a64fd82d71..76cb1955a2b37 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-extract_subvector.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-extract_subvector.ll @@ -19,7 +19,7 @@ define void @test_vXf64(<4 x double> %src256, <8 x double> %src512) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_2345 = shufflevector <8 x double> %src512, <8 x double> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_4567 = shufflevector <8 x double> %src512, <8 x double> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %V512_567u = shufflevector <8 x double> %src512, <8 x double> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V256_01 = shufflevector <4 x double> %src256, <4 x double> undef, <2 x i32> %V256_23 = shufflevector <4 x double> %src256, <4 x double> undef, <2 x i32> @@ -45,7 +45,7 @@ define void @test_vXi64(<4 x i64> %src256, <8 x i64> %src512) { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_0123 = shufflevector <8 x i64> %src512, <8 x i64> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_2345 = shufflevector <8 x i64> %src512, <8 x i64> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_4567 = shufflevector <8 x i64> %src512, <8 x i64> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V256_01 = shufflevector <4 x i64> %src256, <4 x i64> undef, <2 x i32> %V256_23 = shufflevector <4 x i64> %src256, <4 x i64> undef, <2 x i32> @@ -83,7 +83,7 @@ define void @test_vXi32(<4 x i32> %src128, <8 x i32> %src256, <16 x i32> %src512 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_CDEF = shufflevector <16 x i32> %src512, <16 x i32> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_01234567 = shufflevector <16 x i32> %src512, <16 x i32> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_89ABCDEF = shufflevector <16 x i32> %src512, <16 x i32> undef, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V128_01 = shufflevector <4 x i32> %src128, <4 x i32> undef, <2 x i32> %V128_23 = shufflevector <4 x i32> %src128, <4 x i32> undef, <2 x i32> @@ -168,7 +168,7 @@ define void @test_vXi16(<4 x i16> %src64, <8 x i16> %src128, <16 x i16> %src256, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_18_19_1A_1B_1C_1D_1E_1F = shufflevector <32 x i16> %src512, <32 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_00_01_02_03_04_05_06_07_08_09_0A_0B_0C_0D_0E_0F = shufflevector <32 x i16> %src512, <32 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_10_11_12_13_14_15_16_17_18_19_1A_1B_1C_1D_1E_1F = shufflevector <32 x i16> %src512, <32 x i16> undef, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V64_01 = shufflevector <4 x i16> %src64, <4 x i16> undef, <2 x i32> %V64_23 = shufflevector <4 x i16> %src64, <4 x i16> undef, <2 x i32> @@ -347,7 +347,7 @@ define void @test_vXi8(<8 x i8> %src64, <16 x i8> %src128, <32 x i8> %src256, <6 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_30_31_32_33_34_35_36_37_38_39_3A_3B_3C_3D_3E_3F = shufflevector <64 x i8> %src512, <64 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_00_01_02_03_04_05_06_07_08_09_0A_0B_0C_0D_0E_0F_10_11_12_13_14_15_16_17_18_19_1A_1B_1C_1D_1E_1F = shufflevector <64 x i8> %src512, <64 x i8> undef, <32 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_20_21_22_23_24_25_26_27_28_29_2A_2B_2C_2D_2E_2F_30_31_32_33_34_35_36_37_38_39_3A_3B_3C_3D_3E_3F = shufflevector <64 x i8> %src512, <64 x i8> undef, <32 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V64_01 = shufflevector <8 x i8> %src64, <8 x i8> undef, <2 x i32> %V64_23 = shufflevector <8 x i8> %src64, <8 x i8> undef, <2 x i32> diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-insert.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-insert.ll index a93e595af7b82..f5ec662519615 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-insert.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-insert.ll @@ -5,7 +5,7 @@ define <8 x i8> @insert_subvector_middle_v8i8(<8 x i8> %v, <8 x i8> %w) { ; CHECK-LABEL: 'insert_subvector_middle_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> ret <8 x i8> %res @@ -14,7 +14,7 @@ define <8 x i8> @insert_subvector_middle_v8i8(<8 x i8> %v, <8 x i8> %w) { define <8 x i8> @insert_subvector_end_v8i8(<8 x i8> %v, <8 x i8> %w) { ; CHECK-LABEL: 'insert_subvector_end_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> ret <8 x i8> %res @@ -23,7 +23,7 @@ define <8 x i8> @insert_subvector_end_v8i8(<8 x i8> %v, <8 x i8> %w) { define <8 x i8> @insert_subvector_end_swapped_v8i8(<8 x i8> %v, <8 x i8> %w) { ; CHECK-LABEL: 'insert_subvector_end_swapped_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> ret <8 x i8> %res @@ -32,7 +32,7 @@ define <8 x i8> @insert_subvector_end_swapped_v8i8(<8 x i8> %v, <8 x i8> %w) { define <8 x i8> @insert_subvector_short_v8i8(<8 x i8> %v, <8 x i8> %w) { ; CHECK-LABEL: 'insert_subvector_short_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> ret <8 x i8> %res @@ -41,7 +41,7 @@ define <8 x i8> @insert_subvector_short_v8i8(<8 x i8> %v, <8 x i8> %w) { define <8 x i8> @insert_subvector_offset_1_v8i8(<8 x i8> %v, <8 x i8> %w) { ; CHECK-LABEL: 'insert_subvector_offset_1_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> ret <8 x i8> %res @@ -50,7 +50,7 @@ define <8 x i8> @insert_subvector_offset_1_v8i8(<8 x i8> %v, <8 x i8> %w) { define <8 x i64> @insert_subvector_offset_1_v8i64(<8 x i64> %v, <8 x i64> %w) { ; CHECK-LABEL: 'insert_subvector_offset_1_v8i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res = shufflevector <8 x i64> %v, <8 x i64> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %res ; %res = shufflevector <8 x i64> %v, <8 x i64> %w, <8 x i32> ret <8 x i64> %res @@ -60,7 +60,7 @@ define <8 x i64> @insert_subvector_offset_1_v8i64(<8 x i64> %v, <8 x i64> %w) { define <12 x i8> @insert_subvector_concat_v6i8(<6 x i8> %x, <6 x i8> %y) { ; CHECK-LABEL: 'insert_subvector_concat_v6i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a = shufflevector <6 x i8> %x, <6 x i8> %y, <12 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <12 x i8> %a +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <12 x i8> %a ; %a = shufflevector <6 x i8> %x, <6 x i8> %y, <12 x i32> ret <12 x i8> %a @@ -70,7 +70,7 @@ define <12 x i8> @insert_subvector_concat_v6i8(<6 x i8> %x, <6 x i8> %y) { define <8 x i8> @insert_subvector_concat_v8i8(<4 x i8> %x, <4 x i8> %y) { ; CHECK-LABEL: 'insert_subvector_concat_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a = shufflevector <4 x i8> %x, <4 x i8> %y, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %a +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %a ; %a = shufflevector <4 x i8> %x, <4 x i8> %y, <8 x i32> ret <8 x i8> %a diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-insert_subvector.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-insert_subvector.ll index 04d5fbc0f1276..d0e2a7c71a107 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-insert_subvector.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-insert_subvector.ll @@ -16,7 +16,7 @@ define void @test_vXf64(<2 x double> %src128, <4 x double> %src256, <8 x double> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_67 = shufflevector <8 x double> %src512, <8 x double> %src128_512, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V512_0123 = shufflevector <8 x double> %src512, <8 x double> %src256_512, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_4567 = shufflevector <8 x double> %src512, <8 x double> %src256_512, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %src128_256 = shufflevector <2 x double> %src128, <2 x double> undef, <4 x i32> %src128_512 = shufflevector <2 x double> %src128, <2 x double> undef, <8 x i32> @@ -46,7 +46,7 @@ define void @test_vXi64(<2 x i64> %src128, <4 x i64> %src256, <8 x i64> %src512) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_67 = shufflevector <8 x i64> %src512, <8 x i64> %src128_512, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V512_0123 = shufflevector <8 x i64> %src512, <8 x i64> %src256_512, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_4567 = shufflevector <8 x i64> %src512, <8 x i64> %src256_512, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %src128_256 = shufflevector <2 x i64> %src128, <2 x i64> undef, <4 x i32> %src128_512 = shufflevector <2 x i64> %src128, <2 x i64> undef, <8 x i32> @@ -93,7 +93,7 @@ define void @test_vXf32(<2 x float> %src64, <4 x float> %src128, <8 x float> %sr ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_CDEF = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V512_01234567 = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_89ABCDEF = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %src64_128 = shufflevector <2 x float> %src64, <2 x float> undef, <4 x i32> %src64_256 = shufflevector <2 x float> %src64, <2 x float> undef, <8 x i32> @@ -159,7 +159,7 @@ define void @test_vXi32(<2 x i32> %src64, <4 x i32> %src128, <8 x i32> %src256, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_CDEF = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V512_01234567 = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V512_89ABCDEF = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %src64_128 = shufflevector <2 x i32> %src64, <2 x i32> undef, <4 x i32> %src64_256 = shufflevector <2 x i32> %src64, <2 x i32> undef, <8 x i32> @@ -229,7 +229,7 @@ define void @test_vXi16(<2 x i16> %src32, <4 x i16> %src64, <8 x i16> %src128, < ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V256_CDEF = shufflevector <16 x i16> %src256, <16 x i16> %src128_256, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V256_01234567 = shufflevector <16 x i16> %src256, <16 x i16> %src128_256, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V256_89ABCDEF = shufflevector <16 x i16> %src256, <16 x i16> %src128_256, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %src32_64 = shufflevector <2 x i16> %src32, <2 x i16> undef, <4 x i32> %src32_128 = shufflevector <2 x i16> %src32, <2 x i16> undef, <8 x i32> @@ -309,7 +309,7 @@ define void @test_vXi8(<2 x i8> %src16, <4 x i8> %src32, <8 x i8> %src64, <16x i ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V128_CDEF = shufflevector <16 x i8> %src128, <16 x i8> %src32_128, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128_01234567 = shufflevector <16 x i8> %src128, <16 x i8> %src64_128, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V128_89ABCDEF = shufflevector <16 x i8> %src128, <16 x i8> %src64_128, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %src16_32 = shufflevector <2 x i8> %src16, <2 x i8> undef, <4 x i32> %src16_64 = shufflevector <2 x i8> %src16, <2 x i8> undef, <8 x i32> diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-interleave.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-interleave.ll index 203361aef6e44..afcf600e13ef6 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-interleave.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-interleave.ll @@ -7,7 +7,7 @@ define <4 x i8> @interleave2_v2i8(<2 x i8> %v0, <2 x i8> %v1) { ; CHECK-LABEL: 'interleave2_v2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %concat = shufflevector <2 x i8> %v0, <2 x i8> %v1, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res = shufflevector <4 x i8> %concat, <4 x i8> poison, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %res ; %concat = shufflevector <2 x i8> %v0, <2 x i8> %v1, <4 x i32> %res = shufflevector <4 x i8> %concat, <4 x i8> poison, <4 x i32> @@ -18,7 +18,7 @@ define <8 x i8> @interleave2_v8i8(<4 x i8> %v0, <4 x i8> %v1) { ; CHECK-LABEL: 'interleave2_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %concat = shufflevector <4 x i8> %v0, <4 x i8> %v1, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res = shufflevector <8 x i8> %concat, <8 x i8> poison, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %concat = shufflevector <4 x i8> %v0, <4 x i8> %v1, <8 x i32> %res = shufflevector <8 x i8> %concat, <8 x i8> poison, <8 x i32> @@ -29,7 +29,7 @@ define <8 x i32> @interleave2_v8i32(<4 x i32> %v0, <4 x i32> %v1) { ; CHECK-LABEL: 'interleave2_v8i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %concat = shufflevector <4 x i32> %v0, <4 x i32> %v1, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res = shufflevector <8 x i32> %concat, <8 x i32> poison, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %res ; %concat = shufflevector <4 x i32> %v0, <4 x i32> %v1, <8 x i32> %res = shufflevector <8 x i32> %concat, <8 x i32> poison, <8 x i32> @@ -41,12 +41,12 @@ define <8 x i64> @interleave2_v8i64(<4 x i64> %v0, <4 x i64> %v1) { ; RV32-LABEL: 'interleave2_v8i64' ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %concat = shufflevector <4 x i64> %v0, <4 x i64> %v1, <8 x i32> ; RV32-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %res = shufflevector <8 x i64> %concat, <8 x i64> poison, <8 x i32> -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %res +; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %res ; ; RV64-LABEL: 'interleave2_v8i64' ; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %concat = shufflevector <4 x i64> %v0, <4 x i64> %v1, <8 x i32> ; RV64-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %res = shufflevector <8 x i64> %concat, <8 x i64> poison, <8 x i32> -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %res +; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %res ; %concat = shufflevector <4 x i64> %v0, <4 x i64> %v1, <8 x i32> %res = shufflevector <8 x i64> %concat, <8 x i64> poison, <8 x i32> @@ -60,7 +60,7 @@ define {<4 x i8>, <4 x i8>} @deinterleave_2(<8 x i8> %v) { ; CHECK-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %v1 = shufflevector <8 x i8> %v, <8 x i8> poison, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %res0 = insertvalue { <4 x i8>, <4 x i8> } poison, <4 x i8> %v0, 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %res1 = insertvalue { <4 x i8>, <4 x i8> } %res0, <4 x i8> %v1, 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret { <4 x i8>, <4 x i8> } %res1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret { <4 x i8>, <4 x i8> } %res1 ; %v0 = shufflevector <8 x i8> %v, <8 x i8> poison, <4 x i32> %v1 = shufflevector <8 x i8> %v, <8 x i8> poison, <4 x i32> diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-permute.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-permute.ll index 60c28dcf66a0a..8f8ec20451f2b 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-permute.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-permute.ll @@ -22,7 +22,7 @@ define void @general_permute_single_source() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4f32 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8f32 = shufflevector <8 x float> undef, <8 x float> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v4f64 = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v4i8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> %v8i8 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> @@ -80,7 +80,7 @@ define void @general_permute_two_source() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v4double = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 41 for instruction: %v8double = shufflevector <8 x double> undef, <8 x double> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 139 for instruction: %v16double = shufflevector <16 x double> undef, <16 x double> undef, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> %v4i8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-reverse.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-reverse.ll index 97c375740f10b..4393505d3b28d 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-reverse.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-reverse.ll @@ -30,7 +30,7 @@ define void @reverse() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8f32 = shufflevector <8 x float> undef, <8 x float> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f64 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v4f64 = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i8 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> %v4i8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-select.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-select.ll index 12b5179a8f1a0..8f47c481fff48 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-select.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-select.ll @@ -5,7 +5,7 @@ define <8 x i8> @select_start_v8i8(<8 x i8> %v, <8 x i8> %w) { ; CHECK-LABEL: 'select_start_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> ret <8 x i8> %res @@ -14,7 +14,7 @@ define <8 x i8> @select_start_v8i8(<8 x i8> %v, <8 x i8> %w) { define <8 x i8> @select_non_contiguous_v8i8(<8 x i8> %v, <8 x i8> %w) { ; CHECK-LABEL: 'select_non_contiguous_v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res ; %res = shufflevector <8 x i8> %v, <8 x i8> %w, <8 x i32> ret <8 x i8> %res @@ -23,7 +23,7 @@ define <8 x i8> @select_non_contiguous_v8i8(<8 x i8> %v, <8 x i8> %w) { define <8 x i64> @select_start_v8i64(<8 x i64> %v, <8 x i64> %w) { ; CHECK-LABEL: 'select_start_v8i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %res = shufflevector <8 x i64> %v, <8 x i64> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %res ; %res = shufflevector <8 x i64> %v, <8 x i64> %w, <8 x i32> ret <8 x i64> %res @@ -32,7 +32,7 @@ define <8 x i64> @select_start_v8i64(<8 x i64> %v, <8 x i64> %w) { define <8 x i64> @select_non_contiguous_v8i64(<8 x i64> %v, <8 x i64> %w) { ; CHECK-LABEL: 'select_non_contiguous_v8i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %res = shufflevector <8 x i64> %v, <8 x i64> %w, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %res +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %res ; %res = shufflevector <8 x i64> %v, <8 x i64> %w, <8 x i32> ret <8 x i64> %res diff --git a/llvm/test/Analysis/CostModel/RISCV/shuffle-transpose.ll b/llvm/test/Analysis/CostModel/RISCV/shuffle-transpose.ll index bc75e72157007..8d7457ee5de67 100644 --- a/llvm/test/Analysis/CostModel/RISCV/shuffle-transpose.ll +++ b/llvm/test/Analysis/CostModel/RISCV/shuffle-transpose.ll @@ -8,7 +8,7 @@ target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" define <8 x i8> @trn1.v8i8(<8 x i8> %v0, <8 x i8> %v1) { ; CHECK-LABEL: 'trn1.v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %tmp0 ; %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> ret <8 x i8> %tmp0 @@ -17,7 +17,7 @@ define <8 x i8> @trn1.v8i8(<8 x i8> %v0, <8 x i8> %v1) { define <8 x i8> @trn2.v8i8(<8 x i8> %v0, <8 x i8> %v1) { ; CHECK-LABEL: 'trn2.v8i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %tmp0 ; %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> ret <8 x i8> %tmp0 @@ -26,7 +26,7 @@ define <8 x i8> @trn2.v8i8(<8 x i8> %v0, <8 x i8> %v1) { define <16 x i8> @trn1.v16i8(<16 x i8> %v0, <16 x i8> %v1) { ; CHECK-LABEL: 'trn1.v16i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %tmp0 ; %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> ret <16 x i8> %tmp0 @@ -35,7 +35,7 @@ define <16 x i8> @trn1.v16i8(<16 x i8> %v0, <16 x i8> %v1) { define <16 x i8> @trn2.v16i8(<16 x i8> %v0, <16 x i8> %v1) { ; CHECK-LABEL: 'trn2.v16i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %tmp0 ; %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> ret <16 x i8> %tmp0 @@ -44,7 +44,7 @@ define <16 x i8> @trn2.v16i8(<16 x i8> %v0, <16 x i8> %v1) { define <4 x i16> @trn1.v4i16(<4 x i16> %v0, <4 x i16> %v1) { ; CHECK-LABEL: 'trn1.v4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %tmp0 ; %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> ret <4 x i16> %tmp0 @@ -53,7 +53,7 @@ define <4 x i16> @trn1.v4i16(<4 x i16> %v0, <4 x i16> %v1) { define <4 x i16> @trn2.v4i16(<4 x i16> %v0, <4 x i16> %v1) { ; CHECK-LABEL: 'trn2.v4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %tmp0 ; %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> ret <4 x i16> %tmp0 @@ -62,7 +62,7 @@ define <4 x i16> @trn2.v4i16(<4 x i16> %v0, <4 x i16> %v1) { define <8 x i16> @trn1.v8i16(<8 x i16> %v0, <8 x i16> %v1) { ; CHECK-LABEL: 'trn1.v8i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %tmp0 ; %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> ret <8 x i16> %tmp0 @@ -71,7 +71,7 @@ define <8 x i16> @trn1.v8i16(<8 x i16> %v0, <8 x i16> %v1) { define <8 x i16> @trn2.v8i16(<8 x i16> %v0, <8 x i16> %v1) { ; CHECK-LABEL: 'trn2.v8i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %tmp0 ; %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> ret <8 x i16> %tmp0 @@ -80,7 +80,7 @@ define <8 x i16> @trn2.v8i16(<8 x i16> %v0, <8 x i16> %v1) { define <2 x i32> @trn1.v2i32(<2 x i32> %v0, <2 x i32> %v1) { ; CHECK-LABEL: 'trn1.v2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %tmp0 ; %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> ret <2 x i32> %tmp0 @@ -89,7 +89,7 @@ define <2 x i32> @trn1.v2i32(<2 x i32> %v0, <2 x i32> %v1) { define <2 x i32> @trn2.v2i32(<2 x i32> %v0, <2 x i32> %v1) { ; CHECK-LABEL: 'trn2.v2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %tmp0 ; %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> ret <2 x i32> %tmp0 @@ -98,7 +98,7 @@ define <2 x i32> @trn2.v2i32(<2 x i32> %v0, <2 x i32> %v1) { define <4 x i32> @trn1.v4i32(<4 x i32> %v0, <4 x i32> %v1) { ; CHECK-LABEL: 'trn1.v4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %tmp0 ; %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> ret <4 x i32> %tmp0 @@ -107,7 +107,7 @@ define <4 x i32> @trn1.v4i32(<4 x i32> %v0, <4 x i32> %v1) { define <4 x i32> @trn2.v4i32(<4 x i32> %v0, <4 x i32> %v1) { ; CHECK-LABEL: 'trn2.v4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %tmp0 ; %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> ret <4 x i32> %tmp0 @@ -116,7 +116,7 @@ define <4 x i32> @trn2.v4i32(<4 x i32> %v0, <4 x i32> %v1) { define <2 x i64> @trn1.v2i64(<2 x i64> %v0, <2 x i64> %v1) { ; CHECK-LABEL: 'trn1.v2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %tmp0 ; %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> ret <2 x i64> %tmp0 @@ -125,7 +125,7 @@ define <2 x i64> @trn1.v2i64(<2 x i64> %v0, <2 x i64> %v1) { define <2 x i64> @trn2.v2i64(<2 x i64> %v0, <2 x i64> %v1) { ; CHECK-LABEL: 'trn2.v2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %tmp0 ; %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> ret <2 x i64> %tmp0 @@ -134,7 +134,7 @@ define <2 x i64> @trn2.v2i64(<2 x i64> %v0, <2 x i64> %v1) { define <2 x float> @trn1.v2f32(<2 x float> %v0, <2 x float> %v1) { ; CHECK-LABEL: 'trn1.v2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x float> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %tmp0 ; %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> ret <2 x float> %tmp0 @@ -143,7 +143,7 @@ define <2 x float> @trn1.v2f32(<2 x float> %v0, <2 x float> %v1) { define <2 x float> @trn2.v2f32(<2 x float> %v0, <2 x float> %v1) { ; CHECK-LABEL: 'trn2.v2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x float> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %tmp0 ; %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> ret <2 x float> %tmp0 @@ -152,7 +152,7 @@ define <2 x float> @trn2.v2f32(<2 x float> %v0, <2 x float> %v1) { define <4 x float> @trn1.v4f32(<4 x float> %v0, <4 x float> %v1) { ; CHECK-LABEL: 'trn1.v4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %tmp0 ; %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> ret <4 x float> %tmp0 @@ -161,7 +161,7 @@ define <4 x float> @trn1.v4f32(<4 x float> %v0, <4 x float> %v1) { define <4 x float> @trn2.v4f32(<4 x float> %v0, <4 x float> %v1) { ; CHECK-LABEL: 'trn2.v4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %tmp0 ; %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> ret <4 x float> %tmp0 @@ -170,7 +170,7 @@ define <4 x float> @trn2.v4f32(<4 x float> %v0, <4 x float> %v1) { define <2 x double> @trn1.v2f64(<2 x double> %v0, <2 x double> %v1) { ; CHECK-LABEL: 'trn1.v2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %tmp0 ; %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> ret <2 x double> %tmp0 @@ -179,7 +179,7 @@ define <2 x double> @trn1.v2f64(<2 x double> %v0, <2 x double> %v1) { define <2 x double> @trn2.v2f64(<2 x double> %v0, <2 x double> %v1) { ; CHECK-LABEL: 'trn2.v2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %tmp0 ; %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> ret <2 x double> %tmp0 @@ -188,7 +188,7 @@ define <2 x double> @trn2.v2f64(<2 x double> %v0, <2 x double> %v1) { define <4 x half> @trn1.v4f16(<4 x half> %v0, <4 x half> %v1) { ; CHECK-LABEL: 'trn1.v4f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %tmp0 ; %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> ret <4 x half> %tmp0 @@ -197,7 +197,7 @@ define <4 x half> @trn1.v4f16(<4 x half> %v0, <4 x half> %v1) { define <4 x half> @trn2.v4f16(<4 x half> %v0, <4 x half> %v1) { ; CHECK-LABEL: 'trn2.v4f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %tmp0 ; %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> ret <4 x half> %tmp0 @@ -206,7 +206,7 @@ define <4 x half> @trn2.v4f16(<4 x half> %v0, <4 x half> %v1) { define <8 x half> @trn1.v8f16(<8 x half> %v0, <8 x half> %v1) { ; CHECK-LABEL: 'trn1.v8f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x half> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x half> %tmp0 ; %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> ret <8 x half> %tmp0 @@ -215,7 +215,7 @@ define <8 x half> @trn1.v8f16(<8 x half> %v0, <8 x half> %v1) { define <8 x half> @trn2.v8f16(<8 x half> %v0, <8 x half> %v1) { ; CHECK-LABEL: 'trn2.v8f16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x half> %tmp0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x half> %tmp0 ; %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> ret <8 x half> %tmp0 diff --git a/llvm/test/Analysis/CostModel/RISCV/splice.ll b/llvm/test/Analysis/CostModel/RISCV/splice.ll index 6b8a7545db03c..89015c48c6c47 100644 --- a/llvm/test/Analysis/CostModel/RISCV/splice.ll +++ b/llvm/test/Analysis/CostModel/RISCV/splice.ll @@ -52,7 +52,7 @@ define void @vector_splice() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %splice.nxv16f64 = call @llvm.experimental.vector.splice.nxv16f64( zeroinitializer, zeroinitializer, i32 -1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %splice.nxv32f64 = call @llvm.experimental.vector.splice.nxv32f64( zeroinitializer, zeroinitializer, i32 -1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %splice.nxv64f64 = call @llvm.experimental.vector.splice.nxv64f64( zeroinitializer, zeroinitializer, i32 -1) -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %splice.nxv1i8 = call @llvm.experimental.vector.splice.nxv1i8( zeroinitializer, zeroinitializer, i32 -1) %splice.nxv2i8 = call @llvm.experimental.vector.splice.nxv2i8( zeroinitializer, zeroinitializer, i32 -1) diff --git a/llvm/test/Analysis/CostModel/RISCV/stepvector.ll b/llvm/test/Analysis/CostModel/RISCV/stepvector.ll index 4c93f46bba2cf..7d29d2c0cfa62 100644 --- a/llvm/test/Analysis/CostModel/RISCV/stepvector.ll +++ b/llvm/test/Analysis/CostModel/RISCV/stepvector.ll @@ -49,7 +49,7 @@ define void @stepvector() { ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %42 = call @llvm.experimental.stepvector.nxv16i64() ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %43 = call @llvm.experimental.stepvector.nxv16i64() ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %44 = call @llvm.experimental.stepvector.nxv16i64() -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %zero = call @llvm.experimental.stepvector.nxv1i8() %1 = call @llvm.experimental.stepvector.nxv2i8() diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/force-vect-msg.ll b/llvm/test/Transforms/LoopVectorize/RISCV/force-vect-msg.ll index 1be0182ea3059..f33ef9199ed1a 100644 --- a/llvm/test/Transforms/LoopVectorize/RISCV/force-vect-msg.ll +++ b/llvm/test/Transforms/LoopVectorize/RISCV/force-vect-msg.ll @@ -2,9 +2,9 @@ ; RUN: opt < %s -passes=loop-vectorize -mtriple riscv64 -riscv-v-vector-bits-min=128 -mattr="+v" -debug-only=loop-vectorize -S 2>&1 | FileCheck %s ; CHECK: LV: Loop hints: force=enabled -; CHECK: LV: Scalar loop costs: 7. -; ChosenFactor.Cost is 8, but the real cost will be divided by the width, which is 4. -; CHECK: LV: Vector loop of width 2 costs: 3. +; CHECK: LV: Scalar loop costs: 4. +; ChosenFactor.Cost is 4, but the real cost will be divided by the width, which is 2. +; CHECK: LV: Vector loop of width 2 costs: 2. ; Regardless of force vectorization or not, this loop will eventually be vectorized because of the cost model. ; Therefore, the following message does not need to be printed even if vectorization is explicitly forced in the metadata. ; CHECK-NOT: LV: Vectorization seems to be not beneficial, but was forced by a user. diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll b/llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll index f6745e3ecdf59..d2534d7d18ea7 100644 --- a/llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll +++ b/llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll @@ -31,8 +31,8 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV: Found uniform instruction: %indvars.iv.next = add nsw i64 %indvars.iv, -1 ; CHECK-NEXT: LV: Found uniform instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] ; CHECK-NEXT: LV: Found uniform instruction: %i.0 = add nsw i32 %i.0.in8, -1 -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0 = add nsw i32 %i.0.in8, -1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %idxprom = zext i32 %i.0 to i64 ; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %arrayidx = getelementptr inbounds i32, ptr %B, i64 %idxprom @@ -42,7 +42,7 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV: Found an estimated cost of 11 for VF vscale x 4 For instruction: store i32 %add9, ptr %arrayidx3, align 4 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %cmp = icmp ugt i64 %indvars.iv, 1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv.next = add nsw i64 %indvars.iv, -1 -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 ; CHECK-NEXT: LV: Using user VF vscale x 4. ; CHECK-NEXT: LV: Scalarizing: %i.0 = add nsw i32 %i.0.in8, -1 ; CHECK-NEXT: LV: Scalarizing: %idxprom = zext i32 %i.0 to i64 @@ -78,8 +78,8 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK: middle.block: ; CHECK-NEXT: No successors ; CHECK-NEXT: } -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0 = add nsw i32 %i.0.in8, -1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %idxprom = zext i32 %i.0 to i64 ; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %arrayidx = getelementptr inbounds i32, ptr %B, i64 %idxprom @@ -89,7 +89,7 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV: Found an estimated cost of 11 for VF vscale x 4 For instruction: store i32 %add9, ptr %arrayidx3, align 4 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %cmp = icmp ugt i64 %indvars.iv, 1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv.next = add nsw i64 %indvars.iv, -1 -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 ; CHECK-NEXT: LV(REG): Calculating max register usage: ; CHECK-NEXT: LV(REG): At #0 Interval # 0 ; CHECK-NEXT: LV(REG): At #1 Interval # 1 @@ -109,7 +109,7 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 1 registers ; CHECK-NEXT: LV: The target has 31 registers of RISCV::GPRRC register class ; CHECK-NEXT: LV: The target has 32 registers of RISCV::VRRC register class -; CHECK-NEXT: LV: Loop cost is 31 +; CHECK-NEXT: LV: Loop cost is 28 ; CHECK-NEXT: LV: IC is 1 ; CHECK-NEXT: LV: VF is vscale x 4 ; CHECK-NEXT: LV: Not Interleaving. @@ -118,6 +118,7 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LEV: Epilogue vectorization is not profitable for this loop ; CHECK-NEXT: Executing best plan with VF=vscale x 4, UF=1 ; CHECK-NEXT: LV: Interleaving disabled by the pass manager +; CHECK-NEXT: LV: Vectorizing: innermost loop. ; entry: %cmp7 = icmp sgt i32 %n, 0 @@ -167,8 +168,8 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV: Found uniform instruction: %indvars.iv.next = add nsw i64 %indvars.iv, -1 ; CHECK-NEXT: LV: Found uniform instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] ; CHECK-NEXT: LV: Found uniform instruction: %i.0 = add nsw i32 %i.0.in8, -1 -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0 = add nsw i32 %i.0.in8, -1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %idxprom = zext i32 %i.0 to i64 ; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %arrayidx = getelementptr inbounds float, ptr %B, i64 %idxprom @@ -178,7 +179,7 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV: Found an estimated cost of 11 for VF vscale x 4 For instruction: store float %conv1, ptr %arrayidx3, align 4 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %cmp = icmp ugt i64 %indvars.iv, 1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv.next = add nsw i64 %indvars.iv, -1 -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 ; CHECK-NEXT: LV: Using user VF vscale x 4. ; CHECK-NEXT: LV: Scalarizing: %i.0 = add nsw i32 %i.0.in8, -1 ; CHECK-NEXT: LV: Scalarizing: %idxprom = zext i32 %i.0 to i64 @@ -214,8 +215,8 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK: middle.block: ; CHECK-NEXT: No successors ; CHECK-NEXT: } -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %i.0.in8 = phi i32 [ %n, %for.body.preheader ], [ %i.0, %for.body ] ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %i.0 = add nsw i32 %i.0.in8, -1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %idxprom = zext i32 %i.0 to i64 ; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: %arrayidx = getelementptr inbounds float, ptr %B, i64 %idxprom @@ -225,7 +226,7 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV: Found an estimated cost of 11 for VF vscale x 4 For instruction: store float %conv1, ptr %arrayidx3, align 4 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %cmp = icmp ugt i64 %indvars.iv, 1 ; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: %indvars.iv.next = add nsw i64 %indvars.iv, -1 -; CHECK-NEXT: LV: Found an estimated cost of 1 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 +; CHECK-NEXT: LV: Found an estimated cost of 0 for VF vscale x 4 For instruction: br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit, !llvm.loop !0 ; CHECK-NEXT: LV(REG): Calculating max register usage: ; CHECK-NEXT: LV(REG): At #0 Interval # 0 ; CHECK-NEXT: LV(REG): At #1 Interval # 1 @@ -245,7 +246,7 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LV(REG): RegisterClass: RISCV::GPRRC, 1 registers ; CHECK-NEXT: LV: The target has 31 registers of RISCV::GPRRC register class ; CHECK-NEXT: LV: The target has 32 registers of RISCV::VRRC register class -; CHECK-NEXT: LV: Loop cost is 31 +; CHECK-NEXT: LV: Loop cost is 28 ; CHECK-NEXT: LV: IC is 1 ; CHECK-NEXT: LV: VF is vscale x 4 ; CHECK-NEXT: LV: Not Interleaving. @@ -254,6 +255,7 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur ; CHECK-NEXT: LEV: Epilogue vectorization is not profitable for this loop ; CHECK-NEXT: Executing best plan with VF=vscale x 4, UF=1 ; CHECK-NEXT: LV: Interleaving disabled by the pass manager +; CHECK-NEXT: LV: Vectorizing: innermost loop. ; entry: %cmp7 = icmp sgt i32 %n, 0 diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll b/llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll index db7cfee9cd6b0..65a2cb51b88ff 100644 --- a/llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll +++ b/llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll @@ -159,26 +159,33 @@ define void @single_constant_stride_ptr_iv(ptr %p) { ; CHECK-NEXT: entry: ; CHECK-NEXT: br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] ; CHECK: vector.ph: -; CHECK-NEXT: [[IND_END:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 8128 +; CHECK-NEXT: [[IND_END:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 8064 ; CHECK-NEXT: br label [[VECTOR_BODY:%.*]] ; CHECK: vector.body: ; CHECK-NEXT: [[POINTER_PHI:%.*]] = phi ptr [ [[P]], [[VECTOR_PH]] ], [ [[PTR_IND:%.*]], [[VECTOR_BODY]] ] ; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] ; CHECK-NEXT: [[TMP0:%.*]] = getelementptr i8, ptr [[POINTER_PHI]], <8 x i64> -; CHECK-NEXT: [[TMP1:%.*]] = extractelement <8 x ptr> [[TMP0]], i32 0 -; CHECK-NEXT: [[TMP2:%.*]] = getelementptr i32, ptr [[TMP1]], i32 0 -; CHECK-NEXT: [[WIDE_VEC:%.*]] = load <16 x i32>, ptr [[TMP2]], align 4 +; CHECK-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[POINTER_PHI]], <8 x i64> +; CHECK-NEXT: [[TMP2:%.*]] = extractelement <8 x ptr> [[TMP0]], i32 0 +; CHECK-NEXT: [[TMP3:%.*]] = getelementptr i32, ptr [[TMP2]], i32 0 +; CHECK-NEXT: [[TMP4:%.*]] = extractelement <8 x ptr> [[TMP1]], i32 0 +; CHECK-NEXT: [[TMP5:%.*]] = getelementptr i32, ptr [[TMP4]], i32 0 +; CHECK-NEXT: [[WIDE_VEC:%.*]] = load <16 x i32>, ptr [[TMP3]], align 4 +; CHECK-NEXT: [[WIDE_VEC2:%.*]] = load <16 x i32>, ptr [[TMP5]], align 4 ; CHECK-NEXT: [[STRIDED_VEC:%.*]] = shufflevector <16 x i32> [[WIDE_VEC]], <16 x i32> poison, <8 x i32> -; CHECK-NEXT: [[TMP3:%.*]] = add <8 x i32> [[STRIDED_VEC]], -; CHECK-NEXT: call void @llvm.masked.scatter.v8i32.v8p0(<8 x i32> [[TMP3]], <8 x ptr> [[TMP0]], i32 4, <8 x i1> ) -; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 8 -; CHECK-NEXT: [[PTR_IND]] = getelementptr i8, ptr [[POINTER_PHI]], i64 64 -; CHECK-NEXT: [[TMP4:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1016 -; CHECK-NEXT: br i1 [[TMP4]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP6:![0-9]+]] +; CHECK-NEXT: [[STRIDED_VEC3:%.*]] = shufflevector <16 x i32> [[WIDE_VEC2]], <16 x i32> poison, <8 x i32> +; CHECK-NEXT: [[TMP6:%.*]] = add <8 x i32> [[STRIDED_VEC]], +; CHECK-NEXT: [[TMP7:%.*]] = add <8 x i32> [[STRIDED_VEC3]], +; CHECK-NEXT: call void @llvm.masked.scatter.v8i32.v8p0(<8 x i32> [[TMP6]], <8 x ptr> [[TMP0]], i32 4, <8 x i1> ) +; CHECK-NEXT: call void @llvm.masked.scatter.v8i32.v8p0(<8 x i32> [[TMP7]], <8 x ptr> [[TMP1]], i32 4, <8 x i1> ) +; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 +; CHECK-NEXT: [[PTR_IND]] = getelementptr i8, ptr [[POINTER_PHI]], i64 128 +; CHECK-NEXT: [[TMP8:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1008 +; CHECK-NEXT: br i1 [[TMP8]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP6:![0-9]+]] ; CHECK: middle.block: ; CHECK-NEXT: br label [[SCALAR_PH]] ; CHECK: scalar.ph: -; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i64 [ 1016, [[MIDDLE_BLOCK]] ], [ 0, [[ENTRY:%.*]] ] +; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i64 [ 1008, [[MIDDLE_BLOCK]] ], [ 0, [[ENTRY:%.*]] ] ; CHECK-NEXT: [[BC_RESUME_VAL1:%.*]] = phi ptr [ [[IND_END]], [[MIDDLE_BLOCK]] ], [ [[P]], [[ENTRY]] ] ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: @@ -692,7 +699,7 @@ define void @double_stride_ptr_iv(ptr %p, ptr %p2, i64 %stride) { ; STRIDED-NEXT: entry: ; STRIDED-NEXT: [[TMP0:%.*]] = call i64 @llvm.vscale.i64() ; STRIDED-NEXT: [[TMP1:%.*]] = mul i64 [[TMP0]], 4 -; STRIDED-NEXT: [[TMP2:%.*]] = call i64 @llvm.umax.i64(i64 16, i64 [[TMP1]]) +; STRIDED-NEXT: [[TMP2:%.*]] = call i64 @llvm.umax.i64(i64 32, i64 [[TMP1]]) ; STRIDED-NEXT: [[MIN_ITERS_CHECK:%.*]] = icmp ult i64 1024, [[TMP2]] ; STRIDED-NEXT: br i1 [[MIN_ITERS_CHECK]], label [[SCALAR_PH:%.*]], label [[VECTOR_MEMCHECK:%.*]] ; STRIDED: vector.memcheck: