Description
Discussed issue #141673 with @bogner and came to the conclusion that the underlying issue is that the DXILCBufferAccess pass is removing globals from the module without replacing all their uses, thus resulting in invalid IR.
This notably occurs when the memcpy
intrinsic uses a global, as seen in #141673 and in this reproduction: https://godbolt.org/z/dn8fYd6bx
In this reproduction, the constant buffer global @someGlobal
is being used by memcpy
despite @someGlobal
not being defined in the module.
To resolve this:
- DXILCBufferAccess should be made to handle
memcpy
intrinsics - A check should be added to ensure that all uses of a global handle are replaced before the global handle is erased from the module (to ensure issues like this don't happen again silently)
Metadata
Metadata
Assignees
Type
Projects
Status
Active