summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-18 00:08:30 +0000
committerDan Gohman <gohman@apple.com>2010-06-18 00:08:30 +0000
commit0883789ec4a1689b272fec5ab6c6a73ec1fc6dc6 (patch)
treea6e9437e1c17cc5645f21620dbac3be3dde018ec /llvm/lib/CodeGen
parent30d7a51d6c30a8472c696ec30da28dc432db4322 (diff)
downloadbcm5719-llvm-0883789ec4a1689b272fec5ab6c6a73ec1fc6dc6.tar.gz
bcm5719-llvm-0883789ec4a1689b272fec5ab6c6a73ec1fc6dc6.zip
Handle ext(ext(x)) -> ext(x) immediately, since it's simple.
llvm-svn: 106256
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index eac3865371d..49f31012a39 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud