diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2008-01-21 00:04:23 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2008-01-21 00:04:23 +0000 |
commit | 539c54bafbbc73ce79ee1681598b6451e748aad4 (patch) | |
tree | 64303f27f89458803f70c53d0d7bf928ee7252a5 /gcc/emit-rtl.c | |
parent | f5d67ede42caa6e1442a4776a4929a8a96907caf (diff) | |
download | gcc-539c54bafbbc73ce79ee1681598b6451e748aad4.zip gcc-539c54bafbbc73ce79ee1681598b6451e748aad4.tar.gz gcc-539c54bafbbc73ce79ee1681598b6451e748aad4.tar.bz2 |
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
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 14 |
1 files changed, 13 insertions, 1 deletions
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; } |