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

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
It is different to gcc because in the first case, tmp is used twice, while in
the second case, each a&b is only used once, and gcc only transforms (a&b)^b to
b&~a if this is the only use of a&b. Yes, this heuristic often backfires, but
as long as we consider &~ as 2 operations, not restricting the transformation
could generate worse code in some cases.

Reply via email to