OSDN Git Service

Zero is cheaper than sign extend.
authorChris Lattner <sabre@nondot.org>
Tue, 18 Jan 2005 21:57:59 +0000 (21:57 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 18 Jan 2005 21:57:59 +0000 (21:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19675 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 8c6c10d..52e723a 100644 (file)
@@ -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;