[llvm] [SLP]Model gathers of extracted integer sub-fields as bitcast+permute+ext (PR #224919)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 23:34:41 PDT 2026


mstorsjo wrote:

This triggers failed asserts when building older versions of Qt. Reduced to:
```c++
struct b {
  b(int c, int f) : d(c), e(f) {}
  int g() { return d; }
  int i() { return e; }
  int d;
  int e;
};
struct j {
  j(b c) : d(c.g()), e(c.i()) {}
  double k() { return d; }
  double l() { return e; }
  double d;
  double e;
};
struct o {
  b r() { return b(m, n); }
  b s() { return b(p, q); }
  int m;
  int n;
  int p;
  int q;
};
struct t {
  t(j c, j f) : u(f.k() - c.k()), h(f.l() - c.l()) {}
  void w();
  double u;
  double h;
};
o v;
void z() {
  b x = v.s();
  j y(x);
  t a(v.r(), y);
  a.w();
}
```
```console
$ clang -target x86_64-linux-gnu -c repro.cpp -O2
clang: ../lib/Transforms/Vectorize/SLPVectorizer.cpp:26391: llvm::Value* llvm::slpvectorizer::BoUpSLP::vectorizeTree(const ExtraValueToDebugLocsMap&, llvm::Instruction*, llvm::ArrayRef<{anonymous}::ReductionVectorPart>): Assertion `(isVectorized(U) || (UserIgnoreList && UserIgnoreList->contains(U)) || (isa_and_nonnull<Instruction>(U) && isDeleted(cast<Instruction>(U)))) && "Deleting out-of-tree value"' failed.
```

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


More information about the llvm-commits mailing list