From: Dan Gohman Date: Fri, 18 Jun 2010 00:08:30 +0000 (+0000) Subject: Handle ext(ext(x)) -> ext(x) immediately, since it's simple. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=9e86a735682f3f62ff79291b4673e00cf5f2385b;p=oota-llvm.git Handle ext(ext(x)) -> ext(x) immediately, since it's simple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106256 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index eac3865371d..49f31012a39 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2474,7 +2474,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, VT.getVectorNumElements() == Operand.getValueType().getVectorNumElements()) && "Vector element count mismatch!"); - if (OpOpcode == ISD::ZERO_EXTEND || OpOpcode == ISD::SIGN_EXTEND) + if (OpOpcode == ISD::ZERO_EXTEND || OpOpcode == ISD::SIGN_EXTEND || + OpOpcode == ISD::ANY_EXTEND) // (ext (zext x)) -> (zext x) and (ext (sext x)) -> (sext x) return getNode(OpOpcode, DL, VT, Operand.getNode()->getOperand(0)); break;