[llvm] [SCEV] Introduce loop-uniform SCEV classification. (PR #194304)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 04:00:18 PDT 2026
mstorsjo wrote:
I'm also hitting the same issue as above, when compiling libaom and libarchive. Reduced reproducers:
```c
enum { a } * b;
void c() {
int d, e, f;
for (;; ++d) {
e = 0;
for (;; ++e)
if (b[e]) {
f = d;
for (; f > e; f--)
b[f] = 1;
break;
}
}
}
```
And
```c
int b, c;
void g() {
struct {
int ccc
} d[10];
int e, a = b;
while (a) {
int f = 0;
for (; f < e; f++)
if (d[0].ccc > a)
break;
if (f < e) {
c = e;
for (; c > f; c--)
d[c] = d[c - 1];
}
e++;
}
}
```
Both trigger the same way:
```console
$ clang -target x86_64-linux-gnu -c repro.c -O2
Instruction does not dominate all uses!
%indvar = phi i64 [ %indvar.next, %for.cond ], [ 0, %for.cond.preheader ]
%smin = call i64 @llvm.smin.i64(i64 %1, i64 %indvar)
clang: ../lib/Transforms/Vectorize/LoopVectorize.cpp:8573: bool llvm::LoopVectorizePass::processLoop(llvm::Loop*): Assertion `!verifyFunction(*F, &dbgs())' failed.
```
I will revert this change soon, as the issue has been reported already 14h ago without any sign on progress.
https://github.com/llvm/llvm-project/pull/194304
More information about the llvm-commits
mailing list