From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hayes To: law@cygnus.com 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: Fri, 25 Dec 1998 18:17:00 -0000 Message-id: <13956.18174.396993.213410@ongaonga.elec.canterbury.ac.nz> References: <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> X-SW-Source: 1998-12/msg00910.html 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.