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

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 13:02:58 PDT 2024


farzonl 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. 

Thats a bug.  Adding to `isTriviallyScalarizable` is not the right fix. Whats going on is because `uadd.with.overflow` isn't in `isTriviallyScalarizable` we aren't splitting the calls so when we call `Scatterer Op0` it isn't operating on a vector. A correct fix wouldn't  replace extract element unless we scalarized the call. How long can you wait for a fix? I'm at a conference right now so limited with how quickly I can get a fix out.


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


More information about the llvm-commits mailing list