diff options
author | Jeff Law <law@gcc.gnu.org> | 2019-03-25 17:33:36 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2019-03-25 17:33:36 -0600 |
commit | b9b0386a3e64702fe19180707613fbb6187a27b8 (patch) | |
tree | 19da2bc05717221c2748d84150167c1a782aec09 /gcc/sched-deps.c | |
parent | 0c9992c8b5e07e7295c8be65586a2a82e7f191e5 (diff) | |
download | gcc-b9b0386a3e64702fe19180707613fbb6187a27b8.zip gcc-b9b0386a3e64702fe19180707613fbb6187a27b8.tar.gz gcc-b9b0386a3e64702fe19180707613fbb6187a27b8.tar.bz2 |
re PR rtl-optimization/88347 (ICE in begin_move_insn, at sched-ebb.c:175)
PR rtl-optimization/88347
PR rtl-optimization/88423
* sched-deps.c (sched_analyze_insn): Take into account that for
tablejumps the barrier appears after a label and a jump_table_data.
* gcc.c-torture/compile/pr88347.c: New test.
* gcc.c-torture/compile/pr88423.c: New test.
From-SVN: r269928
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 6cf4caf..eda0c66 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -3005,6 +3005,11 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx_insn *insn) if (JUMP_P (insn)) { rtx_insn *next = next_nonnote_nondebug_insn (insn); + /* ??? For tablejumps, the barrier may appear not immediately after + the jump, but after a label and a jump_table_data insn. */ + if (next && LABEL_P (next) && NEXT_INSN (next) + && JUMP_TABLE_DATA_P (NEXT_INSN (next))) + next = NEXT_INSN (NEXT_INSN (next)); if (next && BARRIER_P (next)) reg_pending_barrier = MOVE_BARRIER; else |