http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51708



Oleg Endo <olegendo at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |olegendo at gcc dot gnu.org



--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-09-23 17:10:44 
UTC ---

Another test case, which is probably easier to write a testsuite case for:



int test00 (int tab[], int i, int j, int tab2[])

{

  return tab[i * 8192 + 4] + tab2[j * 8192 + 8];

}



compiles to (OK):

        mov     #15,r1

        shld    r1,r5

        shld    r1,r6

        add     r5,r4

        add     r6,r7

        mov.l   @(16,r4),r0

        mov.l   @(32,r7),r1

        rts

        add     r1,r0





int test01 (int tab[], int i, int j, int tab2[])

{

  return (tab[i * 8192 + 4] + tab2[j * 8192 + 8]) * 15;

}



complies to (NG):

        mov     #15,r1

        mov     #15,r2

        shld    r1,r5

        shld    r2,r6

        add     r5,r4

        add     r6,r7

        mov.l   @(16,r4),r1

        mov.l   @(32,r7),r2

        add     r2,r1

        mov     r1,r0

        shll2   r0

        shll2   r0

        rts

        sub     r1,r0

Reply via email to