https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84071

--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The problematic code is the SUBREG case of record_dead_and_set_regs_1:

  if (REG_P (dest))
    {
      /* If we are setting the whole register, we know its value.  Otherwise
         show that we don't know the value.  We can handle SUBREG in
         some cases.  */
      if (GET_CODE (setter) == SET && dest == SET_DEST (setter))
        record_value_for_reg (dest, record_dead_insn, SET_SRC (setter));
      else if (GET_CODE (setter) == SET
               && GET_CODE (SET_DEST (setter)) == SUBREG
               && SUBREG_REG (SET_DEST (setter)) == dest
               && known_le (GET_MODE_PRECISION (GET_MODE (dest)),
BITS_PER_WORD)
               && subreg_lowpart_p (SET_DEST (setter)))
        record_value_for_reg (dest, record_dead_insn,
                              gen_lowpart (GET_MODE (dest),
                                                       SET_SRC (setter)));
      else
        record_value_for_reg (dest, record_dead_insn, NULL_RTX);
    }

It's very old (RMS r357) and effectively synthesizes a wrong SET operation.

Reply via email to