[Bug inline-asm/87984] [7/8/9 Regression] wrong code for local reg var input to asm

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 8 12:13:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87984

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #16)
>   /* Clobber all memory and addressable symbols for asm ("" : : : "memory");
> */
>   if (gimple_asm_clobbers_memory_p (stmt))
>     add_virtual_operand (fn, stmt, opf_def);
> 
> that would need to include walking all local and global reg vars and
> architecturally comparing the underlying register.  Note how

We could cache a bool in struct function whether the function has any local
hard register vars and just propagate that info during inlining etc. and just
add virtual operand if there are any clobbers and any local register vars (or
with that condition check them).


More information about the Gcc-bugs mailing list