On 6/12/23 13:32, Vineet Gupta wrote:
Gave this a try and it seems to fix Andrew's test, but then regresses
the actual large const case: 0x1010101_01010101 : the mem to const_int
transformation was being done in cse1 which no longer happens and the
const pool from initial expand remains all the way into asm generated. I
don't think we want to go back to that state
Was that with just -O1/-Og? I have vague memories of seeing that kind
of behavior. If it was just with -O1 that might be a reasonable tradeoff.
Ok. From reading gccint it seems REG_EQUIV is a stronger form of
equivalence and seems to be prefered by post reload passes, while
REG_EQUAL is more of use in pre-reload.
That's a reasonable way to look at it. In fact it's the allocators that
promote REG_EQUAL to REG_EQUIV when its's safe to do so.
I would also look at reload_cse_regs which should give us some
chance at seeing the value reuse if/when IRA/LRA muck things up.
I'll be out of office for the rest of week, will look into this once I'm
back.
NP.
jeff