llvm-project
6457aee5 - [DirectX] Bug fix for Data Scalarization crash (#118426)

Commit
1 year ago
[DirectX] Bug fix for Data Scalarization crash (#118426) Two bugs here. First calling `Inst->getFunction()` has undefined behavior if the instruction is not tracked to a function. I suspect the `replaceAllUsesWith` was leaving the GEPs in a weird ghost parent situation. I switched up the visitor to be able to `eraseFromParent` as part of visiting and then everything started working. The second bug was in `DXILFlattenArrays.cpp`. I was unaware that you can have multidimensional arrays of `zeroinitializer`, and `undef` so fixed up the initializer to handle these two cases. fixes #117273
Author
Parents
Loading