diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-02-23 18:36:11 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-02-23 18:36:11 +0000 |
commit | 2fc968b740dd007133eb1910a3346f90be0e6f5a (patch) | |
tree | 140c2f77a423414ea52d2b91bbdc5b2f50fe8346 | |
parent | d63cfd6596c1633fe9fb86fa476d47534a9f1835 (diff) | |
download | llvm-2fc968b740dd007133eb1910a3346f90be0e6f5a.zip llvm-2fc968b740dd007133eb1910a3346f90be0e6f5a.tar.gz llvm-2fc968b740dd007133eb1910a3346f90be0e6f5a.tar.bz2 |
Merging r295843:
------------------------------------------------------------------------
r295843 | jvesely | 2017-02-22 07:01:42 -0800 (Wed, 22 Feb 2017) | 3 lines
[OpenCL] r600 needs OpenCL kernel calling convention
Differential Revision: https://reviews.llvm.org/D30236
------------------------------------------------------------------------
llvm-svn: 296001
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 29b2142..2cdf76c 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -3154,7 +3154,7 @@ getCCForDeclaratorChunk(Sema &S, Declarator &D, if (Attr->getKind() == AttributeList::AT_OpenCLKernel) { llvm::Triple::ArchType arch = S.Context.getTargetInfo().getTriple().getArch(); if (arch == llvm::Triple::spir || arch == llvm::Triple::spir64 || - arch == llvm::Triple::amdgcn) { + arch == llvm::Triple::amdgcn || arch == llvm::Triple::r600) { CC = CC_OpenCLKernel; } break; diff --git a/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl b/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl index f37fe66..3c69d11f 100644 --- a/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl +++ b/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl @@ -1,5 +1,6 @@ // REQUIRES: amdgpu-registered-target // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple r600-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s // CHECK-NOT: %struct.single_element_struct_arg = type { i32 } typedef struct single_element_struct_arg |