https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82940
--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Peter Cordes from comment #6) > # power64 GCC 9.2.1 (ATI13.0) > rlwimi 3,4,0,255 # bit-blend according to mask, rotate count=0 > rldicl 3,3,0,32 # Is this zero-extension to 64-bit redundant? It is: the rlwinm does an AND with 0xff already, so that clears the top 32 bits for sure. > But ppc64 GCC does zero-extension of the result from 32 to 64-bit, which is > probably not needed unless the calling convention has different requirements > for return values than for incoming args. (I don't know PPC well enough.) Return values have to be properly (sign- or zero-) extended for its type, just like function arguments.