[ValueTracking] Teach isKnownNonZero a new trick
authorJames Molloy <james.molloy@arm.com>
Thu, 24 Sep 2015 16:06:32 +0000 (16:06 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 24 Sep 2015 16:06:32 +0000 (16:06 +0000)
commitd44ba4a7c6103a1e0543f02b342d87f17063560a
treea68309ff51cfdd14279e9abacfacf3f8fa8b6f40
parentcdac331ff840877657b95d677728fc413a19a7c4
[ValueTracking] Teach isKnownNonZero a new trick

If the shifter operand is a constant, and all of the bits shifted out
are known to be zero, then if X is known non-zero at least one
non-zero bit must remain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248508 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Analysis/ValueTracking/knownzero-shift.ll [new file with mode: 0644]