> First, it seems to me that in your case:
> 
> (1) a = a | 1 /* a |= 1 */
> (2) a = a | 1 /* a |= 1 */
> 
> the expressions "a | 1" in (1) and (2) are different as the "a"
> is not the same. So there is nothing to do for CSE.

It's not a CSE issue, but after (1), you know that the low-order bit of
"a" is a one, so that (2) is a no-op.  Note that the similar
        a &= ~1;
        a &= ~1;

we do catch in combine.

It could also be caught by converting

        a = ((a | 1) | 1);

into

        a = (a | (1 | 1));

Reply via email to