[PATCH] D30757: [LoopUnroll] Don't peel loops where the latch isn't the exiting block

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 13:58:34 PDT 2017


mkuper added a comment.

Thanks!

Re the PS - I don't know.
As I wrote above - UnrollLoop() verifies the latch is conditional, but doesn't verify the two edges are actually going to the header and the exit block. But we haven't actually *seen* any issues with this, as far as I know.



================
Comment at: test/Transforms/LoopUnroll/peel-loop-irreducible.ll:36-37
+
+exit:
+  ret i32 %sum
+}
----------------
mzolotukhin wrote:
> I'd prefer to have LCSSA-ed version of the loop in the test. And, by the way, do we need `%sum`, `%plus` and `%incsum` at all? Maybe remove them to make the test even smaller?
Sure, I'll see if it minimizes more.


https://reviews.llvm.org/D30757





More information about the llvm-commits mailing list