Commit a6d55d97 authored by Hans Wennborg's avatar Hans Wennborg
Browse files

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296001 91177308-0d34-0410-b5e6-96231b3b80d8
parent ad64489d
......@@ -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;
......
// 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment