diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2013-01-17 09:59:53 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2013-01-17 09:59:53 +0000 |
commit | f6a30e05d58ec251a08e56f71d57feb747882ba3 (patch) | |
tree | 744782299dbcca8cd714c23812d4ce85d9796bc2 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | b61b815fc83bca62e498a9951189a607a0d41f34 (diff) | |
download | bcm5719-llvm-f6a30e05d58ec251a08e56f71d57feb747882ba3.tar.gz bcm5719-llvm-f6a30e05d58ec251a08e56f71d57feb747882ba3.zip |
Optimization for the following SIGN_EXTEND pairs:
v8i8 -> v8i64,
v8i8 -> v8i32,
v4i8 -> v4i64,
v4i16 -> v4i64
for AVX and AVX2.
Bug 14865.
llvm-svn: 172708
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 344d1447a8d..91491bfe802 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2554,9 +2554,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, VT.getVectorNumElements() == Operand.getValueType().getVectorNumElements()) && "Vector element count mismatch!"); - if (OpOpcode == ISD::SIGN_EXTEND || OpOpcode == ISD::ZERO_EXTEND) - return getNode(OpOpcode, DL, VT, Operand.getNode()->getOperand(0)); - else if (OpOpcode == ISD::UNDEF) + if (OpOpcode == ISD::UNDEF) // sext(undef) = 0, because the top bits will all be the same. return getConstant(0, VT); break; |