This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Don't create pseudos after no_new_pseudos on SH
On Sun, Nov 17, 2002 at 08:11:38PM -0200, Alexandre Oliva wrote:
> On Nov 15, 2002, Daniel Jacobowitz <drow@mvista.com> wrote:
>
> > After some indirect prompting from Alexandre, I came up with this patch; I'm
> > not sure it's the best approach, but it passes regtest on sh-hms-sim and
> > fixes my problem. Thoughts?
>
> Even though the patch is technically correct, it may cause slightly
> worse code to be generated for zero_extendhisi2, since it is only
> zero_extendqisi2 that calls copy_to_mode_reg() (look at the definition
> of these patterns in sh.md).
Hmm, zero_extendhisi2 also says:
if (! TARGET_SHMEDIA && ! arith_reg_operand (operands[1], HImode))
operands[1] = copy_to_mode_reg (HImode, operands[1]);
> That said, I kind of doubt zero_extendhisi2 would be able to handle
> macl as the input operand; perhaps it should also be adjusted to
> copy_to_mode_reg() if the input operand doesn't match
> general_movsrc_operand? Hmm... But macl *would* match
> general_movsrc_operand, even though macl wouldn't satisfy the `r'
> constraint. Eek. This looks broken. Well, not entirely broken,
> since reload will presumably fix it up in most cases, but not in this
> one, since reload will have already run.
>
> So... You patch is correct, after all. Please check it in, as well
> as in the 3.2 branch, if it a regression and the branch is open.
OK. I've checked it in on the mainline. Mark, this is a regression
from 2.95.3 on SH; after 3.2.1 is released may I commit it to the 3.2
branch?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer