Re: [PATCH-1, rs6000] Put constant into pseudo at expand when it needs two insns [PR86106]

2023-03-21 Thread HAO CHEN GUI via Gcc-patches
Hi Richard, 在 2023/3/16 15:57, Richard Biener 写道: > I'm not sure if careful constraints massaging like adding magic letters to > alternatives with constants to pessimize them for LRA, making them > more expensive than spilling the constant to a register but avoid > secondary reloads with spilling

Re: [PATCH-1, rs6000] Put constant into pseudo at expand when it needs two insns [PR86106]

2023-03-16 Thread HAO CHEN GUI via Gcc-patches
Hi Richard, 在 2023/3/16 18:36, Richard Biener 写道: > On Thu, Mar 16, 2023 at 10:04 AM HAO CHEN GUI wrote: >> >> Hi Richard, >> >> 在 2023/3/16 15:57, Richard Biener 写道: >>> So this is one way around the lack of CSE/PRE of constant operands. I'd >>> argue that a better spot for this _might_ be LRA

Re: [PATCH-1, rs6000] Put constant into pseudo at expand when it needs two insns [PR86106]

2023-03-16 Thread Richard Biener via Gcc-patches
On Thu, Mar 16, 2023 at 10:04 AM HAO CHEN GUI wrote: > > Hi Richard, > > 在 2023/3/16 15:57, Richard Biener 写道: > > So this is one way around the lack of CSE/PRE of constant operands. I'd > > argue that a better spot for this _might_ be LRA (split the constant out if > > there's a free register av

Re: [PATCH-1, rs6000] Put constant into pseudo at expand when it needs two insns [PR86106]

2023-03-16 Thread HAO CHEN GUI via Gcc-patches
Hi Richard, 在 2023/3/16 15:57, Richard Biener 写道: > So this is one way around the lack of CSE/PRE of constant operands. I'd > argue that a better spot for this _might_ be LRA (split the constant out if > there's a free register available), postreload-[g]cse (CSE the constants) and > then maybe cp

Re: [PATCH-1, rs6000] Put constant into pseudo at expand when it needs two insns [PR86106]

2023-03-16 Thread Richard Biener via Gcc-patches
On Thu, Mar 16, 2023 at 6:35 AM HAO CHEN GUI via Gcc-patches wrote: > > Hi, > Currently, rs6000 directly expands to 2 insns if an integer constant is the > second operand and it needs two insns. For example, addi/addis and ori/oris. > It may not benefit when the constant is used for more than 2

[PATCH-1, rs6000] Put constant into pseudo at expand when it needs two insns [PR86106]

2023-03-15 Thread HAO CHEN GUI via Gcc-patches
Hi, Currently, rs6000 directly expands to 2 insns if an integer constant is the second operand and it needs two insns. For example, addi/addis and ori/oris. It may not benefit when the constant is used for more than 2 times in an extended basic block, just like the case in PR shows. One possib