Skip to content
Commit 168d14b1 authored by Lei Huang's avatar Lei Huang
Browse files

[PowerPC] Reduce register pressure by not materializing a constant just for...

[PowerPC] 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
Differential Revision: https://reviews.llvm.org/D35027

llvm-svn: 307553
parent ae9d6db7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment