During legalization SHL/SRL nodes could be expanded into expression
that rotates low/high part of original input and then apply OR to
rotated part and other part. If the result of this operation is
compared for equality/not-equality with zero then rotation could
be removed as it does not affect comparision result.
Bug report: https://llvm.org/PR50197
Lots of comment duplication - description to header, and keep the code snippet here?