[PATCH] D18237: [SLPVectorizer] Try to vectorize in the range from MaxVecRegSize to MinVecRegSize

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 08:51:46 PDT 2016


mcrosier added inline comments.

================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:3714
@@ +3713,3 @@
+    if (tryToVectorizeList(VL, R, None, true, VecRegSize)) {
+      SuccessToVectorizeList = true;
+      break;
----------------
Why not just return true here and remove the unnecessary temp variable?

================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:3718
@@ -3711,1 +3717,3 @@
+  }
+  return SuccessToVectorizeList;
 }
----------------
return false (assuming you do the suggestion above).

================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4327
@@ +4326,3 @@
+      for (unsigned Size = MaxVecRegSize; Size >= MinVecRegSize; Size /= 2) {
+        if (tryToVectorizeList(makeArrayRef(IncIt, NumElts), R, None, false,
+                               Size)) {
----------------
Shouldn't the call to tryToVectorizeList() still be predicated on NumElts > 1?


http://reviews.llvm.org/D18237





More information about the llvm-commits mailing list