https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #77 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Created attachment 33788
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33788&action=edit
another reduced test case of compiler/vam

This is an another test case got from compiler/vam test.
The generated code for the second foo call with non LRA compiler at
-O2 looks like

    mov.b    @(7,r8),r0
    extu.b    r0,r7
    mov.b    @(6,r8),r0
    extu.b    r0,r6
    mov.b    @(5,r8),r0
    extu.b    r0,r5
    mov.b    @(4,r8),r0
    jsr    @r9
    extu.b    r0,r4

and the corresponding code with sh-lra is here

    mov.b    @(7,r8),r0
    mov.b    r0,@(1,r15)
    mov.b    @(6,r8),r0
    mov.b    r0,@(2,r15)
    mov.b    @(5,r8),r0
    mov.b    r0,@(3,r15)
    mov.b    @(4,r8),r0
    mov.b    r0,@r15
    mov.b    @(1,r15),r0
    extu.b    r0,r7
    mov.b    @(2,r15),r0
    extu.b    r0,r6
    mov.b    @(3,r15),r0
    extu.b    r0,r5
    mov.b    @r15,r0
    jsr    @r9
    extu.b    r0,r4

Reply via email to