HomePhabricator

[SCEV] Keep common NUW flags when inlining Add operands.

Authored by fhahn on Jun 9 2021, 3:06 AM.

Description

[SCEV] Keep common NUW flags when inlining Add operands.

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 NUW flags common among all inlined
SCEVAddExpr and the original flags.

Reviewed By: nikic, mkazantsev

Differential Revision: https://reviews.llvm.org/D103877

Details

Committed
fhahnJun 9 2021, 9:13 AM
Reviewer
nikic
Differential Revision
D103877: [SCEV] Keep common NUW flags when inlining Add operands.
Parents
rGacc3ca3b7a08: Fix typo in Toy tutorial Ch1
Branches
Unknown
Tags
Unknown