summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-08-17 18:02:22 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-08-17 18:02:22 +0000
commitcb6d65e1bf63b04efec8a0850f28dbc2389618af (patch)
treec01078340647910a4175f85f68fb480becede776
parent7a5e8e6502d06f3391f36035867e425cd8b7dcb0 (diff)
downloadbcm5719-llvm-cb6d65e1bf63b04efec8a0850f28dbc2389618af.tar.gz
bcm5719-llvm-cb6d65e1bf63b04efec8a0850f28dbc2389618af.zip
Avoid issue on 64-bit hosts.
llvm-svn: 41143
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 10167fde24c..e370e4a8971 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1378,7 +1378,8 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
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);
OpenPOWER on IntegriCloud