[llvm] [polly] IR: Remove uselist for constantdata (PR #137313)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 06:56:39 PDT 2025
dyung wrote:
We also saw the same assertion failure in our internal testing and I was able to get it with the following code:
```c++
struct a typedef *b;
#define c(d, col) y[e::f]
struct e {
enum { f, g };
float y[g];
};
#define h(d, col) i[d]
enum { g };
float i[g];
struct j {
j(e k) {
h(2, ) = k.c(, );
h(3, ) = 0.0f;
}
};
struct l {
void m() { j mat(n); }
e n;
};
struct o {
int p;
};
struct q {
l r;
l s() { return r; }
};
struct a : q, o {};
o *t;
void u() {
a v = *b(t), w = v;
l x = w.s();
x.m();
}
```
Compile it with optimizations enabled and `-fno-delete-null-pointer-checks` to trigger the assertion:
```
$ ~/src/upstream/87f312aad6ed-linux/bin/clang -c -fno-delete-null-pointer-checks -O2 repro.cpp
clang: /home/dyung/src/upstream/llvm_clean_git/llvm/include/llvm/IR/Value.h:365: llvm::Value::const_use_iterator llvm::Value::materialized_use_begin() const: Assertion `hasUseList()' failed.
```
https://github.com/llvm/llvm-project/pull/137313
More information about the llvm-commits
mailing list