[PATCH] D44983: [LoopUnroll] Only peel if a predicate becomes known in the loop body.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 04:50:07 PDT 2018


fhahn updated this revision to Diff 141316.
fhahn added a comment.

Update to peel only for monotonic predicates, that switch from true to false (or vice versa). In that case, we should be able to simplify the loop body.

For ICMP_EQ and ICMP_NE without wrapping, I think we could peel of an additional iteration and then the loop body could be simplified too. I've added that as a fixme and intend to add that as a follow up commit. I can also add it to this commit if you prefer.


https://reviews.llvm.org/D44983

Files:
  lib/Transforms/Utils/LoopUnrollPeel.cpp
  test/Transforms/LoopUnroll/peel-loop-conditions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44983.141316.patch
Type: text/x-patch
Size: 15587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180406/f2da9759/attachment.bin>


More information about the llvm-commits mailing list