[PATCH] D28814: [OpenCL] Add missing address spaces in IR generation of Blocks
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 25 07:50:48 PST 2017
yaxunl added inline comments.
================
Comment at: lib/CodeGen/CGBlocks.cpp:726
+ CGM.getNSConcreteStackBlock()->getType()),
+ QualType());
isa = llvm::ConstantExpr::getBitCast(isa, VoidPtrTy);
----------------
The QualType needs to be the real QualType corresponding to the LLVM type, otherwise it won't work on targets with non-zero null pointer.
================
Comment at: lib/CodeGen/CGBlocks.cpp:1129
+ CGM.getNSConcreteGlobalBlock()->getType()),
+ QualType()));
----------------
same issue as above.
================
Comment at: test/CodeGenOpenCL/cl20-device-side-enqueue.cl:3
// RUN: %clang_cc1 %s -cl-std=CL2.0 -ffake-address-space-map -O0 -emit-llvm -o - -triple "spir64-unknown-unknown" | FileCheck %s --check-prefix=COMMON --check-prefix=B64
typedef void (^bl_t)(local void *);
----------------
Can we add a run line for triple amdgcn-amd-amdhsa-opencl to make sure the null pointer is generated correctly?
https://reviews.llvm.org/D28814
More information about the cfe-commits
mailing list