[patch] PR33552, match_asm_constraints failures and miscompiles
Richard Guenther
richard.guenther@gmail.com
Thu Sep 27 16:20:00 GMT 2007
On 9/27/07, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> this patch fixes two bugs and changes another thing:
>
> 1) 4.3 can't compile glibc anymore on x86 with -O2 -fPIC , as
> string-inlines.c get's reload failures because match_asm_constraints
> generates a situation with one additional input operand, which reload
> can't handle anymore
> 2) PR 33552 is about a miscompile of gmp, also caused by
> match_asm_constraints, which doesn't check the validity of the
> transform it does, in particular it overwrites an output operand
> without checking that it isn't used also as input.
> 3) We now restrict ourself to only doing the transformation on REG_P
> operands, based on an older discussion. We could also restrict us to
> !MEM_P or to REG_P and subregs of REG_P, but the situation which this
> pass is trying to solve in practice only seems to be with REG_P. This
> let's us also not use copy_rtx.
>
> A former version of this patch was bootstrapped and regtested on
> ia64,ppc,x86_64 and i686. I've restarted the process with this patch.
>
> There are two testcase, from Jakub's comment in PR33552, and one extracted
> from glibc.
>
>
> Ciao,
> Michael.
> PR rtl-optimization/33552
> * function.c (match_asm_constraints_1): Check for overlap in
> inputs and replace all occurences.
>
> dg.target/i386/pr33552.c: New runtime test.
> dg.target/i386/strinline.c: New compile time test.
gcc.target/
This is ok if it passes the re-bootstrap & regtest.
Thanks,
Richard.
More information about the Gcc-patches
mailing list