This patch enhances the InstCombine pass to optimize addition and
subtraction operations involving splat values optionally multiplied
by a constant or shifted by a constant. The transformation combines
the operations as follows:
(A +/- splat(B)) +/- splat(C) -> A +/- splat(B +/- C)
This optimization improves the performance of vectorized code with
interleave factor > 1, where indices are part of an expression.
For example, in cases such as the following loop:
for (int i = A; i < B; ++i) out[i + offset] = (i + X) * Y;
It's worth verifying but I don't think you need the commutative version here because constants should always be canonicalised to the RHS.