https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88097
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |tree-optimization Severity|normal |enhancement Status|UNCONFIRMED |NEW Keywords| |missed-optimization Last reconfirmed| |2021-07-24 Ever confirmed|0 |1 --- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- ((__builtin_bswap16(a) << 16) | __builtin_bswap16(b)) -> __builtin_bswap32(a<<16 | b) And then handle the loads and such. Confirmed.