[Bug tree-optimization/64992] More optimize opportunity
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 10 13:16:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64992
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, b is not volatile.
The difference is that 2U * (1 == c) we expand during gimplification as
if (1 == c)
iftmp = 2;
else
iftmp = 0;
while b * (1 == c) is expanded as multiplication of the EQ_EXPR result and
nothing at the tree level changes that afterwards. Perhaps something for
match.pd, though not sure if such an transformation is always a win.
More information about the Gcc-bugs
mailing list