Bswap isn't a simple operation so we need to make sure we are really removing a call to it before doing these simplifications.
For the case when both LHS and RHS are bswaps I've allowed it to be moved if either LHS or RHS has a single use since that at least allows us to move it later where it might find another bswap to combine with and it decreases the use count on the other side so maybe the other user can be optimized.
It's independent of this patch, but this comment is too specific for this function because it doesn't mention the pattern with a constant operand. I'd make the comment more general and/or remove it. The function name could also mention 'bitwise op' since that is a requirement for any transform in this function.