From: Chris Lattner Date: Fri, 18 Sep 2009 18:34:29 +0000 (+0000) Subject: duncan points out the EH selector values are signed. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6ba2e87061bad9a24c75db69ab9b80bb6e16d96b;p=oota-llvm.git duncan points out the EH selector values are signed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82245 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index ff41458bea4..ff9829214ce 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -4024,7 +4024,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { MVT::SimpleValueType VT = (Intrinsic == Intrinsic::eh_selector_i32 ? MVT::i32 : MVT::i64); if (Op.getValueType().getSimpleVT() < VT) - Op = DAG.getNode(ISD::ZERO_EXTEND, dl, VT, Op); + Op = DAG.getNode(ISD::SIGN_EXTEND, dl, VT, Op); else if (Op.getValueType().getSimpleVT() < VT) Op = DAG.getNode(ISD::TRUNCATE, dl, VT, Op);