Commit 884b051a authored by Craig Topper's avatar Craig Topper
Browse files

Recommit "[TypePromotion] Support positive addition amounts in isSafeWrap. (#81690)"

With special case with Add constant is 0.

Original message:
We can support these by changing the sext promotion to -zext(-C) and
replacing a sgt check with ugt. Reframing the logic in terms of how the
unsigned range are affected. More comments in the patch.

The new cases check isLegalAddImmediate to avoid some
regressions in lit tests.
parent a25fa92d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment