Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit a745be5

Browse files
committed
[OpenCL] r600 needs OpenCL kernel calling convention
Differential Revision: https://reviews.llvm.org/D30236 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295843 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 45af332 commit a745be5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/Sema/SemaType.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3175,7 +3175,7 @@ getCCForDeclaratorChunk(Sema &S, Declarator &D,
31753175
if (Attr->getKind() == AttributeList::AT_OpenCLKernel) {
31763176
llvm::Triple::ArchType arch = S.Context.getTargetInfo().getTriple().getArch();
31773177
if (arch == llvm::Triple::spir || arch == llvm::Triple::spir64 ||
3178-
arch == llvm::Triple::amdgcn) {
3178+
arch == llvm::Triple::amdgcn || arch == llvm::Triple::r600) {
31793179
CC = CC_OpenCLKernel;
31803180
}
31813181
break;

test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// REQUIRES: amdgpu-registered-target
22
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
3+
// RUN: %clang_cc1 -triple r600-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
34

45
// CHECK-NOT: %struct.single_element_struct_arg = type { i32 }
56
typedef struct single_element_struct_arg

0 commit comments

Comments
 (0)