[clang] [clang][OpenCL][CodeGen][AMDGPU] Do not use `private` as the default AS for when `generic` is available (PR #112442)

Alex Voicu via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 16 03:57:16 PDT 2024


================
@@ -5903,7 +5904,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
       auto Call = RValue::get(
           EmitRuntimeCall(CGM.CreateRuntimeFunction(FTy, Name), Args));
       if (TmpSize)
-        EmitLifetimeEnd(TmpSize, TmpPtr);
+        EmitLifetimeEnd(TmpSize, TmpPtr->stripPointerCasts());
----------------
AlexVlx wrote:

I would extremely strongly prefer not to mess with this ball of yarn or other pieces of functionality (specifically, `CreateMemTemp`), as part of what is essentially a point fix of a long standing bug. I'll leave a TODO in place for someone that is braver and more skilled.

https://github.com/llvm/llvm-project/pull/112442


More information about the cfe-commits mailing list