[PATCH] D73496: [IRCE] Use SCEVExpander to modify loop bound

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 11:25:44 PST 2020


dantrushin created this revision.
dantrushin added reviewers: sanjoy.google, mkazantsev, skatkov.
Herald added subscribers: javed.absar, hiraditya.
Herald added a project: LLVM.

IRCE pass checks that it can calculate loop bounds by checking
SCEV availability at loop entry. However it is possible that loop
bound SCEV is loop invariant, but instruction used to compute it
resides within loop. In such case adjusting loop bound in preheader
using IRBuilder leads to malformed SSA.
Use SCEVExpander instead to generate proper instructions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73496

Files:
  llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
  llvm/test/Transforms/IRCE/non-loop-invariant-rhs-instr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73496.240646.patch
Type: text/x-patch
Size: 3679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200127/cf3da744/attachment-0001.bin>


More information about the llvm-commits mailing list