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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> so something like:
> (for bitop (bit_and bit_ior)
>      cmp   (eq      ne)
>  (simplify
>   (bitop
>    (cmp (bit_and @0 INTEGER_CST@mask1) INTEGER_CST@CST1)
>    (cmp (bit_and @0 INTEGER_CST@mask2) INTEGER_CST@CST2))
>   (with
>    {
>      tree type1 = TREE_TYPE (@0);
>      wide_int mask = wi::to_wide(@mask1) | wi::to_wide(@mask2);
>      wide_int cst1 = wi::to_wide(@cst1);
>      wide_int cst2 = wi::to_wide(@cst2);

Formatting, s/(/ (/g

>    }
>    (if (wi::eq(mask & cst1,mask & cst2))

Ditto, also add space before ,

>     (cmp (bit_and @0 {wide_int_to_tree (type1, mask); } ) { wide_int_to_tree

And here add space before wide_int_to_tree.

> (cst1|cst2, mask); } )

And these arguments need to be (type1, cst1 | cst2), right?
The line is too long, so maybe put the second { wide_int... on another line
indented below (bit_and ?

>     { constant_boolean_node (cmp == EQ_EXPR, type); }))))

Reply via email to