https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114277
Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org, | |rzinsly at ventanamicro dot com --- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> --- The other approach we could take (and which I think may have certain advantages) would be to first realize this is a multiplication by a boolean (0/1) value. That's just a conditional move. If we then rewrote as a conditional move there's a reasonable chance we'd be able to further simplify. The biggest problem with this approach is if we're aggressively transforming into conditional moves in gimple, the expanders will need improvement, particularly on targets that don't have conditional moves. Raphael has a TODO in this space. He may have further thoughts.