From e3d1043293beed1696e6cb68f19d3bd6fb44c3b0 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 7 Apr 2017 08:26:05 -0600 Subject: [PATCH] iq2000.c (final_prescan_insn): Do not separate a CALL and NOTE_INSN_CALL_ARG_LOCATION. * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a CALL and NOTE_INSN_CALL_ARG_LOCATION. From-SVN: r246761 --- gcc/ChangeLog | 5 +++++ gcc/config/iq2000/iq2000.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 099805db137..d68f161ca17 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-07 Jeff Law + + * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a + CALL and NOTE_INSN_CALL_ARG_LOCATION. + 2017-04-07 Martin Liska PR target/79889 diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 7e1ba0067a7..99abd76c5a6 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -1540,8 +1540,13 @@ final_prescan_insn (rtx_insn *insn, rtx opvec[] ATTRIBUTE_UNUSED, || (GET_CODE (PATTERN (insn)) == RETURN)) && NEXT_INSN (PREV_INSN (insn)) == insn) { - rtx_insn *nop_insn = emit_insn_after (gen_nop (), insn); + rtx_insn *tmp = insn; + while (NEXT_INSN (tmp) + && NOTE_P (NEXT_INSN (tmp)) + && NOTE_KIND (NEXT_INSN (tmp)) == NOTE_INSN_CALL_ARG_LOCATION) + tmp = NEXT_INSN (tmp); + rtx_insn *nop_insn = emit_insn_after (gen_nop (), tmp); INSN_ADDRESSES_NEW (nop_insn, -1); } -- 2.30.2