r295843 - [OpenCL] r600 needs OpenCL kernel calling convention

Jan Vesely via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 07:01:43 PST 2017


Author: jvesely
Date: Wed Feb 22 09:01:42 2017
New Revision: 295843

URL: http://llvm.org/viewvc/llvm-project?rev=295843&view=rev
Log:
[OpenCL] r600 needs OpenCL kernel calling convention

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

Modified:
    cfe/trunk/lib/Sema/SemaType.cpp
    cfe/trunk/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=295843&r1=295842&r2=295843&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Wed Feb 22 09:01:42 2017
@@ -3175,7 +3175,7 @@ getCCForDeclaratorChunk(Sema &S, Declara
       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;

Modified: cfe/trunk/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl?rev=295843&r1=295842&r2=295843&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl (original)
+++ cfe/trunk/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl Wed Feb 22 09:01:42 2017
@@ -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




More information about the cfe-commits mailing list