This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] shrink-wrap: Remove complicated simple_return manipulations
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Christophe Lyon <christophe dot lyon at linaro dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 May 2016 10:08:21 -0500
- Subject: Re: [PATCH 3/3] shrink-wrap: Remove complicated simple_return manipulations
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1462256244 dot git dot segher at kernel dot crashing dot org> <01b8913890f998c3c3c46d770fc90fb8c1236099 dot 1462256245 dot git dot segher at kernel dot crashing dot org> <CAKdteOa401-yfDUEQ3M+TnitdL3kSrcNyBPWR5XyPGGf3eDvfQ at mail dot gmail dot com>
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?
Segher