(x * y) + x --> x * (y + 1)
(x * y) - x --> x * (y - 1)
https://alive2.llvm.org/ce/z/eMhvQa
This is one of the IR transforms suggested in issue #57255.
This should be better in IR because it removes a use of a variable operand (we already fold the case with a constant multiply operand).
The backend should be able to re-distribute the multiply if that's better for the target.
For reference, this is the block where we try propagating overflow flags. It can be adjusted independently of this patch.