On Tue, 7 Jul 2015, Hurugalawadi, Naveen wrote:

Please find attached the patch "PR23664.patch" that converts the pattern:-
(a & C1) + (b & C2) into (a & C1) | (b & C2) iff (C1 & C2) == 0.

We already have the following. I believe it would be better to merge them (use a 'for').

(simplify
 (bit_xor (convert1? (bit_and@4 @0 INTEGER_CST@1))
          (convert2? (bit_and@5 @2 INTEGER_CST@3)))
 (if (tree_nop_conversion_p (type, TREE_TYPE (@0))
      && tree_nop_conversion_p (type, TREE_TYPE (@2))
      && wi::bit_and (@1, @3) == 0)
  (bit_ior (convert @4) (convert @5))))

--
Marc Glisse

Reply via email to