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.