diff options
author | Silviu Baranga <silviu.baranga@arm.com> | 2013-04-25 09:32:33 +0000 |
---|---|---|
committer | Silviu Baranga <silviu.baranga@arm.com> | 2013-04-25 09:32:33 +0000 |
commit | 02066838b5cdf17277267e79ffbc9459a58cdd59 (patch) | |
tree | d070dd6d9e4fa25659f34273243412bd6a3b0036 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 06fd5bf4ea122960f0435449c2391ea4fe1ea2ca (diff) |
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.cpp | 2 |
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. |