aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-12-10 12:52:48 -0800
committerJim Wilson <wilson@gcc.gnu.org>1992-12-10 12:52:48 -0800
commita70c61d9c4b7f2f6dce6ab54aa68f12b2e42620d (patch)
treecaa934a8efb7b7850d51e138e3e3feea2d0703b6 /gcc/combine.c
parent4090a6b33d502fbee5098555aca7d907e464f204 (diff)
downloadgcc-a70c61d9c4b7f2f6dce6ab54aa68f12b2e42620d.zip
gcc-a70c61d9c4b7f2f6dce6ab54aa68f12b2e42620d.tar.gz
gcc-a70c61d9c4b7f2f6dce6ab54aa68f12b2e42620d.tar.bz2
(try_combine): Only use I2DEST as a scratch reg for
a split if it does not overlap any inputs of NEWPAT. From-SVN: r2857
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 9632ab2..269c02c 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1535,7 +1535,15 @@ try_combine (i3, i2, i1)
convert I2DEST to the mode of the source of NEWPAT if we can. */
m_split = split_insns (newpat, i3);
- if (m_split == 0)
+
+ /* We can only use I2DEST as a scratch reg if it doesn't overlap any
+ inputs of NEWPAT. */
+
+ /* ??? If I2DEST is not safe, and I1DEST exists, then it would be
+ possible to try that as a scratch reg. This would require adding
+ more code to make it work though. */
+
+ if (m_split == 0 && ! reg_overlap_mentioned_p (ni2dest, newpat))
{
/* If I2DEST is a hard register or the only use of a pseudo,
we can change its mode. */