[llvm] 42b3925 - [SLP][NFC]Fix formatting/warnings in tryToReduce(), NFC.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 06:43:02 PDT 2023


Author: Alexey Bataev
Date: 2023-08-10T06:42:50-07:00
New Revision: 42b3925d425534ae89e0e359e7c9b10266d58888

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

LOG: [SLP][NFC]Fix formatting/warnings in tryToReduce(), NFC.

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 b7fe2b39eed156..ecb043a8dde510 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -13744,7 +13744,7 @@ class HorizontalReduction {
         // Update LocalExternallyUsedValues for the scalar, replaced by
         // extractelement instructions.
         for (const std::pair<Value *, Value *> &Pair : ReplacedExternals) {
-          auto It = ExternallyUsedValues.find(Pair.first);
+          auto *It = ExternallyUsedValues.find(Pair.first);
           if (It == ExternallyUsedValues.end())
             continue;
           LocalExternallyUsedValues[Pair.second].append(It->second);
@@ -13758,7 +13758,8 @@ class HorizontalReduction {
         InstructionCost ReductionCost =
             getReductionCost(TTI, VL, IsCmpSelMinMax, ReduxWidth, RdxFMF);
         InstructionCost Cost = TreeCost + ReductionCost;
-        LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost << " for reduction\n");
+        LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost
+                          << " for reduction\n");
         if (!Cost.isValid())
           return nullptr;
         if (Cost >= -SLPCostThreshold) {


        


More information about the llvm-commits mailing list