Skip to content
Commit ebbc3739 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[InstCombine] allow variable shift amount in bswap + shift fold

When shifting by a byte-multiple:
bswap (shl X, Y) --> lshr (bswap X), Y
bswap (lshr X, Y) --> shl (bswap X), Y

This was limited to constants as a first step in D122010 / 60820e53 ,
but issue #55327 shows a source example (and there's a test based on that here)
where a variable shift amount is used in this pattern.
parent a3b30d22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment