This is the mail archive of the gcc-patches@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]

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


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