[OpenCL] r600 needs OpenCL kernel calling convention

Differential Revision: https://reviews.llvm.org/D30236

llvm-svn: 295843
This commit is contained in:
Jan Vesely 2017-02-22 15:01:42 +00:00
parent e8bb39205d
commit a6f369c727
2 changed files with 2 additions and 1 deletions

View File

@ -3175,7 +3175,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;

View File

@ -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