https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86640
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2018-07-26 00:00:00 |2018-07-23 0:00
--- Comment #5 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
hmm I think the problem is in combine, before it does the substitution it does
a sign extension.
/* Sanity check that we're replacing oldval with a CONST_INT
that is a valid sign-extension for the original mode. */
gcc_assert (INTVAL (newval)
== trunc_int_for_mode (INTVAL (newval), GET_MODE (oldval)));
It's making assumption about the values being signed, which I think is wrong,
this means that any unsigned constant where the signbit is set won't pass.
I think it just needs to check if the new value is within the range of the
oldval mode and that's it.