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 ff41458..ff98292 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -4024,7 +4024,7 @@
     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);