From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Michael Hayes Cc: Richard Henderson , Jamie Lokier , Marc Lehmann , egcs@cygnus.com Subject: Re: GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test Date: Sun, 27 Dec 1998 00:13:00 -0000 Message-id: <19157.914746295@hurl.cygnus.com> References: <13956.46052.667366.129757@ongaonga.elec.canterbury.ac.nz> X-SW-Source: 1998-12/msg00921.html 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