This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
regclass.c: scan_one_insn special casing
- From: Eric Christopher <echristo at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 27 Mar 2004 11:54:17 -0800
- Subject: regclass.c: scan_one_insn special casing
There's this code in scan_one_insn:
/* Improve handling of two-address insns such as
(set X (ashift CONST Y)) where CONST must be made to
match X. Change it into two insns: (set X CONST)
(set X (ashift X Y)). If we left this for reloading, it
would probably get three insns because X and Y might go
in the same place. This prevents X and Y from receiving
the same hard reg.
We can only do this if the modes of operands 0 and 1
(which might not be the same) are tieable and we only need
do this during our first pass. */
if (pass == 0 && optimize
&& recog_data.n_operands >= 3
&& recog_data.constraints[1][0] == '0'
&& recog_data.constraints[1][1] == 0
&& CONSTANT_P (recog_data.operand[1])
&& ! rtx_equal_p (recog_data.operand[0], recog_data.operand[1])
&& ! rtx_equal_p (recog_data.operand[0], recog_data.operand[2])
&& GET_CODE (recog_data.operand[0]) == REG
&& MODES_TIEABLE_P (GET_MODE (recog_data.operand[0]),
recog_data.operand_mode[1]))
{
....
That appears to do something a port specific splitter would do. Now,
I've also looked and mips has a splitter that does something similar,
I'm not sure about other ports. I'm also really curious what port this
was added in for and perhaps the testcase...
I added an abort () right after the if statement above, and bootstrapped
and tested on x86-linux, mips-elf, sh-elf, arm-elf and couldn't trip it.
Any thoughts? I also have a patch to just remove it.
-eric
--
Eric Christopher <echristo@redhat.com>