[PATCH] D22886: [llvm] Loop Vectorization fault in collectLoopUni

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 16:03:44 PDT 2016


wmi added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4862
@@ -4861,3 +4861,3 @@
   unsigned idx = 0;
-  do {
+  while (idx != Worklist.size()) {
     Instruction *I = Worklist[idx++];
----------------
Gerolf wrote:
> I think it would be better to return when the worklist is empty. At this point there is nothing left to do and the compiler does not have to execute the case. We ran into the same problem and I isolated function and loop, but don't have a small test case yet. 
Even if the Worklist is empty, it is still possible that induction variable could be added into the uniform set in the following code, so I think the existing fix is better.  


https://reviews.llvm.org/D22886





More information about the llvm-commits mailing list