[InstCombine] Add tests for 'partial' bswap patterns
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 30 Sep 2020 15:08:52 +0000 (16:08 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 30 Sep 2020 15:09:09 +0000 (16:09 +0100)
commitf425418fc4ebd989c6c3d59d20e7fe37cb29259c
tree25cf455ec75e95242141a6989e46691c32d65ba7
parent052c5bf40a9fc9ffe1bb2669763d8a0d2dea2b2e
[InstCombine] Add tests for 'partial' bswap patterns

As mentioned on PR47191, if we're bswap'ing some bytes and the zero'ing the remainder we can perform this as a bswap+mask which helps us match 'partial' bswaps as a first step towards folding into a more complex bswap pattern.
llvm/test/Transforms/InstCombine/bswap.ll