aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-18 21:57:59 +0000
committerChris Lattner <sabre@nondot.org>2005-01-18 21:57:59 +0000
commitd5d56825123665b60d4eada0a4ad7d0adc5cf3a3 (patch)
tree4dc51114ff1061264fb9dc1657e1da3ace415a97
parent477c9318526fd79794fdb058cd4189a79441cbcb (diff)
Zero is cheaper than sign extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19675 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 8c6c10d583..52e723a57e 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -793,7 +793,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
case ISD::SIGN_EXTEND:
Result = PromoteOp(Node->getOperand(0));
// NOTE: Any extend would work here...
- Result = DAG.getNode(ISD::SIGN_EXTEND, Op.getValueType(), Result);
+ Result = DAG.getNode(ISD::ZERO_EXTEND, Op.getValueType(), Result);
Result = DAG.getNode(ISD::SIGN_EXTEND_INREG, Result.getValueType(),
Result, Node->getOperand(0).getValueType());
break;