Jean Christophe Beyler <jean.christophe.bey...@gmail.com> writes:
> uint64_t foo (void)
> {
>     return data[0] + data[1] + data[2];
> }
>
> And this generates :
>
>     la  r9,data
>     la  r7,data+8
>     ldd r6,0(r7)
>     ldd r8,0(r9)
>     ldd r7,16(r9)
>
> I'm trying to see if there is a problem with my rtx costs function
> because again, I don't understand why it would generate 2 la instead
> of using an offset of 8 and 16.

You probably want to look at the RTL dumps.  This code should have been
expanded with the correct offsets (at least that is what happens on
MIPS).  I don't see how later passes would modify the code other than
removing 2 of the 3 "la rX, data" insns.

Adam

Reply via email to