On 09/05/16 16:08, Segher Boessenkool wrote:
Hi Christophe,

On Mon, May 09, 2016 at 03:54:26PM +0200, Christophe Lyon wrote:
After this patch, I've noticed that
gcc.target/arm/pr43920-2.c
now fails at:
/* { dg-final { scan-assembler-times "pop" 2 } } */

Before the patch, the generated code was:
[...]
         pop     {r3, r4, r5, r6, r7, pc}
.L4:
         mov     r0, #-1
.L1:
         pop     {r3, r4, r5, r6, r7, pc}

it is now:
[...]
.L1:
         pop     {r3, r4, r5, r6, r7, pc}
.L4:
         mov     r0, #-1
         b       .L1

The new version does not seem better, as it adds a branch on the path
and it is not smaller.
That looks like bb-reorder isn't doing its job?  Maybe it thinks that
pop is too expensive to copy?
I think so. Filed PR71061

ARM backend is not setting the length attribute correctly, that the bb
failed copy_bb_p check.

Unfortunately I am afraid even we fixed the backend length issue, this testcase will keep failing, because it's specify "-Os" that some bb copy won't be triggerd.

Reply via email to