From cbc4008cb2ecc0e31ef849b07666943a011a9efe Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 28 Dec 2017 19:46:14 +0000 Subject: [PATCH] [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 --- include/llvm/Support/KnownBits.h | 2 -- 1 file changed, 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(); } -- 2.11.0