isKnownToBeAPowerOfTwo: Strengthen isKnownToBeAPowerOfTwo's analysis on add instructions
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 30 Jul 2013 21:01:36 +0000 (21:01 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 30 Jul 2013 21:01:36 +0000 (21:01 +0000)
commit36850ad779cb77930ab9e03bc1bde4ad47dc9dce
tree55320cf98b59089420c34256837aa112a489eb72
parentf34dc428fa577d6d5d71ab3a1f9765b4e5da5a4f
isKnownToBeAPowerOfTwo: Strengthen isKnownToBeAPowerOfTwo's analysis on add instructions

Call into ComputeMaskedBits to figure out which bits are set on both add
operands and determine if the value is a power-of-two-or-zero or not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187445 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstCombine/rem.ll