summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-09 12:57:24 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-09 12:57:24 +0000
commit41cf444a3055de89949785fadc58677ce1e5f10d (patch)
tree29604d6a37d0c504c6bb80d0d28fbabc827412ab /gcc/emit-rtl.c
parent7867279afcee7141e9b74852e0cf90963a98ad23 (diff)
downloadgcc-41cf444a3055de89949785fadc58677ce1e5f10d.tar.gz
PR middle-end/40154
* emit-rtl.c (set_dst_reg_note): New function. * rtl.h (set_dst_reg_note): Declare. * optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note. (emit_libcall_block, expand_fix): Likewise. * function.c (assign_parm_setup_reg, expand_function_start): Likewise. * expmed.c (expand_mult_const, expand_divmod): Likewise. * reload1.c (gen_reload): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 4a27a058b83..a537374fbad 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -5004,6 +5004,17 @@ set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum)
return REG_NOTES (insn);
}
+
+/* Like set_unique_reg_note, but don't do anything unless INSN sets DST. */
+rtx
+set_dst_reg_note (rtx insn, enum reg_note kind, rtx datum, rtx dst)
+{
+ rtx set = single_set (insn);
+
+ if (set && SET_DEST (set) == dst)
+ return set_unique_reg_note (insn, kind, datum);
+ return NULL_RTX;
+}
/* Return an indication of which type of insn should have X as a body.
The value is CODE_LABEL, INSN, CALL_INSN or JUMP_INSN. */