Re: [PATCH] hppa: PR middle-end/87256: Improved hppa_rtx_costs avoids synth_mult madness.

2020-08-26 Thread Jeff Law via Gcc-patches
On Wed, 2020-08-26 at 12:19 +0100, Roger Sayle wrote: > Hi Dave, > > > This change is also fine. > > > > The gcc.target/hppa/shadd-2.c test now fails because there are two > additional sh1add instructions. > > However, the total number of instructions is the same as before. > > Just to be on

RE: [PATCH] hppa: PR middle-end/87256: Improved hppa_rtx_costs avoids synth_mult madness.

2020-08-26 Thread Roger Sayle
Hi Dave, > This change is also fine. > > The gcc.target/hppa/shadd-2.c test now fails because there are two additional sh1add instructions. > However, the total number of instructions is the same as before. Just to be on the safe side, I took a deeper look into this. We're now generating a

Re: [PATCH] hppa: PR middle-end/87256: Improved hppa_rtx_costs avoids synth_mult madness.

2020-08-25 Thread John David Anglin
On 2020-08-21 2:41 p.m., Roger Sayle wrote: > 2020-08-21 Roger Sayle > > gcc/ChangeLog > PR middle-end/87256 > * config/pa/pa.c (hppa_rtx_costs_shadd_p): New helper function > to check for coefficients supported by shNadd and shladd,l. > (hppa_rtx_costs): Rewrite to

[PATCH] hppa: PR middle-end/87256: Improved hppa_rtx_costs avoids synth_mult madness.

2020-08-21 Thread Roger Sayle
This is my proposed fix to PR middle-end/87256 where synth_mult takes an unreasonable amount of CPU time determining an optimal sequence of instructions to perform multiplications by (large) integer constants on hppa. One workaround, proposed in bugzilla, is to increase the hash table used to