https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92716
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> --- Yes, the pass that recognizes bswap (unsurprisingly called bswap) happens much later than inlining in the pipeline. This kind of thing is unavoidable since cycling through optimization passes is considered undesirable. In this particular case, I don't know if there would be support for moving bswap, or running it a second time, possibly just a restricted version if some parts are less appropriate.