summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorjingyu <jingyu@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-15 21:54:01 +0000
committerjingyu <jingyu@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-15 21:54:01 +0000
commit92c624a375e7b7a3af1cc5da0a473bacdf046692 (patch)
tree58ebeac6f70fabacbde6abba8c1de445738f945e /gcc/combine.c
parent9b464fe51fcd8443d5c62831df4ae3e9b8eee627 (diff)
downloadgcc-92c624a375e7b7a3af1cc5da0a473bacdf046692.tar.gz
2010-01-15 Jing Yu <jingyu@google.com>
PR rtl-optimization/42691 * combine.c (try_combine): Set changed_i3_dest to 1 when I2 and I3 set a pseudo to a constant and are merged, and adjust comments. 2010-01-15 Jing Yu <jingyu@google.com> PR rtl-optimization/42691 * gcc.c-torture/execute/pr42691.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155948 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 5ae557c180a..e5d4c5aafc2 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2663,10 +2663,16 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
i2dest = SET_DEST (temp);
i2dest_killed = dead_or_set_p (i2, i2dest);
+ /* Replace the source in I2 with the new constant and make the
+ resulting insn the new pattern for I3. Then skip to where we
+ validate the pattern. Everything was set up above. */
SUBST (SET_SRC (temp),
immed_double_const (olo, ohi, GET_MODE (SET_DEST (temp))));
newpat = PATTERN (i2);
+
+ /* The dest of I3 has been replaced with the dest of I2. */
+ changed_i3_dest = 1;
goto validate_replacement;
}
}
@@ -3038,8 +3044,6 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
}
}
- /* We come here when we are replacing a destination in I2 with the
- destination of I3. */
validate_replacement:
/* Note which hard regs this insn has as inputs. */