llvm
20aa2e95 - [NVPTX] Fix readonly/writeonly attribute conflict after refactoring (a171b8d4d5231)

Commit
119 days ago
[NVPTX] Fix readonly/writeonly attribute conflict after refactoring (a171b8d4d5231) After the NVPTX refactoring in a171b8d4d5231 and 21d93c2172483, createNVVMInternalAddrspaceWrap unconditionally adds ReadOnly attribute to byval parameters. This causes a verifier error for kernel parameters with local_accessor (writable shared memory), which are already marked writeonly by the frontend. The fix checks for existing WriteOnly attribute before adding ReadOnly, preventing the attribute conflict while preserving the readonly optimization for truly read-only parameters. Fixes compilation of structs_with_special_types_as_kernel_paramters.cpp test which failed with: Attributes 'readonly and writeonly' are incompatible! Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Author
Parents
Loading