summaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 0509562f6f6..5360090ee84 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1536,13 +1536,14 @@ output_arc_profiler (arcno, insert_after)
rtx return_reg;
rtx next_insert_after = next_nonnote_insn (insert_after);
+ /* The first insn after the call may be a stack pop, skip it. */
+ if (GET_CODE (next_insert_after) == INSN
+ && GET_CODE (PATTERN (next_insert_after)) == SET
+ && SET_DEST (PATTERN (next_insert_after)) == stack_pointer_rtx)
+ next_insert_after = next_nonnote_insn (next_insert_after);
+
if (GET_CODE (next_insert_after) == INSN)
{
- /* The first insn after the call may be a stack pop, skip it. */
- if (GET_CODE (PATTERN (next_insert_after)) == SET
- && SET_DEST (PATTERN (next_insert_after)) == stack_pointer_rtx)
- next_insert_after = next_nonnote_insn (next_insert_after);
-
if (GET_CODE (PATTERN (insert_after)) == SET)
return_reg = SET_DEST (PATTERN (insert_after));
else