[llvm] [Scalarizer][DirectX] support structs return types (PR #111569)

Mariusz Sikora via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 11:58:41 PDT 2024


mariusz-sikora-at-amd wrote:

> I'm a little suprised you are getting a casting error though. The only non dyn_casts are on `llvm/lib/Transforms/Scalar/Scalarizer.cpp:736` and `1087` and both check the vectors before that cast.

This is rather assert while we are doing `Scatterer::operator[]` and we are creating `CreateExtractElement` but Type is not a Vector but a Structure. Adding `uadd.with.overflow` to `isTriviallyScalarizable` is 'fixing' this. I think `isVectorIntrinsicWith...` is not needed to be extend because it will produce `uadd.with.overflow.i32.i1` and it will fail on other thing (but this may be only AMDGPU specific?).

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


More information about the llvm-commits mailing list