summaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-16 09:39:54 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-16 09:39:54 +0000
commit9074c68bf31d119d6bc64544114bd6fbeb3f5fac (patch)
tree880a3428df52901e36e2c1bd4561bbf71be1211d /gcc/cse.c
parent6b302ced5b59a0eb617b319409e0bca8cda13016 (diff)
downloadgcc-9074c68bf31d119d6bc64544114bd6fbeb3f5fac.tar.gz
* cse.c (cse_insn): Don't lose REG_NON_LOCAL_GOTO note.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77877 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 55fe072105d..4262f4d3275 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5719,10 +5719,20 @@ cse_insn (rtx insn, rtx libcall_insn)
and hope for the best. */
if (n_sets == 1)
{
- rtx new = emit_jump_insn_after (gen_jump (XEXP (src, 0)), insn);
+ rtx new, note;
+ new = emit_jump_insn_after (gen_jump (XEXP (src, 0)), insn);
JUMP_LABEL (new) = XEXP (src, 0);
LABEL_NUSES (XEXP (src, 0))++;
+
+ /* Make sure to copy over REG_NON_LOCAL_GOTO. */
+ note = find_reg_note (insn, REG_NON_LOCAL_GOTO, 0);
+ if (note)
+ {
+ XEXP (note, 1) = NULL_RTX;
+ REG_NOTES (new) = note;
+ }
+
delete_insn (insn);
insn = new;