rewrite bswap matching to be more general, allowing arbitrary
authorChris Lattner <sabre@nondot.org>
Sun, 5 Oct 2008 02:13:19 +0000 (02:13 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 5 Oct 2008 02:13:19 +0000 (02:13 +0000)
commit8c34cd287a07d80491cde1e86da98568675dbe47
treead51896850efea222cb34d404df331635079ecd8
parent8256d75f84b595dc29828819791b79d45fcaae81
rewrite bswap matching to be more general, allowing arbitrary
shifting and masking inside a bswap expr.  This allows it to handle
the cases from PR2842, which involve the intermediate 'or'
expressions being shifted, not just the input value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57095 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/bswap.ll