[PATCH] D103877: [SCEV] Keep common flags when inlining SCEVAddExpr operands.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 8 02:34:56 PDT 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.

Currently, NoWrapFlags are dropped if we inline operands of SCEVAddExpr
operands. As a consequence, we always drop flags when building
expressions like `getAddExpr(A, getAddExpr(B, C, NUW), NUW)`.

We should be able to retain the set of flags common among all inlined
SCEVAddExpr and the original flags.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103877

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
  llvm/test/Analysis/ScalarEvolution/no-wrap-symbolic-becount.ll
  llvm/unittests/Analysis/ScalarEvolutionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103877.350540.patch
Type: text/x-patch
Size: 8530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210608/e5acf43b/attachment.bin>


More information about the llvm-commits mailing list