[PATCH] RISC-V: costs: miscomputed shiftadd_cost triggering synth_mult [PR/108987]

2023-03-01 Thread Vineet Gupta
This showed up as dynamic icount regression in SPEC 531.deepsjeng with upstream gcc (vs. gcc 12.2). gcc was resorting to synthetic multiply using shift+add(s) even when multiply had clear cost benefit. |000133b8 : | 133b8: srl a3,a1,s6 | 133bc: and a3,a3,s5 | 133c0:

Re: [PATCH] RISC-V: costs: miscomputed shiftadd_cost triggering synth_mult [PR/108987]

2023-03-23 Thread Kito Cheng via Gcc-patches
Committed 2 weeks ago but apparently I didn't send mail to say that, thanks Vineet. On Thu, Mar 2, 2023 at 3:56 AM Philipp Tomsich wrote: > > On Wed, 1 Mar 2023 at 20:53, Vineet Gupta wrote: > > > > This showed up as dynamic icount regression in SPEC 531.deepsjeng with > > upstream > > gcc (vs.

Re: [PATCH] RISC-V: costs: miscomputed shiftadd_cost triggering synth_mult [PR/108987]

2023-03-01 Thread Philipp Tomsich
On Wed, 1 Mar 2023 at 20:53, Vineet Gupta wrote: > > This showed up as dynamic icount regression in SPEC 531.deepsjeng with > upstream > gcc (vs. gcc 12.2). gcc was resorting to synthetic multiply using shift+add(s) > even when multiply had clear cost benefit. > > |000133b8 .constprop.0]