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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[17 Regression] wrong code  |[17 Regression] wrong code
                   |for int-bwise-opt           |for int-bwise-opt since
                   |                            |r17-231

--- Comment #4 from Drea Pinski <pinskia at gcc dot gnu.org> ---
0,0 case
(a != b) & ((a | b) == 0)
(0 != 0) & ((0|0) == 0)
false    &   true
       false

(a == b) | ((a|b) != 0)
(0 == 0) | ((0|0) != 0)
true     |      false
        true

1,0 case:
(1 != 0) & ((1|0) == 0)
true     &   false
       false

(1 == 0) | ((1|0) != 0)
false    |    true
        true

(In reply to Richard Biener from comment #3)
> The folding result needs to be (neeql @0 @1), not a constant, no?

No, I swapped around the comparison when I simplified it. It should have been
`bitop==BIT_IOR_EXPR`. 

r17-231-gc65691bc5a2873

Reply via email to