Teach masked value is zero about add and sub, and use MVIZ to
authorChris Lattner <sabre@nondot.org>
Fri, 21 Mar 2008 05:19:58 +0000 (05:19 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 21 Mar 2008 05:19:58 +0000 (05:19 +0000)
commit41dc0fcb68e7ea5d7c043af2a6303adfdad19c72
tree05a451b401a19eabcd7223c1279f3675a318a197
parentfa5a91a71ee3c62c6f0bc6cc1388175ad6f925c4
Teach masked value is zero about add and sub, and use MVIZ to
simplify things like (X & 4) >> 1 == 2  --> (X & 4) == 4.

since it is obvious that the shift doesn't remove any bits.

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