commit | 02066838b5cdf17277267e79ffbc9459a58cdd59 | [log] [tgz] |
---|---|---|
author | Silviu Baranga <silviu.baranga@arm.com> | Thu Apr 25 09:32:33 2013 +0000 |
committer | Silviu Baranga <silviu.baranga@arm.com> | Thu Apr 25 09:32:33 2013 +0000 |
tree | d070dd6d9e4fa25659f34273243412bd6a3b0036 | |
parent | 06fd5bf4ea122960f0435449c2391ea4fe1ea2ca [diff] [blame] |
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
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3082ee7..5e30c25 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2785,7 +2785,7 @@ } // 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.