diff options
author | Jeff Law <law@redhat.com> | 2018-02-12 20:07:04 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2018-02-12 20:07:04 -0700 |
commit | 8df1868d92b45fb257bd09bc8cd8af3baff0ae85 (patch) | |
tree | 81849d99c0495c93899c35ad1966f1a8cd166466 /gcc/config/sh | |
parent | a4f197f50e348a0128cf2a616043899da2ca5dd0 (diff) | |
download | gcc-8df1868d92b45fb257bd09bc8cd8af3baff0ae85.zip gcc-8df1868d92b45fb257bd09bc8cd8af3baff0ae85.tar.gz gcc-8df1868d92b45fb257bd09bc8cd8af3baff0ae85.tar.bz2 |
re PR target/83760 ([SH] ICE in maybe_record_trace_start building glibc tst-copy_file_range.c)
PR target/83760
* config/sh/sh.c (find_barrier): Consider a sibling call
a barrier as well.
From-SVN: r257611
Diffstat (limited to 'gcc/config/sh')
-rw-r--r-- | gcc/config/sh/sh.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 48e99a3..90d6c73 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -5233,10 +5233,22 @@ find_barrier (int num_mova, rtx_insn *mova, rtx_insn *from) CALL_ARG_LOCATION note. */ if (CALL_P (from)) { + bool sibcall_p = SIBLING_CALL_P (from); + rtx_insn *next = NEXT_INSN (from); if (next && NOTE_P (next) && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION) from = next; + + /* If FROM was a sibling call, then we know that control + will not return. In fact, we were guaranteed to hit + a barrier before another real insn. + + The jump around the constant pool is unnecessary. It + costs space, but more importantly it confuses dwarf2cfi + generation. */ + if (sibcall_p) + return emit_barrier_after (from); } from = emit_jump_insn_after (gen_jump (label), from); |