summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-12-28 19:46:14 +0000
committerCraig Topper <craig.topper@intel.com>2017-12-28 19:46:14 +0000
commitcbc4008cb2ecc0e31ef849b07666943a011a9efe (patch)
treecbb198a36cba40f9ff0577ff54e25af1dd250985 /include
parent0454ddf9a78a955a10856d7219d3eef5fbd40b47 (diff)
[KnownBits] Remove asserts from KnownBits::makeNegative/makeNonNegative
Many of the callers don't guarantee there is no conflict before calling these and instead check for conflicts later. The makeNegative/makeNonNegative methods replaced Known.One.setSignBit() and Known.Zero.setSignBit() calls that didn't have asserts originally. So removing the asserts is no worse than the original code. Fixes PR35769 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/KnownBits.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/llvm/Support/KnownBits.h b/include/llvm/Support/KnownBits.h
index 7a4de3e5ff1..97e73b13fca 100644
--- a/include/llvm/Support/KnownBits.h
+++ b/include/llvm/Support/KnownBits.h
@@ -100,13 +100,11 @@ public:
/// Make this value negative.
void makeNegative() {
- assert(!isNonNegative() && "Can't make a non-negative value negative");
One.setSignBit();
}
/// Make this value negative.
void makeNonNegative() {
- assert(!isNegative() && "Can't make a negative value non-negative");
Zero.setSignBit();
}