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 | 4ad2bc59635512e18512e8dabb9c6d3403425bc6 (patch) | |
tree | 0028a231acc96a608a5e7d5c6daba0a8cb9c6700 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 6fe2f009df1a85efc588229676f2ffff0c1231f3 (diff) | |
download | bcm5719-llvm-4ad2bc59635512e18512e8dabb9c6d3403425bc6.tar.gz bcm5719-llvm-4ad2bc59635512e18512e8dabb9c6d3403425bc6.zip |
Fix constant folding for one lane vector types. Constant folding one lane vector types not returns a vector instead of a scalar.
llvm-svn: 180254
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3082ee7caae..5e30c251e75 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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. |