Canonicalize (srl (bswap x), 16) to (rotr (bswap x), 16) if the high 16 bits
authorEvan Cheng <evan.cheng@apple.com>
Thu, 23 Feb 2012 02:58:19 +0000 (02:58 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 23 Feb 2012 02:58:19 +0000 (02:58 +0000)
commit5fb468a6b308b643edf61f1731b6d95fd1a03bf4
tree8603bb3d08cf746c8d45bc935268c9e0895afb86
parent81a682a4c004b0f44452ef824637a1b6face178f
Canonicalize (srl (bswap x), 16) to (rotr (bswap x), 16) if the high 16 bits
of x are zero. This optimizes rev + lsr 16 to rev16.

rdar://10750814

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151230 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/rev.ll