projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03017c7
)
Add a missing check, which broke a bunch of vector tests.
author
Chris Lattner
<sabre@nondot.org>
Mon, 3 Apr 2006 17:21:50 +0000
(17:21 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 3 Apr 2006 17:21:50 +0000
(17:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27374
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 5742aef684210c836542f1a74338e4dfbddc9533..aacee99ed9936865a6b3b77a2824e3693275496a 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@
-2756,9
+2756,12
@@
SDOperand DAGCombiner::visitVBinOp(SDNode *N, ISD::NodeType IntOp,
Ops.back().getOpcode() == ISD::ConstantFP) &&
"Scalar binop didn't fold!");
}
- Ops.push_back(*(LHS.Val->op_end()-2));
- Ops.push_back(*(LHS.Val->op_end()-1));
- return DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, Ops);
+
+ if (Ops.size() == LHS.getNumOperands()-2) {
+ Ops.push_back(*(LHS.Val->op_end()-2));
+ Ops.push_back(*(LHS.Val->op_end()-1));
+ return DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, Ops);
+ }
}
return SDOperand();