llvm-project
b9057571 - [SPIRV] Handle loads from indirect args in the presence of `SPV_KHR_untyped_pointers` (#229184)

Commit
5 days ago
[SPIRV] Handle loads from indirect args in the presence of `SPV_KHR_untyped_pointers` (#229184) The initial bring-up of `SPV_KHR_untyped_pointers` support appears to have missed a spot. When dealing with indirect args (`byval`/`byref`) we want to retain the pointee type / issue a typed pointer (this is handled on the arg typing side). However, the pointer type assignment transform can work back from a loaded type, and erroneously assign that type as the dominant type. This leads to broken SPIR-V, because needed bitcasts from the indirect type to the load are not emitted (they'd be spurious due to the lost typing). The patch corrects it by adjusting how we work out pointer typing when dealing with a load instruction.
Author
Parents
Loading