summaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-21 14:39:28 +0000
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-21 14:39:28 +0000
commitab33a25a2d13147b0d1bb5a167fdb79c264b8f41 (patch)
tree1361fc790de66f92cceffd8d029e83579c26a96d /gcc/cfgcleanup.c
parente4bf866d3b6dcde0717eea60e420ff147a7b0304 (diff)
downloadgcc-ab33a25a2d13147b0d1bb5a167fdb79c264b8f41.tar.gz
* cfgcleanup.c (flow_find_cross_jump): Delete any REG_EQUAL notes
that would be invalid after a merge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 314d9f401cf..a3ddcac872e 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -583,6 +583,22 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2)
/* Don't begin a cross-jump with a USE or CLOBBER insn. */
if (GET_CODE (p1) != USE && GET_CODE (p1) != CLOBBER)
{
+ /* If the merged insns have different REG_EQUAL notes, then
+ remove them. */
+ rtx equiv1 = find_reg_equal_equiv_note (i1);
+ rtx equiv2 = find_reg_equal_equiv_note (i2);
+
+ if (equiv1 && !equiv2)
+ remove_note (i1, equiv1);
+ else if (!equiv1 && equiv2)
+ remove_note (i2, equiv2);
+ else if (equiv1 && equiv2
+ && !rtx_equal_p (XEXP (equiv1, 0), XEXP (equiv2, 0)))
+ {
+ remove_note (i1, equiv1);
+ remove_note (i2, equiv2);
+ }
+
afterlast1 = last1, afterlast2 = last2;
last1 = i1, last2 = i2;
ninsns++;