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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits