[llvm] [SLP]Initial support for non-power-of-2 (but still whole register) number of elements in operands. (PR #106449)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 31 01:11:57 PDT 2024
mstorsjo wrote:
This triggers failed asserts:
```c
int a[2];
int b, c, d, e;
void f() {
a[b + c * 8] = a[b + c * 8 + 1] = (long long)d + 70912 >> 30;
a[b + c * 8 + 2] = (long long)e + 70912 >> 30;
a[b + c * 8 + 3] = (long long)f + 70912 >> 30;
}
```
Or
```c
int *a;
long long b, d;
long e(long long f) {
long c = f >> 4;
return c;
}
void g() {
long i, j;
int h;
{
long c = d >> 4;
j = b >> 4;
i = c;
}
h = e(b * 70);
a[0] = a[1] = i;
a[2] = j;
a[3] = h;
}
```
Both reproduce like this:
```
$ clang -target i686-linux-gnu -c -O2 repro.c
clang: ../lib/Transforms/Vectorize/SLPVectorizer.cpp:3314: bool llvm::slpvectorizer::BoUpSLP::TreeEntry::isNonPowOf2Vec(const llvm::TargetTransformInfo&) const: Assertion `(!IsNonPowerOf2 || ReuseShuffleIndices.empty()) && "Reshuffling not supported with non-power-of-2 vectors yet."' failed.
```
https://github.com/llvm/llvm-project/pull/106449
More information about the llvm-commits
mailing list