[PATCH] D113577: [SCEV] Support rewriting ZExt expressions with loop guard info.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 09:27:01 PST 2021


fhahn created this revision.
fhahn added reviewers: reames, nikic, mkazantsev.
Herald added subscribers: javed.absar, hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.

So far, applying loop guard information has been restricted to
SCEVUnknown. In a few cases, like PR40961 and PR52464, this leads to
SCEV failing to determine tight upper bounds for the backedge taken
count.

This patch adjusts SCEVLoopGuardRewriter and applyLoopGuards to support
re-writing ZExt expressions.

This fixes PR40961. PR52464 requires a follow-up patch, which I will
share soon.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113577

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info-rewrite-expressions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113577.386203.patch
Type: text/x-patch
Size: 6938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211110/c55c9639/attachment.bin>


More information about the llvm-commits mailing list