On Sat, Nov 15, 2014 at 06:59:23AM -0600, Segher Boessenkool wrote: > On Fri, Nov 14, 2014 at 08:35:48PM +0100, Bernd Schmidt wrote: > > On 11/14/2014 08:19 PM, Segher Boessenkool wrote: > > >+ /* If I2 is a PARALLEL of two SETs of REGs (and perhaps some CLOBBERs), > > >+ make those two SETs separate I1 and I2 insns, and make an I0 that is > > >+ the original I1. */ > > >+ if (i0 == 0 > > >+ && GET_CODE (PATTERN (i2)) == PARALLEL > > >+ && XVECLEN (PATTERN (i2), 0) >= 2 > > >+ && GET_CODE (XVECEXP (PATTERN (i2), 0, 0)) == SET > > >+ && GET_CODE (XVECEXP (PATTERN (i2), 0, 1)) == SET > > >+ && REG_P (SET_DEST (XVECEXP (PATTERN (i2), 0, 0))) > > >+ && REG_P (SET_DEST (XVECEXP (PATTERN (i2), 0, 1))) > > >+ && !reg_used_between_p (SET_DEST (XVECEXP (PATTERN (i2), 0, 0)), > > >i2, i3) > > >+ && !reg_used_between_p (SET_DEST (XVECEXP (PATTERN (i2), 0, 1)), > > >i2, i3) > > > > Don't we have other code in combine checking the reg_used_between case?
Actually, no, no we don't. Under the old regime (before adding the regno field to log_links), a link links a first insn with its earliest successor that uses any of the regs that first insn sets. This guarantees that in try_combine none of the insns between I2 and I3 will use any of the registers set by I2. Under the new regime (patches 3 and 4) a link links a first insn with its earliest successor that uses a particular reg the first insn sets. For single sets, this is the same as before; but not so for multiple sets. There are only two cases where this matters: this patch, and the code right before it (that never seems to trigger, not on any target; trying to figure out if that is true, and if so, why). New patchset is bootstrapping/testing. Cheers, Segher