[PATCH] D64509: [SCEV] Compute exit count from overflow test

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 09:58:35 PDT 2019


reames created this revision.
reames added reviewers: nikic, sanjoy, nicholas.
Herald added subscribers: bollu, mcrosier.
Herald added a project: LLVM.

If we have an exit test in a loop which is controlled by the overflow flag on an add.with.overflow intrinsic, we can possible compute which iteration would cause overflow.  Knowing an exit count for the loop, then drives LFTR which is then able to rewrite the check in the form which eliminates the need for the overflow check entirely.

(Noticed while looking at the output of the PoisonChecking tool, but unrelated.)


Repository:
  rL LLVM

https://reviews.llvm.org/D64509

Files:
  lib/Analysis/ScalarEvolution.cpp
  test/Transforms/IndVarSimplify/lftr-overflow.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64509.208996.patch
Type: text/x-patch
Size: 19562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190710/a8cfb81f/attachment.bin>


More information about the llvm-commits mailing list