[llvm] bbad998 - [SLP] move loop index variable declaration to its use; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 04:59:46 PDT 2020
Author: Sanjay Patel
Date: 2020-09-16T07:59:31-04:00
New Revision: bbad998bab52a1eabbb6a1ca16cc2129b3f99aa5
URL: https://github.com/llvm/llvm-project/commit/bbad998bab52a1eabbb6a1ca16cc2129b3f99aa5
DIFF: https://github.com/llvm/llvm-project/commit/bbad998bab52a1eabbb6a1ca16cc2129b3f99aa5.diff
LOG: [SLP] move loop index variable declaration to its use; 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 7d85cf5f9bdd..62269d2e7b9e 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -6819,7 +6819,6 @@ class HorizontalReduction {
FastMathFlags Unsafe;
Unsafe.setFast();
Builder.setFastMathFlags(Unsafe);
- unsigned i = 0;
BoUpSLP::ExtraValueToDebugLocsMap ExternallyUsedValues;
// The same extra argument may be used several time, so log each attempt
@@ -6847,6 +6846,7 @@ class HorizontalReduction {
for (ReductionOpsType &RdxOp : ReductionOps)
IgnoreList.append(RdxOp.begin(), RdxOp.end());
+ unsigned i = 0;
while (i < NumReducedVals - ReduxWidth + 1 && ReduxWidth > 2) {
auto VL = makeArrayRef(&ReducedVals[i], ReduxWidth);
V.buildTree(VL, ExternallyUsedValues, IgnoreList);
More information about the llvm-commits
mailing list