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: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Sun, 27 Dec 1998 01:11:35 -0700
- 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
- Reply-To: law at cygnus dot com
In message <13956.46052.667366.129757@ongaonga.elec.canterbury.ac.nz>you writ
> I realise you can't do this for named patterns but this is easily
> overcome using named expanders (with exceptions for movMN and addP
> patterns required by reload).
Yup. You have to be pretty careful, particularly with the move & add
patterns.
> What valuable combination opportunities are missed if you write the
> extra condition to only accept the valid operand combinations?
First problem is we'll have a pseudo which is set multiple times and may
die more than once. This inhibits instruction combination.
Even if those problems are fixed, consider:
(set (reg1) (mem (blah))
(set (reg2) (mem (oof))
(set (reg1) (minus (reg1) (reg2)
(set (mem (blah)) (reg1))
We would like to be able to convert that into:
(set (reg2) (mem (oof))
(set (mem (blah)) (minus (mem (blah)) (reg2)
Which reduces register pressure (and we'd like a post-reload splitter to
break it up into the original sequence if a free reg of the proper class can
be found).
However, to get to the desired code takes 2 combinations. ie
step1
(set (reg2) (mem (oof))
(set (reg1) (minus (mem (blah)) (reg2)
(set (mem (blah)) (reg1))
step2:
(set (reg2) (mem (oof))
(set (mem (blah)) (minus (mem (blah)) (reg2)
But we can not perform step1 if we are rejecting cases where the source and
destination do not match.
jeff