This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x86 reload bug in merge_assigned_reloads
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: Jim Wilson <wilson at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 07 Oct 2002 18:21:03 +0100
- Subject: Re: x86 reload bug in merge_assigned_reloads
- Organization: SuperH UK Ltd.
> merge_assigned_reloads decides to merge reload 1 with reload 3 which is OK.
> This converts reload 1 into a RELOAD_OTHER. We then call the function
> reg_overlap_mentioned_for_reload_p to check to see if any other reloads
> must also be converted to RELOAD_OTHER. This function notices that both
> reg 58 and reg 61 are pseudos with reg_equiv_memory_loc nonzero, so it
> assumes both are MEMs and thus conflict. Likewise for reg 59 and reg 61.
merge_assigned_reloads really only wants to know if one reload can be
an address reload for the other, i.e. if it loads a subexpression. That is
basically what reg_mentioned_p tests, except that if there is a register mentioned
in 'IN', we want to test also reg_equiv_memory_loc.
So I suggest we use for_each_rtx with a new helper function to check rld[i].in
and all reg_equiv_memory_locs for registers found there - and recursively also
for registers found in these memory locations (as second parameter) - with
reg_mentioned_p against rld[j].in (as first parameter to reg_mentioned_p).
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658