You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Usage of a matrix in a structure that is passed to groupshared memory does not get dead store eliminated #6417
Description
When passing a full matrix across to groupshared, elements that are never loaded don't have their stores properly deleted when the index is a compile time constant.
Steps to Reproduce
Add "#define TGSM_MATRIX" to the attached shader and see the number of "addrspace(3)" stores increase from 3 to 16 for the same structure.
Actual Behavior
Expected behavior is that there would only be 3 stores in either version of the shader.
This may be caused by limitations in the legacy SROA pass that the DXIL SROA is based on. This may "just work" in upstream with modern SROA and dead store elimination. We should check this against upstream once the language and DXIL generation support are more complete.
We're unlikely to address this in DXC unless something changes to push the priority higher.
Activity
llvm-beanz commentedon Mar 15, 2024
This may be caused by limitations in the legacy SROA pass that the DXIL SROA is based on. This may "just work" in upstream with modern SROA and dead store elimination. We should check this against upstream once the language and DXIL generation support are more complete.
We're unlikely to address this in DXC unless something changes to push the priority higher.