https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127606
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot
gnu.org
Status|ASSIGNED |NEW
CC| |rguenth at gcc dot gnu.org
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Some extra tokens spit out the following. Vladimir, can you take it from here?
diff --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc
index 72430d51732..e97a9ab239d 100644
--- a/gcc/lra-constraints.cc
+++ b/gcc/lra-constraints.cc
@@ -5291,8 +5291,18 @@ curr_insn_transform (bool check_only_p)
if (REG_P (reg)
/* Strict_low_part requires reloading the register and not
just the subreg. Likewise for a strict subreg no wider
- than a word for WORD_REGISTER_OPERATIONS targets. */
+ than a word for WORD_REGISTER_OPERATIONS targets.
+ For a paradoxical subreg input operand, reload the inner
+ register in its narrower mode so that spilled pseudos are
+ loaded from memory using their actual mode rather than
+ accessing wider uninitialized memory as an operand. */
&& (curr_static_id->operand[i].strict_low
+ || (paradoxical_subreg_p (mode, GET_MODE (reg))
+ && type == OP_IN
+ && (goal_alt[i] == NO_REGS
+ || (simplify_subreg_regno
+ (ira_class_hard_regs[goal_alt[i]][0],
+ GET_MODE (reg), byte, mode) >= 0)))
|| (!paradoxical_subreg_p (mode, GET_MODE (reg))
&& (hard_regno
= get_try_hard_regno (REGNO (reg))) >= 0