Re: [PATCH] ssa-math-opts, i386: Improve spaceship expansion [PR116896]

2024-10-07 Thread Richard Biener
On Mon, 7 Oct 2024, Jakub Jelinek wrote: > On Mon, Oct 07, 2024 at 08:59:56AM +0200, Richard Biener wrote: > > The forwprop added optmization looks like it would match PHI-opt better, > > but I'm fine with leaving it in forwprop. I do wonder whether instead > > of adding a flag adding the actual

Re: [PATCH] ssa-math-opts, i386: Improve spaceship expansion [PR116896]

2024-10-07 Thread Jakub Jelinek
On Mon, Oct 07, 2024 at 08:59:56AM +0200, Richard Biener wrote: > The forwprop added optmization looks like it would match PHI-opt better, > but I'm fine with leaving it in forwprop. I do wonder whether instead > of adding a flag adding the actual values wanted as argument to > .SPACESHIP would al

Re: [PATCH] ssa-math-opts, i386: Improve spaceship expansion [PR116896]

2024-10-07 Thread Richard Biener
On Fri, 4 Oct 2024, Uros Bizjak wrote: > On Fri, Oct 4, 2024 at 11:58 AM Jakub Jelinek wrote: > > > > Hi! > > > > The PR notes that we don't emit optimal code for C++ spaceship > > operator if the result is returned as an integer rather than the > > result just being compared against different va

Re: [PATCH] ssa-math-opts, i386: Improve spaceship expansion [PR116896]

2024-10-04 Thread Uros Bizjak
On Fri, Oct 4, 2024 at 11:58 AM Jakub Jelinek wrote: > > Hi! > > The PR notes that we don't emit optimal code for C++ spaceship > operator if the result is returned as an integer rather than the > result just being compared against different values and different > code executed based on that. > So

[PATCH] ssa-math-opts, i386: Improve spaceship expansion [PR116896]

2024-10-04 Thread Jakub Jelinek
Hi! The PR notes that we don't emit optimal code for C++ spaceship operator if the result is returned as an integer rather than the result just being compared against different values and different code executed based on that. So e.g. for template auto foo (T x, T y) { return x <=> y; } for both