================
@@ -3302,6 +3302,9 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
       CharUnits Align = CGM.getContext().getDeclAlign(VD);
       Val = Builder.CreateAlignedLoad(Var->getValueType(), Val, Align);
     }
+    if (Val->getType() != Wrapper->getReturnType()) {
+      Val = Builder.CreateAddrSpaceCast(Val, Wrapper->getReturnType());
+    }
----------------
arsenm wrote:

Don't think you need the condition, CreateAddrSpaceCast should be a no-op if 
the types match 

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

Reply via email to