[all-commits] [llvm/llvm-project] 6457ae: [DirectX] Bug fix for Data Scalarization crash (#1...
Farzon Lotfi via All-commits
all-commits at lists.llvm.org
Wed Dec 18 13:34:10 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6457aee5b7da6bb6d7f556d14f42a6763b42e060
https://github.com/llvm/llvm-project/commit/6457aee5b7da6bb6d7f556d14f42a6763b42e060
Author: Farzon Lotfi <farzonlotfi at microsoft.com>
Date: 2024-12-18 (Wed, 18 Dec 2024)
Changed paths:
M llvm/lib/Target/DirectX/DXILDataScalarization.cpp
M llvm/lib/Target/DirectX/DXILFlattenArrays.cpp
A llvm/test/CodeGen/DirectX/flatten-bug-117273.ll
M llvm/test/CodeGen/DirectX/llc-vector-load-scalarize.ll
A llvm/test/CodeGen/DirectX/scalar-bug-117273.ll
M llvm/test/CodeGen/DirectX/scalar-load.ll
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list