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?
+ && (XVECLEN (PATTERN (i2), 0) == 2 + || GET_CODE (XVECEXP (PATTERN (i2), 0, 2)) == CLOBBER))
This probably wants to test for XVECLEN == 3 for the second case. Can then drop the earlier test.
I think you also need to check that !reg_overlap_mentioned_p between the two dests and the other set's sources.
Bernd