[Bug tree-optimization/70547] Optimize multiplication of booleans to bit_and

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 10 06:56:00 GMT 2018


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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
/* (m1 CMP m2) * d -> (m1 CMP m2) ? d : 0  */
(for cmp (gt lt ge le)
(simplify
 (mult (convert (cmp @0 @1)) @2)
  (cond (cmp @0 @1) @2 { build_zero_cst (type); })))


Should have caught that ...
NOTE I think that might have been broken for floating point ....


More information about the Gcc-bugs mailing list