================
@@ -2330,14 +2330,7 @@ CIRGenModule::getAddrOfConstantStringFromLiteral(const 
StringLiteral *s,
 
 mlir::ptr::MemorySpaceAttrInterface
 CIRGenModule::getGlobalCIRAddressSpace(LangAS as) {
-  // The cir::LangAddressSpace fold loses the SPIRDefIsGenMap split between
-  // cuda_constant and opencl_constant, so use the target map like classic.
-  if (langOpts.CUDAIsDevice && getTriple().isSPIRV() &&
-      (as == LangAS::cuda_device || as == LangAS::cuda_constant ||
-       as == LangAS::cuda_shared))
----------------
aobolensk wrote:

Yes, `cuda_*` AS only can come from getGlobalVarAddressSpace under CUDA && 
CUDAIsDevice, so the check is redundant once the logic moved into the SPIR 
target hook

https://github.com/llvm/llvm-project/pull/231098
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to