[llvm-commits] [llvm] r136444 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Bill Wendling
isanbard at gmail.com
Thu Jul 28 18:11:14 PDT 2011
Author: void
Date: Thu Jul 28 20:11:14 2011
New Revision: 136444
URL: http://llvm.org/viewvc/llvm-project?rev=136444&view=rev
Log:
Make sure to sext or trunc the result from the register.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=136444&r1=136443&r2=136444&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu Jul 28 20:11:14 2011
@@ -1822,7 +1822,7 @@
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 @@
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);
More information about the llvm-commits
mailing list