Merging r258690:
authorJames Molloy <james.molloy@arm.com>
Tue, 26 Jan 2016 13:30:49 +0000 (13:30 +0000)
committerJames Molloy <james.molloy@arm.com>
Tue, 26 Jan 2016 13:30:49 +0000 (13:30 +0000)
commitdb6cb1a90cd0ab35e2dadc97962a5d67742c0bbc
tree4ff7078c29730aeaee37825ddc37cfdc1168a6a2
parent836d2ad83c5e955a23f6e3b78418cb250c95c88b
Merging r258690:
------------------------------------------------------------------------
r258690 | jamesm | 2016-01-25 14:49:36 +0000 (Mon, 25 Jan 2016) | 7 lines

[DemandedBits] Fix computation of demanded bits for ICmps

The computation of ICmp demanded bits is independent of the individual operand being evaluated. We simply return a mask consisting of the minimum leading zeroes of both operands.

We were incorrectly passing "I" to ComputeKnownBits - this should be "UserI->getOperand(0)". In cases where we were evaluating the 1th operand, we were taking the minimum leading zeroes of it and itself.

This should fix PR26266.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258805 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/DemandedBits.cpp
test/Analysis/DemandedBits/basic.ll
utils/release/merge.sh