diff options
| author | Dan Gohman <gohman@apple.com> | 2010-06-18 00:08:30 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-06-18 00:08:30 +0000 |
| commit | c0348bf891cf25a857b53fbc7eea116cef00d3da (patch) | |
| tree | 2e2b412fbb4bfe976ff3150aecc0e3a6eba2e45a /lib/CodeGen | |
| parent | 03e0a3c625c1a9c4988035a1efb2568c70f3e61e (diff) | |
| download | external_llvm-c0348bf891cf25a857b53fbc7eea116cef00d3da.zip external_llvm-c0348bf891cf25a857b53fbc7eea116cef00d3da.tar.gz external_llvm-c0348bf891cf25a857b53fbc7eea116cef00d3da.tar.bz2 | |
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
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index eac3865..49f3101 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; |
