On Fri, 18 Sep 2020, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 17, 2020 at 01:20:35PM +0200, Richard Biener wrote: > > This adds the capability to look for available negated multiplications > > and divisions, replacing them with cheaper negates. > > It is longer latency than the original insns.
If there's sufficient compute resources yes, it might be. But only if the un-CSEd instructions are close together. If the first multiply is already done the negate will be faster than another multiply. > Combine will try to undo > this, because of that (it depends on the insn costs if that can > succeed). That's fine I guess. > On gimple it is always cheaper, of course. Yep, and we'll also hope of followup transform that will eat the negate and combine it with a followup transform. Richard.