[Bug inline-asm/87984] [7/8/9 Regression] wrong code for local reg var input to asm
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Fri Feb 8 19:08:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87984
--- Comment #27 from rguenther at suse dot de <rguenther at suse dot de> ---
On February 8, 2019 6:35:29 PM GMT+01:00, "jakub at gcc dot gnu.org"
<gcc-bugzilla@gcc.gnu.org> wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87984
>
>--- Comment #24 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
>FRE doesn't, as that breaks the #c9 testcase.
> a = 1;
> __asm__("add %1, %0" : "=r" o_12 : "r" a, "0" 0);
> __asm__ __volatile__("xor %%eax, %%eax" : : : "eax");
> i_13 = 1;
> a = 1;
> __asm__("add %1, %0" : "=r" o_18 : "r" a, "0" o_12);
> __asm__ __volatile__("xor %%eax, %%eax" : : : "eax");
> i_19 = 2;
> a = 1;
> __asm__("add %1, %0" : "=r" o_24 : "r" a, "0" o_18);
> __asm__ __volatile__("xor %%eax, %%eax" : : : "eax");
> i_25 = 3;
>to:
> a = 1;
> __asm__("add %1, %0" : "=r" o_12 : "r" a, "0" 0);
> __asm__ __volatile__("xor %%eax, %%eax" : : : "eax");
> __asm__("add %1, %0" : "=r" o_18 : "r" a, "0" o_12);
> __asm__ __volatile__("xor %%eax, %%eax" : : : "eax");
> __asm__("add %1, %0" : "=r" o_24 : "r" a, "0" o_18);
> __asm__ __volatile__("xor %%eax, %%eax" : : : "eax");
>If SCCVN would never record values for DECL_HARD_REGISTER vars or
>something
>similar, it wouldn't do this.
OK. I guess I misremember and it hurt never elides sets of reg vars.
Richard.
More information about the Gcc-bugs
mailing list