ValueTracking: Teach isKnownToBeAPowerOfTwo about (ADD X, (XOR X, Y)) where X is...
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 29 Jun 2013 23:44:53 +0000 (23:44 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 29 Jun 2013 23:44:53 +0000 (23:44 +0000)
commit58b6dc032a668e637a9a9e63290652f32d372a5f
tree85da3febc257d052ac3db7aaade17e71b867acd6
parentbebf6222f6b7cc871cfbc51f78cdb33d17fedb6c
ValueTracking: Teach isKnownToBeAPowerOfTwo about (ADD X, (XOR X, Y)) where X is a power of two

This allows us to simplify urem instructions involving the add+xor to
turn into simpler math.

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