# This is how SpvOpFOrdNotEqual might be implemented. If both values are
# numbers, then it can be replaced with fneu.
(('ior', ('flt', 'a(is_a_number)', 'b(is_a_number)'), ('flt', b, a)), ('fneu', a, b)),
+
+ # Other patterns may optimize the resulting iand tree further.
+ (('umin', ('iand', a, '#b(is_pos_power_of_two)'), ('iand', c, b)),
+ ('iand', ('iand', a, b), ('iand', c, b))),
])
# Float sizes
(('iand', ('ior', a, b), b), b),
(('iand', ('iand', a, b), b), ('iand', a, b)),
+ # It is common for sequences of (x & 1) to occur in large trees. Replacing
+ # an expression like ((a & 1) & (b & 1)) with ((a & b) & 1) allows the "&
+ # 1" to eventually bubble up to the top of the tree.
+ (('iand', ('iand(is_used_once)', a, b), ('iand(is_used_once)', a, c)),
+ ('iand', a, ('iand', b, c))),
+
(('iand@64', a, '#b(is_lower_half_zero)'),
('pack_64_2x32_split', 0,
('iand', ('unpack_64_2x32_split_y', a), ('unpack_64_2x32_split_y', b)))),