[PATCH] D28959: [SLP] Improve horizontal vectorization for non-power-of-2 number of instructions.

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 11:00:51 PST 2017


mkuper added a comment.

One more nit.



================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4277
 
-    for (; i < NumReducedVals - ReduxWidth + 1; i += ReduxWidth) {
+    for (; i < NumReducedVals - ReduxWidth + 1 && ReduxWidth > 2;) {
       auto VL = makeArrayRef(&ReducedVals[i], ReduxWidth);
----------------
Could you turn this into a while loop? A for with only the middle term looks odd.


https://reviews.llvm.org/D28959





More information about the llvm-commits mailing list