http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46309

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-30 
20:18:59 UTC ---
Well, the original issue isn't fully fixed.  If the gimplifier decides to split
the conditions into multiple basic blocks, i.e. if it isn't
tmp1 = a == 1;
tmp2 = a == 3;
tmp3 = a == 4;
tmp4 = a == 2;
tmp5 = tmp1 | tmp2;
tmp6 = tmp5 | tmp3;
x = tmp6 | tmp4;
but instead
if (a == 1)
  goto <bb X>;
if (a == 3)
  goto <bb X>;
if (a == 4)
  goto <bb X>;
if (a == 2)
  goto <bb X>;
x = 0;
goto <bb Y>;
X:
x = 1;
or similar (e.g. two comparisons BIT_IOR_EXPRed together, then jump), then this
optimization isn't performed.

Reply via email to