This patch adds an analysis of the offset addresses used by gathers and scatters to the MVEGatherScatterLowering pass to find multiplications and additions that are loop invariant and thus can be moved into the loop preheader, avoiding to execute them each time.
An add where a constant or a loop invariant value is added to the phi value can be added to the start value of the phi and thereby removed from the loop completely.
A mul of the phi value and a constant/loop invariant value can be transformed into an add inside the loop, each iteration adding the product of the loop increment and the loop invariant operand of the mul to the phi value.
If there are other users of the phi, it will be duplicated.
Is Increment used yet? Or is that needed in a later patch.