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

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 00:25:09 PDT 2024


mstorsjo 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);
}
```
```console
$ 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.

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


More information about the llvm-commits mailing list