aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2001-09-21 14:39:28 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2001-09-21 14:39:28 +0000
commit7106d491044fec66141ed9defe95d80650f374e0 (patch)
tree1361fc790de66f92cceffd8d029e83579c26a96d /gcc
parent53c170316f895dc3dfa7173e69fc43b15b7acb1a (diff)
downloadgcc-7106d491044fec66141ed9defe95d80650f374e0.zip
gcc-7106d491044fec66141ed9defe95d80650f374e0.tar.gz
gcc-7106d491044fec66141ed9defe95d80650f374e0.tar.bz2
cfgcleanup.c (flow_find_cross_jump): Delete any REG_EQUAL notes that would be invalid after a merge.
* cfgcleanup.c (flow_find_cross_jump): Delete any REG_EQUAL notes that would be invalid after a merge. From-SVN: r45727
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cfgcleanup.c16
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4dfc2e0..49148b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+21-09-2001 Richard Earnshaw (reanrsha@arm.com)
+
+ * cfgcleanup.c (flow_find_cross_jump): Delete any REG_EQUAL notes
+ that would be invalid after a merge.
+
Fri Sep 21 14:24:29 CEST 2001 Jan Hubicka <jh@suse.cz>
* basic-block.h (flow_delete_insn, flow_delete_insn_chain): Kill.
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 314d9f4..a3ddcac 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++;