================
@@ -368,7 +368,8 @@ CodeGenModule::CodeGenModule(ASTContext &C,
   IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth());
   IntPtrTy = llvm::IntegerType::get(LLVMContext,
     C.getTargetInfo().getMaxPointerWidth());
-  Int8PtrTy = llvm::PointerType::get(LLVMContext, 0);
+  Int8PtrTy = llvm::PointerType::get(LLVMContext,
----------------
AlexVlx wrote:

> The IR address space is a pure target concept. Any address space error would 
> be on the frontend emitting the wrong IR for the target

I don't think mixing languages with different LangAS maps is sound, OCL 
originating BC is not generic BC. There's no "error" here, the FE is doing what 
is asked of it (indiscriminately assuming that AS 0 is some generic/flat 
pointer that is valid everywhere is rather risque, as per prior conversation in 
this review). The actual problem is, AFAICT, that when we call 
`AMDGPUTargetInfo::adjust` we indiscriminately set private as default for any 
and all OCL compilations? There's a 6 year old `TODO`, which may or may not be 
vestigial at this point.

https://github.com/llvm/llvm-project/pull/88182
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to