This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test
- To: law at cygnus dot com
- Subject: Re: GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test
- From: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Date: Sat, 26 Dec 1998 15:20:13 +1300 (NZDT)
- Cc: Richard Henderson <rth at cygnus dot com>, Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>, Marc Lehmann <pcg at goof dot com>, egcs at cygnus dot com
- References: <no.id@egcs.cygnus.com> <19981218003619.B28066@cerebro.laendle><19981220010520.A4999@tantalophile.demon.co.uk><19981220223834.D16580@cerebro.laendle><19981221105213.A5825@tantalophile.demon.co.uk><19981223141815.C12309@dot.cygnus.com>
Jeff Law writes:
> Basically we had something like this before combine:
>
> (set (reg1) (mem (blah))
> (set (reg2) (mem (oof))
> (set (reg3) (minus (reg1) (reg2))
>
> Combine turned that into:
>
> (set (reg3) (minus (mem (blah)) (reg2))
>
> Which is allowed by the predicates for the subsi3 insn.
>
> However, it loses because the first input does not match the output
> operand. This causes spills & reloads and bad code.
Why not use the extra condition to prevent the combination if the
first input does not match the output operand?
Michael.