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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think this has been introduced in PR59461 change and is contrary to what is
documented:
"The high-order bits of rvalues are defined in the following circumstances:

@itemize
@item @code{subreg}s of @code{mem}
When @var{m2} is smaller than a word, the macro @code{LOAD_EXTEND_OP},
can control how the high-order bits are defined.

@item @code{subreg} of @code{reg}s
The upper bits are defined when @code{SUBREG_PROMOTED_VAR_P} is true.
@code{SUBREG_PROMOTED_UNSIGNED_P} describes what the upper bits hold.
Such subregs usually represent local variables, register variables
and parameter pseudo variables that have been promoted to a wider mode."

That change added the && !REG_P in there, but unless the reg is loaded from
memory, it is unclear how it can guarantee that the upper bits are zero (resp.
sign) extended after arbitrary operations.

Reply via email to