OSDN Git Service

[ValueTracking] Out of range shifts might be undef
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 14 Mar 2017 10:13:17 +0000 (10:13 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 14 Mar 2017 10:13:17 +0000 (10:13 +0000)
commit4e5ac8a9a203a48f53c3609b4e0c5d4990b592c7
tree007be479072886ea087408d6f11efc99971fb505
parent53c73db7b92b1c2f3cc38ab66c9a407e72a9a667
[ValueTracking] Out of range shifts might be undef

If it is possible for the RHS of a shift operation to be greater than or equal
to the bit-width, then the result might be undef, and we can't report any known
bits.

In some cases, this was allowing a transformation in instcombine which widened
an undef value from i1 to i32, increasing the range of values that a function
could return.

Differential revision: https://reviews.llvm.org/D30781

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