Reduce register pressure by not materializing a constant just for use as an index register for X-Form loads/stores.
For this example:
float test (int *arr) { return arr[2]; }
We currently generate the following code:
li r4, 8 lxsiwax f0, r3, r4 xscvsxdsp f1, f0
With this patch, we will now generate:
addi r3, r3, 8 lxsiwax f0, 0, r3 xscvsxdsp f1, f0
Originally reported in: https://bugs.llvm.org/show_bug.cgi?id=27204