On Wed, 2024-06-26 at 07:22 -0600, Jeff Law wrote:
> Surya's recent patch to IRA improves the code for sh/pr54602-1.c 
> slightly.  Specifically it's able to eliminate a save/restore in the 
> prologue/epilogue and a bit of register shuffling.
> 
> As a result there literally aren't any insns that can be used to fill 
> the delay slot of the return, so a nop gets emitted and the test fails.
> 
> Given there literally aren't any insns to move into the delay slot, the 
> best course of action is to just drop the test.
> 
> Pushed to the trunk.
> 
> Jeff

I can't reproduce what you are saying.
Which triplet and flags is your test setup using?

For this test case, GCC 13 with -m4 -ml -O1 -fno-pic:

_test01:
        mov.l   r8,@-r15
        sts.l   pr,@-r15
        mov.l   .L3,r0
        jsr     @r0
        mov     r6,r8
        add     r8,r0
        lds.l   @r15+,pr
        rts     
        mov.l   @r15+,r8
.L3:
        .long   _test00


current GCC master branch with -m4 -ml -O1 -fno-pic:

_test00:
        mov.l   r8,@-r15
        sts.l   pr,@-r15
        mov.l   .L3,r0
        jsr     @r0
        mov     r6,r8
        add     r8,r0
        lds.l   @r15+,pr
        rts
        mov.l   @r15+,r8
.L4:
        .align 2
.L3:
        .long   _test01


Best regards,
Oleg Endo

Reply via email to