[PATCH] D116499: [SCEV] Compute exit count from overflow check expressed w/ x.with.overflow intrinsics

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 2 11:55:31 PST 2022


reames created this revision.
reames added reviewers: efriedma, nikic, fhahn, lebedev.ri.
Herald added subscribers: javed.absar, bollu, hiraditya, nemanjai, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.

This ports the logic we generate in instcombine for a single use x.with.overflow check for use in SCEV's analysis.  The result is that we can prove trip counts for many checks, and (through existing logic) often discharge them.

Motivation comes from compiling a simple example with -ftrapv.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116499

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/overflow-intrinsics-trip-count.ll
  llvm/test/CodeGen/PowerPC/negctr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116499.396942.patch
Type: text/x-patch
Size: 6798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220102/3fadac7a/attachment.bin>


More information about the llvm-commits mailing list