[InstCombine] Add folds for `(X + Y) - (W + Z)`
If `Y` and `Z` are constant then we can simplify to `(X - W) + (Y - Z)`. If `Y == Z` we can fold to `X - W`. Note these transform exist outside of InstCombine. The purpose of this commit is primarily to make it so that folds can generate these simplifiable patterns without having to worry about creating an inf loop.
parent
c4d8d916
Please register or sign in to comment