[clang] [clang][SPIRV] Coerce pointer kernel arguments to global AS (PR #185498)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 06:49:59 PDT 2026


================
@@ -146,11 +146,12 @@ void CommonSPIRABIInfo::setCCs() {
 }
 
 ABIArgInfo SPIRVABIInfo::classifyKernelArgumentType(QualType Ty) const {
-  if (getContext().getLangOpts().isTargetDevice()) {
+  if (getContext().getLangOpts().isTargetDevice() ||
+      getTarget().getTriple().getVendor() == llvm::Triple::Intel) {
----------------
sarnex wrote:

Done in latest commit. This function only runs for `SPIR-V` (not for `SPIR`), so if all `SPIR-V` execution environments should behave this way we don't need any checks.

https://github.com/llvm/llvm-project/pull/185498


More information about the cfe-commits mailing list