From 9cc96794cc35d136c2b229c636c1495fac1d12ab Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 18 Jun 1996 06:37:45 -0400 Subject: [PATCH] (try_combine): Don't use split if dest of new I2 is used between I2 and I3. From-SVN: r12293 --- gcc/combine.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/combine.c b/gcc/combine.c index 9427060d9c6..3dbdb183e5d 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1802,9 +1802,12 @@ try_combine (i3, i2, i1) &i2_scratches); /* If I2 or I3 has multiple SETs, we won't know how to track - register status, so don't use these insns. */ + register status, so don't use these insns. If I2's destination + is used between I2 and I3, we also can't use these insns. */ - if (i2_code_number >= 0 && i2set && i3set) + if (i2_code_number >= 0 && i2set && i3set + && (next_real_insn (i2) == i3 + || ! reg_used_between_p (SET_DEST (i2set), i2, i3))) insn_code_number = recog_for_combine (&newi3pat, i3, &new_i3_notes, &i3_scratches); if (insn_code_number >= 0) -- 2.30.2