================
@@ -2769,6 +2772,8 @@ class CodeGenFunction : public CodeGenTypeCache {
 
   LValue MakeAddrLValue(Address Addr, QualType T, LValueBaseInfo BaseInfo,
                         TBAAAccessInfo TBAAInfo) {
+    if (CGM.isInvariantAddressSpace(T.getAddressSpace()))
----------------
keshavvinayak01 wrote:

This checks the access type, which covers OpenCL/HLSL. CUDA is handled in 
`EmitGlobalVarDeclLValue(): isGlobalVarInvariant(VD)` classifies the 
declaration via `GetGlobalVarAddressSpace()`.

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

Reply via email to