This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
splitting special case in scan_one_insn? (regclass)
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Eric Christopher <echristo at apple dot com>
- Date: Tue, 27 Feb 2007 10:21:09 +0100
- Subject: splitting special case in scan_one_insn? (regclass)
As per the discussion in http://gcc.gnu.org/ml/gcc/2004-03/msg01711.html
which ended in nothing. The comment starts like this:
/* Improve handling of two-address insns such as
(set X (ashift CONST Y)) where CONST must be made to
match X. */
Summary:
1) At the time the transformation could not be triggered on any of
x86-linux, mips-elf, sh-elf, arm-elf and I don't see why it should be
different now.
2) In fact, the instruction is probably invalid on all those targets,
and they use a target-specific splitter or (more likely) a define_expand
to do this. So the insn would probably not even pass the predicates.
3) If anywhere, this option would belong in regmove.
To add my two cents to item (2): anybody knows a reason why a target
should not use a define_expand (and thus benefit of loop invariant
hoisting, CSE, etc. etc.) nowadays? This would yield both benefits
since the (ashift CONST Y) would still be there as a REG_EQUAL note, at
least after CSE or fwprop.
The code predates the GCC subversion repository.
Paolo