[llvm] [ValueTracking] Compute knownbits from known fp classes (PR #86409)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 00:27:24 PDT 2024


dtcxzyw wrote:

> This change causes failed assertions, reproducible like this:
> 
> ```c
> typedef union {
>   double a;
>   struct {
>     int b
>   } c
> } d;
> int e;
> d f;
> int g(double k) {
>   f.a = k;
>   e = f.c.b;
> }
> double h();
> void i() {
>   double j = h(), a = -__builtin_huge_val();
>   j != a || g(j);
> }
> ```
> 
>  ```
> $ clang -target x86_64-linux-gnu -c repro.c -O2
> clang: ../lib/Analysis/ValueTracking.cpp:1152: void computeKnownBitsFromOperator(const llvm::Operator*, const llvm::APInt&, llvm::KnownBits&, unsigned int, const llvm::SimplifyQuery&): Assertion `!Known.hasConflict() && "Bits known to be one AND zero?"' failed.
> ```
> 
> I'll push a revert shortly.

Thank you for reporting this!
I will fix it later.

https://github.com/llvm/llvm-project/pull/86409


More information about the llvm-commits mailing list