summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit42993e45b64889cc09f1ae1c14ecd7585593340f (patch)
tree7f71780f3046cbf73e9e128ab2ac0b0fceab1f4c /llvm/lib/CodeGen
parent14947c34cc755071a5952e24d19449056784e05c (diff)
downloadbcm5719-llvm-42993e45b64889cc09f1ae1c14ecd7585593340f.tar.gz
bcm5719-llvm-42993e45b64889cc09f1ae1c14ecd7585593340f.zip
Zero is cheaper than sign extend.
llvm-svn: 19675
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 8c6c10d583d..52e723a57e5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud