[GlobalISel] Combine `(x + y) - y -> x` and friends
This adds a combine that handles ``` (x + y) - y -> x (x + y) - x -> y x - (y + x) -> 0 - y x - (x + z) -> 0 - z ``` On AArch64, we get added benefit for `0 - y` because it can be selected to a `neg` instruction. Differential Revision: https://reviews.llvm.org/D135010
Loading
Please sign in to comment