mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
[PR117182, LRA]: Move point of skipping postponed insn
Working on PR117182 I found that a pseudo generated for save/restore value around call is changed by equivalence which is constant as we propagate equivalence for such pseudos to generate a better code. The constant substitutes output of the save insn which can be changed to memory containing constant by reload insn. We don't want this. The patch fixes this. gcc/ChangeLog: PR target/117182 * lra-constraints.cc (curr_insn_transform): Don't change an output operand by constant or invariant equivalence.
This commit is contained in:
@@ -4419,7 +4419,12 @@ curr_insn_transform (bool check_only_p)
|
||||
&& !targetm.hard_regno_mode_ok (REGNO (subst), outer_mode))
|
||||
continue;
|
||||
|
||||
if (subst != old)
|
||||
if (subst != old
|
||||
/* We don't want to change an out operand by constant or invariant
|
||||
which will require additional reloads, e.g. by putting a constant
|
||||
into memory. */
|
||||
&& (curr_static_id->operand[i].type == OP_IN || MEM_P (subst)
|
||||
|| (GET_CODE (subst) == SUBREG && MEM_P (SUBREG_REG (subst)))))
|
||||
{
|
||||
equiv_substition_p[i] = true;
|
||||
rtx new_subst = copy_rtx (subst);
|
||||
|
||||
Reference in New Issue
Block a user