Skip to content
Unverified Commit 2829094a authored by Roman Lebedev's avatar Roman Lebedev
Browse files

Reland [InstCombine] Fold `((X - Y) - Z)` to `X - (Y + Z)` (PR49858)

This reverts commit a547b4e2,
relanding commit 31d219d2,
which was reverted because there was a conflicting inverse transform,
which was causing an endless combine loop, which has now been adjusted.

Original commit message:

https://alive2.llvm.org/ce/z/67w-wQ

We prefer `add`s over `sub`, and this particular xform
allows further folds to happen:

Fixes https://bugs.llvm.org/show_bug.cgi?id=49858
parent 93d1d94b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment