Clang crash with -mcpu=grace -O3 -msve-vector-bits=128: error in backend: Cannot scalarize scalable vector loads
The following reduced testcase: https://godbolt.org/z/hhb8n6fnT
int a, d;
extern short b[];
long c;
void e(bool f[]) {
#pragma clang loop vectorize_predicate(enable)
for (signed char g = 1; g < (char)d; g += 3) {
a = f[g] ? c : 0;
b[g] = 0;
}
}
crashes for me with -mcpu=grace -O3 -msve-vector-bits=128: error in backend: Cannot scalarize scalable vector loads
https://clang.godbolt.org/z/cKa3v7P5K
@llvm/issue-subscribers-backend-aarch64
Author: Kyrill Tkachov (ktkachov)
It looks like an extract of a bitcast is expanded via the stack (which itself doesn't need sve-vector-bits) https://clang.godbolt.org/z/j81czfxjc
The C reproducer no longer triggers the same issue. https://godbolt.org/z/hhb8n6fnT But the backend issue probably still remains.
The C reproducer no longer triggers the same issue. https://godbolt.org/z/hhb8n6fnT But the backend issue probably still remains.
I extracted the optimised IR from the original reproducer https://godbolt.org/z/fbafKd6We and can reproduce on 20, but it's fixed on trunk https://godbolt.org/z/GcnYej3fW. Which suggests it's actually been fixed and this can be closed?
Yeah I believe this was fixed by better splitting of scalable bitcasts.