From 22e350f412b7ef062181024afb3f6d05974759b5 Mon Sep 17 00:00:00 2001 From: wilson Date: Thu, 10 Dec 1992 20:52:48 +0000 Subject: [PATCH] (try_combine): Only use I2DEST as a scratch reg for a split if it does not overlap any inputs of NEWPAT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2857 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/combine.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/combine.c b/gcc/combine.c index 9632ab294a2..269c02cf829 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. */ -- 2.11.0