[PATCH] D60650: [LVI][CVP] Constrain values in with.overflow branches

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 13 05:27:57 PDT 2019


nikic created this revision.
nikic added reviewers: spatel, lebedev.ri, sanjoy.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

If a branch is conditional on `extractvalue(op.with.overflow(%x, C), 1)` then we can constrain the value of %x inside the branch based on makeGuaranteedNoWrapRegion(). We do this by extending the edge-value handling in LVI. This allows CVP to then fold comparisons against %x, as illustrated in the tests.


Repository:
  rL LLVM

https://reviews.llvm.org/D60650

Files:
  llvm/lib/Analysis/LazyValueInfo.cpp
  llvm/test/Transforms/CorrelatedValuePropagation/overflow_predicate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60650.195011.patch
Type: text/x-patch
Size: 8477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190413/31c76ab4/attachment.bin>


More information about the llvm-commits mailing list