[llvm] [LV][NFC] Factor out MinBWs of values from the cost model (PR #194492)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 05:53:44 PDT 2026
================
@@ -5507,10 +5495,10 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I,
[[maybe_unused]] Instruction *Op0AsInstruction =
dyn_cast<Instruction>(I->getOperand(0));
assert((!canTruncateToMinimalBitwidth(Op0AsInstruction, VF) ||
- MinBWs[I] == MinBWs[Op0AsInstruction]) &&
+ InstrMinBWs == MinBWs.lookup(Op0AsInstruction)) &&
----------------
david-arm wrote:
OK fair enough! I guess the `const` adds extra protection to avoid accidental modification.
https://github.com/llvm/llvm-project/pull/194492
More information about the llvm-commits
mailing list