diff options
| author | Michael Liao <michael.liao@intel.com> | 2012-10-19 03:17:00 +0000 |
|---|---|---|
| committer | Michael Liao <michael.liao@intel.com> | 2012-10-19 03:17:00 +0000 |
| commit | 2c2358036df4ed294a451d4ffa812c6e81ae62ce (patch) | |
| tree | 9d92b9a1cd891d214790214d9ab740c8cef0da20 /llvm/lib | |
| parent | c26f5457d0a45b7de726b587344b23562e365b66 (diff) | |
| download | bcm5719-llvm-2c2358036df4ed294a451d4ffa812c6e81ae62ce.tar.gz bcm5719-llvm-2c2358036df4ed294a451d4ffa812c6e81ae62ce.zip | |
Simplify condition checking as CONCAT assume all inputs of the same type.
llvm-svn: 166260
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 22270968e3f..17386b74e36 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -8629,9 +8629,9 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode* N) { // (extract_subvec (concat V1, V2, ...), i) // Into: // Vi if possible - for (unsigned i = 0, e = V->getNumOperands(); i != e; ++i) - if (V->getOperand(i).getValueType() != NVT) - return SDValue(); + // Only operand 0 is checked as 'concat' assumes all inputs of the same type. + if (V->getOperand(0).getValueType() != NVT) + return SDValue(); unsigned Idx = dyn_cast<ConstantSDNode>(N->getOperand(1))->getZExtValue(); unsigned NumElems = NVT.getVectorNumElements(); assert((Idx % NumElems) == 0 && |

