https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111126
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Raphael M Zinsly from comment #3) > Created attachment 57671 [details] > proposed patch > > This is the same patch I posted in PR114277, it fixes this bug as well. The question is which is more Canonical on gimple. the multiply or the cond_expr. I say the multiply. Since the multiply is. then you just need to add the case to "/* Expand X*Y as X&-Y when Y must be zero or one. */" instead in expr.cc. Though it does some costing which also needs/should be handled too.