[InstCombine][ValueTracking] When computing known bits for Srem make sure we don...
authorCraig Topper <craig.topper@gmail.com>
Sun, 16 Apr 2017 21:46:12 +0000 (21:46 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 16 Apr 2017 21:46:12 +0000 (21:46 +0000)
commitda886c665be230c90830a15dcab7ba1c3c9a29ca
tree70e823664ef5fc3d8c427941a4f189aebcff0d3f
parentdd37c67d812e0770e0f82b7541b2af439cb9baca
[InstCombine][ValueTracking] When computing known bits for Srem make sure we don't compute known bits for the LHS twice.

If we already called computeKnownBits for the RHS being a constant power of 2, we've already computed everything we can and should just stop. I think previously we would still recurse if we had determined the result was negative or had not determined the sign bit at all.

llvm-svn: 300432
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp