[llvm] ad956ed - [SLP] Fix debug print for cost in tryToVectorizeList - NFC.

Valery N Dmitriev via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 29 11:31:18 PST 2022


Author: Valery N Dmitriev
Date: 2022-12-29T11:30:10-08:00
New Revision: ad956ed568ce8f4d014103cdbf18e3023ca3fc70

URL: https://github.com/llvm/llvm-project/commit/ad956ed568ce8f4d014103cdbf18e3023ca3fc70
DIFF: https://github.com/llvm/llvm-project/commit/ad956ed568ce8f4d014103cdbf18e3023ca3fc70.diff

LOG: [SLP] Fix debug print for cost in tryToVectorizeList - NFC.

Actual VF was confused with local variable named "VF".

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 7c695b66ae18..744cefb206cb 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -11380,7 +11380,8 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
       CandidateFound = true;
       MinCost = std::min(MinCost, Cost);
 
-      LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost << " for VF=" << VF << "\n");
+      LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost
+                        << " for VF=" << OpsWidth << "\n");
       if (Cost < -SLPCostThreshold) {
         LLVM_DEBUG(dbgs() << "SLP: Vectorizing list at cost:" << Cost << ".\n");
         R.getORE()->emit(OptimizationRemark(SV_NAME, "VectorizedList",


        


More information about the llvm-commits mailing list