diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-16 15:21:48 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-16 15:21:48 +0000 |
commit | 114c1eb1850c2e4bd8e50872496413a1df1feac2 (patch) | |
tree | 31215e026f8a9997d381ceb850129aefed72d547 /gcc/sel-sched-ir.c | |
parent | 313b310172f1ea26cf70ce2470639f1ef547a02a (diff) | |
download | gcc-114c1eb1850c2e4bd8e50872496413a1df1feac2.tar.gz |
PR debug/51557
* sel-sched-ir.c (create_copy_of_insn_rtx): Copy all notes
other than REG_EQUAL, REG_EQUIV and REG_LABEL_OPERAND.
* gcc.dg/pr51557.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r-- | gcc/sel-sched-ir.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index dacee0b9e9b..a93cd68d1a3 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -5723,7 +5723,7 @@ create_vinsn_from_insn_rtx (rtx insn_rtx, bool force_unique_p) rtx create_copy_of_insn_rtx (rtx insn_rtx) { - rtx res; + rtx res, link; if (DEBUG_INSN_P (insn_rtx)) return create_insn_rtx_from_pattern (copy_rtx (PATTERN (insn_rtx)), @@ -5733,6 +5733,22 @@ create_copy_of_insn_rtx (rtx insn_rtx) res = create_insn_rtx_from_pattern (copy_rtx (PATTERN (insn_rtx)), NULL_RTX); + + /* Copy all REG_NOTES except REG_EQUAL/REG_EQUIV and REG_LABEL_OPERAND + since mark_jump_label will make them. REG_LABEL_TARGETs are created + there too, but are supposed to be sticky, so we copy them. */ + for (link = REG_NOTES (insn_rtx); link; link = XEXP (link, 1)) + if (REG_NOTE_KIND (link) != REG_LABEL_OPERAND + && REG_NOTE_KIND (link) != REG_EQUAL + && REG_NOTE_KIND (link) != REG_EQUIV) + { + if (GET_CODE (link) == EXPR_LIST) + add_reg_note (res, REG_NOTE_KIND (link), + copy_insn_1 (XEXP (link, 0))); + else + add_reg_note (res, REG_NOTE_KIND (link), XEXP (link, 0)); + } + return res; } |