[Bug tree-optimization/64567] missed optimization: redundant test before clearing bit(s)
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 13 21:08:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64567
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Rasmus Villemoes from comment #2)
> (In reply to Andreas Schwab from comment #1)
> > This transformation is incorrect if the lvalue may be pointing to a
> > read-only object.
>
> True. And one may also incur an extra cache penalty if the cache line
> containing foo was already held shared but not exclusive.
Or incorrect due to C11/C++11 memory model. Anyways it is correct for scalar
auto variables and this should be transformed at the gimple level if not
already.
More information about the Gcc-bugs
mailing list