diff options
author | Farzon Lotfi <farzonlotfi@microsoft.com> | 2024-12-18 16:33:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 16:33:49 -0500 |
commit | 6457aee5b7da6bb6d7f556d14f42a6763b42e060 (patch) | |
tree | 42f9d605a3fcdcbb8bf14c61aa1d2fc114972b64 /clang/lib/Frontend/TestModuleFileExtension.cpp | |
parent | 6ea8b4cebd322fe604efa96b943abf6ad419414c (diff) | |
download | llvm-6457aee5b7da6bb6d7f556d14f42a6763b42e060.zip llvm-6457aee5b7da6bb6d7f556d14f42a6763b42e060.tar.gz llvm-6457aee5b7da6bb6d7f556d14f42a6763b42e060.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions