summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-29 01:11:14 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-29 01:11:14 +0000
commit744b4bd170365a1e2953e8d28b676a26ee5425ba (patch)
tree736e53813dc10b36b7725f57435a23318c804462 /lib/CodeGen/SelectionDAG
parentfe42808f44a91421d46e68e85e7486a22a5a26ee (diff)
downloadllvm-744b4bd170365a1e2953e8d28b676a26ee5425ba.tar.gz
llvm-744b4bd170365a1e2953e8d28b676a26ee5425ba.tar.bz2
llvm-744b4bd170365a1e2953e8d28b676a26ee5425ba.tar.xz
Make sure to sext or trunc the result from the register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 56013000cc..2b556bc379 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1822,7 +1822,7 @@ void SelectionDAGBuilder::visitLandingPad(const LandingPadInst &LP) {
AddLandingPadInfo(LP, MMI, MBB);
SmallVector<EVT, 2> ValueVTs;
- ComputeValueVTs(TLI, LP.getType(),ValueVTs);
+ ComputeValueVTs(TLI, LP.getType(), ValueVTs);
// Insert the EXCEPTIONADDR instruction.
assert(FuncInfo.MBB->isLandingPad() &&
@@ -1839,10 +1839,10 @@ void SelectionDAGBuilder::visitLandingPad(const LandingPadInst &LP) {
Ops[1] = Chain;
SDValue Op2 = DAG.getNode(ISD::EHSELECTION, getCurDebugLoc(), VTs, Ops, 2);
Chain = Op2.getValue(1);
+ Op2 = DAG.getSExtOrTrunc(Op2, getCurDebugLoc(), MVT::i32)
Ops[0] = Op1;
Ops[1] = Op2;
-
SDValue Res = DAG.getNode(ISD::MERGE_VALUES, getCurDebugLoc(),
DAG.getVTList(&ValueVTs[0], ValueVTs.size()),
&Ops[0], 2);