================
@@ -3133,15 +3149,13 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, 
Address VAListAddr,
 
     // Copy into a temporary if the type is more aligned than the
     // register save area.
-    if (TyAlign.getQuantity() > 8) {
-      Address Tmp = CGF.CreateMemTemp(Ty);
+    if (neededInt && TyAlign.getQuantity() > 8) {
+      if (!Tmp.isValid())
+        Tmp = CGF.CreateMemTemp(Ty);
       CGF.Builder.CreateMemCpy(Tmp, RegAddr, TySize, false);
----------------
efriedma-quic wrote:

Did you mean to put the memcpy inside the if?  Also, please add a test for this,

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

Reply via email to