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

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> "(x | y) == x" is simpler than "(y & ~x) == 0" on the tree level. 2 gimple
> vs 3.

We do indeed tend to use the number of stmts to chose canonical forms on
gimple, but that's not the only possible criterion. The second form uses x only
once instead of twice ("simpler" as in: fewer uses), and there are a number of
gimple optimizations that are gated by single_use, which arguably gives some
advantage to the second form. (I am not saying we should pick the second form,
just that the choice may not be completely obvious)

Reply via email to