On 02/11/2016 08:27 PM, Alan Modra wrote:
On Thu, Feb 11, 2016 at 03:29:05PM +0100, Bernd Schmidt wrote:
On 02/11/2016 10:45 AM, Alan Modra wrote:
Due to uses elsewhere in vsx instructions, reload chooses to put
psuedo 185 in fr31, which can't be used as a base register in the
following:
What code exactly makes the choice of fr31? I assume this is in
reg_renumber, so it's IRA and not reload that's making that decision?
Yes, sorry, I shouldn't have said reload chooses the reg.
PR target/68973
* reloads.c (find_reloads_address_1): For pre/post-inc/dec
with an invalid hard reg, reload just the reg not the entire
pre/post-inc/dec address expression.
Hmm, you're patching tricky code.
Thanks for being willing to review! :)
It's so amazing having Bernd helping out with this stuff.
I'm not sure yet whether this is right or
not. More reload dumps might help if you have them; I'll Cc myself on the
PR.
I've attached rtl dumps to the PR.
My gut feeling is that we want to reload the inner reg before entering this
block of code,
Yes, my first quick hack did just that, then I noticed there was
existing code to reload the inner reg..
I think both approaches can sensibly work. FWIW, there's other ports
where this could be a problem. The PA for example often wants to hold
integer values in FP regs (due to the integer multiply instruction
running in the FP unit). And the PA has auto-inc addressing. There's
probably others with those properties.
I suspect the same handling is needed in the PRE_MODIFY/POST_MODIFY case
immediately before the auto-inc cases. One could argue that handling
ought to be generalized and factor'd out rather than (largely)
duplicated for the cases.
I'll let Bernd own the final review iteration(s) on this issue.
jeff