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

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
We have very many similar PRs reported over the years, but more for when the
argument is *signed*, actually!  There, we end up with unneeded sign-extension
insns often (which are easier to spot than extra rl* insns).

With most of our ABIs the *caller* is required to sign- or zero-extend the
parameters.  A function always can depend on this (the compiler can count on
this when compiling any function, put a bit more correctly).

Maybe we can put some RTL at the start of every function that makes this clear?
Some RTL that ends up matching a define_insn that doesn't actually emit any
assembler code in the end.  Or maybe there is something that can be done in the
Gimple passes already (I don't see anything better for the RTL passes,
unfortunately).

Reply via email to