[llvm] [LV] Don't treat the pointer operand of histograms as scalar uses (PR #215769)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 07:10:22 PDT 2026
================
@@ -2239,7 +2239,8 @@ void LoopVectorizationCostModel::collectLoopScalars(ElementCount VF) {
return WideningDecision == CM_Scalarize;
assert(Ptr == getLoadStorePointerOperand(MemAccess) &&
"Ptr is neither a value or pointer operand");
- return WideningDecision != CM_GatherScatter;
+ return WideningDecision != CM_GatherScatter &&
----------------
MacDue wrote:
It's scalarize. The cost most does not really seem to know about histograms, so it's costing it as if it's a normal gather/scatter and finds it's apparently cheaper to scalarize it. However, we map any `store` with histogram info to a vector histogram intrinsic.
https://github.com/llvm/llvm-project/pull/215769
More information about the llvm-commits
mailing list