duncan points out the EH selector values are signed.
authorChris Lattner <sabre@nondot.org>
Fri, 18 Sep 2009 18:34:29 +0000 (18:34 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 18 Sep 2009 18:34:29 +0000 (18:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82245 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

index ff41458bea40f6ec65d4895ebcf780977e1a67f5..ff9829214ce42b55b6e72716b6e35c84d987eaf7 100644 (file)
@@ -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);