diff options
Diffstat (limited to 'gcc/lra-constraints.cc')
| -rw-r--r-- | gcc/lra-constraints.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc index b152997..1bbf21f 100644 --- a/gcc/lra-constraints.cc +++ b/gcc/lra-constraints.cc @@ -523,6 +523,11 @@ update_equiv (int regno) { rtx x; + /* If REGNO is beyond the length of the equivalence array structure, + then there's nothing to update. */ + if (regno >= ira_reg_equiv_len) + return; + if ((x = ira_reg_equiv[regno].memory) != NULL_RTX) ira_reg_equiv[regno].memory = simplify_replace_fn_rtx (x, NULL_RTX, loc_equivalence_callback, @@ -2552,7 +2557,10 @@ process_alt_operands (int only_alternative) { int regno = decode_hard_reg_constraint (p); gcc_assert (regno >= 0); - cl = REGNO_REG_CLASS (regno); + cl = NO_REGS; + int nregs = hard_regno_nregs (regno, mode); + for (int i = 0; i < nregs; ++i) + cl = reg_class_superunion[cl][REGNO_REG_CLASS (regno + i)]; CLEAR_HARD_REG_SET (hard_reg_constraint); SET_HARD_REG_BIT (hard_reg_constraint, regno); cl_filter = &hard_reg_constraint; |
