llvm-project/clang/test/CodeGenHIP
Yaxun (Sam) Liu 171da443d5 [HIPSPV] Fix literals are mapped to Generic address space
This issue is an oversight in D108621.

Literals in HIP are emitted as global constant variables with default
address space which maps to Generic address space for HIPSPV. In
SPIR-V such variables translate to OpVariable instructions with
Generic storage class which are not legal. Fix by mapping literals
to CrossWorkGroup address space.

The literals are not mapped to UniformConstant because the “flat”
pointers in HIP may reference them and “flat” pointers are modeled
as Generic pointers in SPIR-V. In SPIR-V/OpenCL UniformConstant
pointers may not be casted to Generic.

Patch by: Henry Linjamäki

Reviewed by: Yaxun Liu

Differential Revision: https://reviews.llvm.org/D118876
2022-02-05 17:26:52 -05:00
..
half.hip [clang][amdgpu] Prefer not using `fp16` conversion intrinsics. 2020-06-16 10:21:56 -04:00
hipspv-addr-spaces.cpp [HIPSPV] Fix literals are mapped to Generic address space 2022-02-05 17:26:52 -05:00
hipspv-kernel.cpp [HIPSPV] Convert HIP kernels to SPIR-V kernels 2021-12-08 12:18:15 +03:00
lit.local.cfg [NFC] Fixed ignored .hip test. 2020-06-29 18:57:14 +03:00
printf-aggregate.cpp
printf.cpp