Nate noticed that Andrew never did this. This fixes PR600
llvm-svn: 23110
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index dc706c1..624933c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2005,7 +2005,7 @@
Result = DAG.getNode(ISD::UNDEF, NVT);
break;
case ISD::Constant:
- Result = DAG.getNode(ISD::ZERO_EXTEND, NVT, Op);
+ Result = DAG.getNode(ISD::SIGN_EXTEND, NVT, Op);
assert(isa<ConstantSDNode>(Result) && "Didn't constant fold zext?");
break;
case ISD::ConstantFP: