[llvm] [SLP] Better track MinBWs between vectorization attempts (PR #224199)

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 23:07:47 PDT 2026


================
@@ -28589,7 +28617,8 @@ void BoUpSLP::computeMinimumValueSizes() {
             cast<IntegerType>(TreeRoot.front()->getType()->getScalarType())
                 ->getBitWidth()) {
       if (UserIgnoreList)
-        AnalyzedMinBWVals.insert_range(TreeRoot);
+        for (Value *V : TreeRoot)
+          AnalyzedMinBWVals[V] = getTreeSizeExcludingGathers();
----------------
bababuck wrote:

`insert_range` doesn't overwrite existing values so I don't think we want to use that here. Updated to use `insert_or_assign` rather than `[V] = ...` 

https://github.com/llvm/llvm-project/pull/224199


More information about the llvm-commits mailing list