On 8/1/23 16:27, Jeff Law wrote:
On 8/1/23 17:13, Vineet Gupta wrote:
On 8/1/23 16:06, Philipp Tomsich wrote:
Very helpful! Looks as if regprop for stack_pointer is now either too
conservative — or one of our patches is missing in everyone's test
setup; we'll take a closer look.
FWIW, all 5 of them involve a SH2ADD have SP as source in the fold FP
case which f-m-o seems to be generating a MV for.
To clarify f-m-o isn't generating the mv. It's simplifying a sequence
by pushing the constant in an addi instruction into the memory
reference. As a result the addi simplifies into a sp->reg copy that
is supposed to then be propagated away.
Yep, that's clear.
Also note that getting FP out of the shift-add sequences is the other
key goal of Jivan's work. FP elimination always results in a
spill/reload if we have a shift-add insn where one operand is FP.
Hmm, are you saying it should NOT be generating shift-add with SP as
src, because currently thats exactly what fold FP offset *is* doing and
is the reason it has 5 less insns.
-Vineet