[llvm] [KnownBits] Remove `hasConflict()` assertions (PR #94568)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 6 04:08:55 PDT 2024
c8ef wrote:
> Though one testing-related change we should do is drop this check:
>
> https://github.com/llvm/llvm-project/blob/574ab7e7b759a400ecf54c1141b1433bb2415e93/llvm/unittests/Support/KnownBitsTest.h#L29
>
> This means the KnownBits implementation will actually get tested with conflict values, so we can be sure this doesn't produce unexpected crashes somewhere.
After removing this statement, I immediately encounter an error locally. Is this the expected behavior? Since the purpose of this PR is to enable a bit to be both *zero* and *one* simultaneously, perhaps we should also remove this assert?
```
[==========] Running 16 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 16 tests from KnownBitsTest
[ RUN ] KnownBitsTest.AddCarryExhaustive
Assertion failed: !(CarryZero && CarryOne) && "Carry can't be zero and one at the same time", file .\llvm-project\llvm\lib\Support\KnownBits.cpp, line 25
```
https://github.com/llvm/llvm-project/pull/94568
More information about the llvm-commits
mailing list