[llvm] r369769 - [SLP] fix formatting; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 08:26:12 PDT 2019


Author: spatel
Date: Fri Aug 23 08:26:12 2019
New Revision: 369769

URL: http://llvm.org/viewvc/llvm-project?rev=369769&view=rev
Log:
[SLP] fix formatting; NFC

These are part of D57059, but that patch doesn't apply cleanly to trunk
at this point, so we might as well remove some of the noise.

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

Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=369769&r1=369768&r2=369769&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Aug 23 08:26:12 2019
@@ -3198,8 +3198,8 @@ int BoUpSLP::getEntryCost(TreeEntry *E)
               I, TargetTransformInfo::TCK_RecipThroughput);
         }
       }
-      for (Value *i : VL) {
-        Instruction *I = cast<Instruction>(i);
+      for (Value *V : VL) {
+        Instruction *I = cast<Instruction>(V);
         assert(E->isOpcodeOrAlt(I) && "Unexpected main/alternate opcode");
         ScalarCost += TTI->getInstructionCost(
             I, TargetTransformInfo::TCK_RecipThroughput);
@@ -5484,8 +5484,7 @@ bool SLPVectorizerPass::tryToVectorizeLi
   SmallVector<WeakTrackingVH, 8> TrackValues(VL.begin(), VL.end());
 
   unsigned NextInst = 0, MaxInst = VL.size();
-  for (unsigned VF = MaxVF; NextInst + 1 < MaxInst && VF >= MinVF;
-       VF /= 2) {
+  for (unsigned VF = MaxVF; NextInst + 1 < MaxInst && VF >= MinVF; VF /= 2) {
     // No actual vectorization should happen, if number of parts is the same as
     // provided vectorization factor (i.e. the scalar type is used for vector
     // code during codegen).




More information about the llvm-commits mailing list