Compute demanded bits for icmp instructions
authorJames Molloy <james.molloy@arm.com>
Thu, 8 Oct 2015 12:40:06 +0000 (12:40 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 8 Oct 2015 12:40:06 +0000 (12:40 +0000)
commita04fb96d9be10d393fd218bd4aacdc19b98d7d6e
treed341e2d63935538c5ad66ebed88b1fd2638cba1a
parent6f819bd488d29bec2e60a4fff25d848f46ba36fb
Compute demanded bits for icmp instructions

Instead of bailing out when we see an icmp, we can instead at least
say that if the upper bits of both operands are known zero, they are
not demanded. This doesn't help with signed comparisons, but it's at
least better than bailing out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249687 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/DemandedBits.cpp
test/Analysis/DemandedBits/basic.ll