This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: regclass.c: scan_one_insn special casing


> 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...

What mips.md splitter are you talking about?

> 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.

I am not surprised that you couldn't trigger it on sh-elf.  The
arithmetic/logical instructions that allow constant operands do so only
for the second input operand.
The instruction that is tested for is not even valid for the port.
(The transformation is done by define_expands, or in the case of having
 just a define_insn with a predicate disallowing constants for operand 1,
 by the generic rtl generation code.)
Actually, I can't think of a port where it is valid.

As to the question where else we could have put this optimization if it
had merit, we could have put it into regmove.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]