summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-05-25 04:01:56 +0000
committerCraig Topper <craig.topper@intel.com>2018-05-25 04:01:56 +0000
commit8174281b939481f0d734b9a4614243dc93fd5f6b (patch)
treea13b0a205057089a501ceda9ba0c09eb372e7753 /llvm/lib
parent3854964531716ac271adc4aa85abb3533fa46142 (diff)
downloadbcm5719-llvm-8174281b939481f0d734b9a4614243dc93fd5f6b.tar.gz
bcm5719-llvm-8174281b939481f0d734b9a4614243dc93fd5f6b.zip
Revert r333226 "[ValueTracking] Teach computeKnownBits that the result of an absolute value pattern that uses nsw flag is always positive."
This breaks some libFuzzer tests. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/15589/steps/check-fuzzer/logs/stdio Reverting to investigate llvm-svn: 333253
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 5f5d1be9baa..7f33c67b8ab 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1078,12 +1078,6 @@ static void computeKnownBitsFromOperator(const Operator *I, KnownBits &Known,
// leading zero bits.
MaxHighZeros =
std::max(Known.countMinLeadingZeros(), Known2.countMinLeadingZeros());
- } else if (SPF == SPF_ABS) {
- // RHS from matchSelectPattern returns the negation part of abs pattern.
- // If the negate has an NSW flag we can assume the sign bit of the result
- // will be 0 because that makes abs(INT_MIN) undefined.
- if (cast<Instruction>(RHS)->hasNoSignedWrap())
- MaxHighZeros = 1;
}
// Only known if known in both the LHS and RHS.
OpenPOWER on IntegriCloud