[Bug tree-optimization/93745] Redundant store not eliminated with intermediate instruction
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 14 20:50:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93745
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
The store cannot be eliminated with GCC's memory model where stores through a
pointer can change dynamic type.
The extra load you mention can be optimized because if *p and d overlap,
attempt to load from a 'double' stored value via an 'int *' would have invoked
undefined behavior.
More information about the Gcc-bugs
mailing list