fix the default va_arg expansion (in the realignment case) to not implicitly
authorChris Lattner <sabre@nondot.org>
Sun, 10 Oct 2010 18:36:26 +0000 (18:36 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 10 Oct 2010 18:36:26 +0000 (18:36 +0000)
truncate the stack pointer to 32-bits on a 64-bit machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116169 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 95aa445f4f1b58dad2ee20e1a09cda618e00d031..c7779495ec1fdad87879a0fa3c1324b0c682ea28 100644 (file)
@@ -2699,7 +2699,7 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node,
                                            TLI.getPointerTy()));
 
       VAList = DAG.getNode(ISD::AND, dl, TLI.getPointerTy(), VAList,
-                           DAG.getConstant(-Align,
+                           DAG.getConstant(-(int64_t)Align,
                                            TLI.getPointerTy()));
     }