https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115055

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-05-13
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
  b_5 = a_3(D) & c_4(D);
  _1 = a_3(D) == 0;
  _2 = (int) _1;
  _6 = b_5 & _2;
  return _6;

I believe reassoc doesn't see that a and (int)(a == 0) are "related" when
ranking ops of the AND, so it fails to appropriately order them and thus
trigger the simplification.  We definitely want to avoid doing n^2
matching combos of all AND operands.

So confirmed, but not necessarily confirming the proposed solution.

Reply via email to