Now, PPCPreIncPrep pass changes a loop to update form and update all load/store with same base accordingly.
We can do more for load/store with same base, for example, convert load/store with same base to ds/dq form. Like:
Generically, this means transforming loops like this:
for (int i = 0; i < n; ++i) { unsigned long x1 = *(unsigned long *)(p + i + 5); unsigned long x2 = *(unsigned long *)(p + i + 9); }
to look like this:
unsigned NewP = p + 5; for (int i = 0; i < n; ++i) { unsigned long x1 = *(unsigned long *)(i + NewP); unsigned long x2 = *(unsigned long *)(i + NewP + 4); }
This testcase was broken, see https://reviews.llvm.org/D69733 for a fix.
We may need to rebase after it.