[llvm] [VPlan] Use bitfield to store Cmp predicates and GEP wrap flags. (NFC) (PR #181571)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 23:57:33 PST 2026


mstorsjo wrote:

I'm also hitting asserts with this:
```c
float e, a, c, d;
int f;
float *g;
float b() {
  d = c;
  if (a > e) {
    if (e)
      return 0 < e;
    return 0 < c ?: c;
  }
}
void h() {
  for (; f; f++)
    g[f] = f > b() ?: b();
}
```

```console
$ clang -target x86_64-linux-gnu -c -O2 repro.c
clang: ../lib/Transforms/Vectorize/VPlanRecipes.cpp:341: void llvm::VPIRFlags::intersectFlags(const llvm::VPIRFlags&): Assertion `(OpType != OperationType::FCmp || FCmpFlags.CmpPredStorage == Other.FCmpFlags.CmpPredStorage) && "Cannot drop CmpPredicate"' failed.
```

I also notice that it does seem to not trigger every time - which would be consistent with the report of use of uninitialized memory above.

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


More information about the llvm-commits mailing list