[InstCombine] Add trivial folding (bitreverse (bitreverse x)) -> x
authorJames Molloy <james.molloy@arm.com>
Thu, 12 Nov 2015 12:39:41 +0000 (12:39 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 12 Nov 2015 12:39:41 +0000 (12:39 +0000)
commit7086a4139d152bef7a2a6dbb84924e7641f1ff11
tree5b8d22e895ba4889a4ec8c6963dbd84b8dca7b5e
parentfdd6e1b2e5e139a574f19788c71ae44dfaafa404
[InstCombine] Add trivial folding (bitreverse (bitreverse x)) -> x

There are plenty more instcombines we could probably do with bitreverse, but this seems like a very obvious and trivial starting point and was brought up by Hal in his review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252879 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/bitreverse-fold.ll [new file with mode: 0644]