[llvm-commits] [llvm] r41143 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Fri Aug 17 11:02:22 PDT 2007
Author: evancheng
Date: Fri Aug 17 13:02:22 2007
New Revision: 41143
URL: http://llvm.org/viewvc/llvm-project?rev=41143&view=rev
Log:
Avoid issue on 64-bit hosts.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=41143&r1=41142&r2=41143&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Aug 17 13:02:22 2007
@@ -1378,7 +1378,8 @@
unsigned StackAlign =
TLI.getTargetMachine().getFrameInfo()->getStackAlignment();
if (Align > StackAlign)
- SP = DAG.getNode(ISD::AND, VT, SP, DAG.getConstant(-Align, VT));
+ SP = DAG.getNode(ISD::AND, VT, SP,
+ DAG.getConstant(-(uint64_t)Align, VT));
Tmp1 = DAG.getNode(ISD::SUB, VT, SP, Size); // Value
Tmp2 = DAG.getCopyToReg(Chain, SPReg, Tmp1); // Output chain
Tmp1 = LegalizeOp(Tmp1);
More information about the llvm-commits
mailing list