[llvm] [LV] Support multiplies by constants when forming scaled reductions. (PR #161092)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 2 00:51:36 PDT 2025
================
@@ -340,6 +340,15 @@ VPPartialReductionRecipe::computeCost(ElementCount VF,
: Widen->getOperand(1));
ExtAType = GetExtendKind(ExtAR);
ExtBType = GetExtendKind(ExtBR);
+
+ if (!ExtBR && Widen->getOperand(1)->isLiveIn()) {
+ auto *CI =
----------------
david-arm wrote:
Can you just use `cast<ConstantInt>` here because I don't think we should ever get here for non-constant live-ins, right?
https://github.com/llvm/llvm-project/pull/161092
More information about the llvm-commits
mailing list