[Bug tree-optimization/71383] Misoptimized branch with inline assembly code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71383 --- Comment #3 from Andrew Pinski --- If you marked the variable as used the branch comes back. This definitely should be referenced too. https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Variable-Attributes.html#index-used-variable-attribute
[Bug tree-optimization/71383] Misoptimized branch with inline assembly code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71383 Richard Biener changed: What|Removed |Added CC||hubicka at gcc dot gnu.org --- Comment #2 from Richard Biener --- Honza made IPA reference work with IPA REFs which obviously do not exist for this kind of may-uses/defs.
[Bug tree-optimization/71383] Misoptimized branch with inline assembly code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71383 Richard Biener changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIRMED |NEW Last reconfirmed||2016-06-02 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- Strictly speaking your asm should be incorrect as GCC does not consider it to use/clobber "local" global memory. That manifests itself in IPA reference computing that bar is not accessing 'a' and thus we can optimize the load across the call. So, kind-of confirmed.