From 539c54bafbbc73ce79ee1681598b6451e748aad4 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Mon, 21 Jan 2008 00:04:23 +0000 Subject: re PR rtl-optimization/34808 (ICE in prescan_insns_for_dce) PR rtl-optimization/34808 * emit-rtl.c (try_split): Handle REG_RETVAL notes. * gcc.c-torture/compile/pr34808.c: New test. From-SVN: r131680 --- gcc/emit-rtl.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gcc/emit-rtl.c') diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index bef4d58..1a9239a 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3136,7 +3136,7 @@ try_split (rtx pat, rtx trial, int last) rtx before = PREV_INSN (trial); rtx after = NEXT_INSN (trial); int has_barrier = 0; - rtx tem, note_retval; + rtx tem, note_retval, note_libcall; rtx note, seq; int probability; rtx insn_last, insn; @@ -3284,6 +3284,18 @@ try_split (rtx pat, rtx trial, int last) XEXP (note_retval, 0) = insn_last; break; + case REG_RETVAL: + /* Relink the insns with REG_LIBCALL note and with REG_RETVAL note + after split. */ + REG_NOTES (insn_last) + = gen_rtx_INSN_LIST (REG_RETVAL, + XEXP (note, 0), + REG_NOTES (insn_last)); + + note_libcall = find_reg_note (XEXP (note, 0), REG_LIBCALL, NULL); + XEXP (note_libcall, 0) = insn_last; + break; + default: break; } -- cgit v1.1