diff options
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 8f75125..0195b4f 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1102,7 +1102,7 @@ match_reload (signed char out, signed char *ins, signed char *outs, for (i = 0; outs[i] >= 0; i++) { rtx other_out_rtx = *curr_id->operand_loc[outs[i]]; - if (REG_P (other_out_rtx) + if (outs[i] != out && REG_P (other_out_rtx) && (regno_val_use_in (REGNO (in_rtx), other_out_rtx) != NULL_RTX)) { @@ -4382,7 +4382,10 @@ curr_insn_transform (bool check_only_p) } n_outputs = 0; - outputs[0] = -1; + for (i = 0; i < n_operands; i++) + if (curr_static_id->operand[i].type == OP_OUT) + outputs[n_outputs++] = i; + outputs[n_outputs] = -1; for (i = 0; i < n_operands; i++) { int regno; @@ -4457,8 +4460,6 @@ curr_insn_transform (bool check_only_p) lra-lives.c. */ match_reload (i, goal_alt_matched[i], outputs, goal_alt[i], &before, &after, TRUE); - outputs[n_outputs++] = i; - outputs[n_outputs] = -1; } continue; } @@ -4636,14 +4637,6 @@ curr_insn_transform (bool check_only_p) process_alt_operands decides that it is possible. */ gcc_unreachable (); - /* Memorise processed outputs so that output remaining to be processed - can avoid using the same register value (see match_reload). */ - if (curr_static_id->operand[i].type == OP_OUT) - { - outputs[n_outputs++] = i; - outputs[n_outputs] = -1; - } - if (optional_p) { rtx reg = op; |