https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121076
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> --- Trying 6 -> 7: 6: {r117:HI=bswap(r122:DI#6);clobber scratch;} REG_DEAD r122:DI 7: r121:DI=zero_extend(r117:HI) REG_DEAD r117:HI Failed to match this instruction: (set (reg:DI 121 [ _2+-6 ]) (zero_extend:DI (bswap:HI (subreg/s/v:HI (reg:DI 122 [ in+-6 ]) 6)))) We could do a splitter for this easily. I don't know why "bswaphi2_reg" splits to three insns -- we can always do it with only two, pretty trivially. Perhaps in the past this was automatically optimised to something better, but in that case we have regressed :-( So this needs fixing as well.