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).