aboutsummaryrefslogtreecommitdiff
path: root/gcc/modulo-sched.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2018-01-09 09:03:45 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-09 09:03:45 +0100
commit3a123ed751451a4f2aebbe74226fd92272da4477 (patch)
tree48d8bdcdf51e28737bb09e301b3fc04ef341f348 /gcc/modulo-sched.c
parent5190f1f98d7c14c0a0bf4f003da0f3a38b31ad14 (diff)
downloadgcc-3a123ed751451a4f2aebbe74226fd92272da4477.zip
gcc-3a123ed751451a4f2aebbe74226fd92272da4477.tar.gz
gcc-3a123ed751451a4f2aebbe74226fd92272da4477.tar.bz2
re PR target/83507 (ICE in internal_dfa_insn_code_* for powerpc targets)
PR target/83507 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move hard registers. Formatting fixes. * gcc.dg/sms-13.c: New test. From-SVN: r256368
Diffstat (limited to 'gcc/modulo-sched.c')
-rw-r--r--gcc/modulo-sched.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index d5ad2334..9a27365 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -687,9 +687,9 @@ schedule_reg_moves (partial_schedule_ptr ps)
rtx set = single_set (u->insn);
/* Skip instructions that do not set a register. */
- if ((set && !REG_P (SET_DEST (set))))
+ if (set && !REG_P (SET_DEST (set)))
continue;
-
+
/* Compute the number of reg_moves needed for u, by looking at life
ranges started at u (excluding self-loops). */
distances[0] = distances[1] = false;
@@ -743,7 +743,10 @@ schedule_reg_moves (partial_schedule_ptr ps)
first_move += ps->g->num_nodes;
/* Generate each move. */
- old_reg = prev_reg = SET_DEST (single_set (u->insn));
+ old_reg = prev_reg = SET_DEST (set);
+ if (HARD_REGISTER_P (old_reg))
+ return false;
+
for (i_reg_move = 0; i_reg_move < nreg_moves; i_reg_move++)
{
ps_reg_move_info *move = ps_reg_move (ps, first_move + i_reg_move);