summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-03-30 21:28:18 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-03-30 21:28:18 +0000
commit93354432369933fae2060d1601ab9a0aec2f0d47 (patch)
tree7b0b27cea4c67e786ea68759e890c0e4bfccbb9e /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent45df882045b2854683f9b7d62d1e6455cc7fab2f (diff)
downloadbcm5719-llvm-93354432369933fae2060d1601ab9a0aec2f0d47.tar.gz
bcm5719-llvm-93354432369933fae2060d1601ab9a0aec2f0d47.zip
DAGCombine: visitXOR can replace a node without returning it, bail out in that case.
Fixes the crash reported in PR15608. llvm-svn: 178429
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 44d43a1d076..d1f476e6447 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -6823,9 +6823,9 @@ SDValue DAGCombiner::visitBRCOND(SDNode *N) {
MVT::Other, Chain, Tmp, N2);
}
- // visitXOR has changed XOR's operands.
- Op0 = TheXor->getOperand(0);
- Op1 = TheXor->getOperand(1);
+ // visitXOR has changed XOR's operands or replaced the XOR completely,
+ // bail out.
+ return SDValue(N, 0);
}
}
OpenPOWER on IntegriCloud