[PATCH] D23361: [OpenCL] AMDGCN: Fix size_t type
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 11 10:25:49 PDT 2016
Anastasia added a comment.
I think Clang is supposed to generate the IR specific to the target architecture. It seems strange to ignore the pointer size. I am not sure if it might lead to some issues for the backends.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:107
@@ -106,2 +106,3 @@
IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth());
- IntPtrTy = llvm::IntegerType::get(LLVMContext, PointerWidthInBits);
+ IntPtrTy = llvm::IntegerType::get(LLVMContext, LangOpts.OpenCL ?
+ C.getTargetInfo().getOpenCLMaxPointerWidth() : PointerWidthInBits);
----------------
It seems wrong to call OpenCL specific function in generic code path?
https://reviews.llvm.org/D23361
More information about the cfe-commits
mailing list