]> granicus.if.org Git - llvm/commit
[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)
commit9563b959554bc50e0c92d90335250fbed56831b4
treee5e5e2e27b32dbed5e8387c8b64a70e682a8a7a0
parent0bd8066c868b8cea1c356876a941a1ff65024e21
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300432 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp