summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-02-11 19:57:47 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-02-11 19:57:47 +0000
commita49a02a04f5fc09f67a8bfbe84193e28d7452bfe (patch)
treeb7573ed9a3360fa1819a548ecaa173ab610cf8d7 /llvm/lib/CodeGen
parent7b3f290d61b364fe7373de7d4c29151c0a6775da (diff)
downloadbcm5719-llvm-a49a02a04f5fc09f67a8bfbe84193e28d7452bfe.tar.gz
bcm5719-llvm-a49a02a04f5fc09f67a8bfbe84193e28d7452bfe.zip
SimplifySelectOps can only handle selects with a scalar condition. Add a check
that the condition is not a vector. llvm-svn: 125398
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 1851e17187f..5a7eebddf80 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -6872,6 +6872,9 @@ SDValue DAGCombiner::SimplifySelect(DebugLoc DL, SDValue N0,
bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
SDValue RHS) {
+ // Cannot simplify select with vector condition
+ if (TheSelect->getOperand(0).getValueType().isVector()) return false;
+
// If this is a select from two identical things, try to pull the operation
// through the select.
if (LHS.getOpcode() != RHS.getOpcode() ||
OpenPOWER on IntegriCloud