summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorSilviu Baranga <silviu.baranga@arm.com>2013-04-25 09:32:33 +0000
committerSilviu Baranga <silviu.baranga@arm.com>2013-04-25 09:32:33 +0000
commit02066838b5cdf17277267e79ffbc9459a58cdd59 (patch)
treed070dd6d9e4fa25659f34273243412bd6a3b0036 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent06fd5bf4ea122960f0435449c2391ea4fe1ea2ca (diff)
downloadllvm-02066838b5cdf17277267e79ffbc9459a58cdd59.tar.gz
llvm-02066838b5cdf17277267e79ffbc9459a58cdd59.tar.bz2
llvm-02066838b5cdf17277267e79ffbc9459a58cdd59.tar.xz
Fix constant folding for one lane vector types. Constant folding one lane vector types not returns a vector instead of a scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 3082ee7caa..5e30c251e7 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2785,7 +2785,7 @@ SDValue SelectionDAG::FoldConstantArithmetic(unsigned Opcode, EVT VT,
}
// Handle the scalar case first.
- if (Outputs.size() == 1)
+ if (Scalar1 && Scalar2)
return Outputs.back();
// Otherwise build a big vector out of the scalar elements we generated.