[PATCH] D32261: [LoopUnroll] Don't try to unroll non-rotated loops

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 12:55:02 PDT 2017


davide added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUnroll.cpp:332
+      });
+  if (NotRotated) {
+    DEBUG(dbgs() << "  Can't unroll; loop not rotated\n");
----------------
efriedma wrote:
> It might be simpler to explicitly check the two successors; one should be the header, and the other outside the loop.
> 
> You also can't delete the check that BI is non-null and conditional; we specifically assume that later on.
Thanks for the comments, I'll change that as I also believe it's simpler. 
No tests are failing if I remove that check, which is slightly concerning.
I'll try to craft a test where this fails.


https://reviews.llvm.org/D32261





More information about the llvm-commits mailing list