https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114252
--- Comment #14 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- The code in the example is not a perfect bswap, it needs additional shuffling of bytes. The tree passes must know that bswap is not a perfect fit. There must be *some* criterion that depends on the permutation, and when a bswap is closer to the bswapped-permutation that a non-bswapped permutation is to the original one.