aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-06-18 06:37:45 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-06-18 06:37:45 -0400
commit9cc96794cc35d136c2b229c636c1495fac1d12ab (patch)
treed2022f40d0d93b918ae2715139f5c04ca26b7630 /gcc
parent0b04ec8c2190fe80e0799c61f42549a6194e3979 (diff)
downloadgcc-9cc96794cc35d136c2b229c636c1495fac1d12ab.zip
gcc-9cc96794cc35d136c2b229c636c1495fac1d12ab.tar.gz
gcc-9cc96794cc35d136c2b229c636c1495fac1d12ab.tar.bz2
(try_combine): Don't use split if dest of new I2 is used between I2
and I3. From-SVN: r12293
Diffstat (limited to 'gcc')
-rw-r--r--gcc/combine.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 9427060..3dbdb18 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)