[llvm] [KnownBits] Remove `hasConflict()` assertions (PR #94568)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 21:38:29 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: None (c8ef)
<details>
<summary>Changes</summary>
close: #<!-- -->94436
---
Full diff: https://github.com/llvm/llvm-project/pull/94568.diff
1 Files Affected:
- (modified) llvm/include/llvm/Support/KnownBits.h (+2-9)
``````````diff
diff --git a/llvm/include/llvm/Support/KnownBits.h b/llvm/include/llvm/Support/KnownBits.h
index ba4a5f01036ca..c206bd77d5880 100644
--- a/llvm/include/llvm/Support/KnownBits.h
+++ b/llvm/include/llvm/Support/KnownBits.h
@@ -48,7 +48,6 @@ struct KnownBits {
/// Returns true if we know the value of all bits.
bool isConstant() const {
- assert(!hasConflict() && "KnownBits conflict!");
return Zero.popcount() + One.popcount() == getBitWidth();
}
@@ -74,16 +73,10 @@ struct KnownBits {
}
/// Returns true if value is all zero.
- bool isZero() const {
- assert(!hasConflict() && "KnownBits conflict!");
- return Zero.isAllOnes();
- }
+ bool isZero() const { return Zero.isAllOnes(); }
/// Returns true if value is all one bits.
- bool isAllOnes() const {
- assert(!hasConflict() && "KnownBits conflict!");
- return One.isAllOnes();
- }
+ bool isAllOnes() const { return One.isAllOnes(); }
/// Make all bits known to be zero and discard any previous information.
void setAllZero() {
``````````
</details>
https://github.com/llvm/llvm-project/pull/94568
More information about the llvm-commits
mailing list