summaryrefslogtreecommitdiff
path: root/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
commit0b68b758bbb6718fc67423109eeb9df64c711a37 (patch)
treee4755a5946ffdba795e72075abdf24a8a484f1dc /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent531ebc8a3cf0fdc5c30d072ab356283ce8dd145f (diff)
downloadllvm-0b68b758bbb6718fc67423109eeb9df64c711a37.tar.gz
llvm-0b68b758bbb6718fc67423109eeb9df64c711a37.tar.bz2
llvm-0b68b758bbb6718fc67423109eeb9df64c711a37.tar.xz
DAGCombine: visitXOR can replace a node without returning it, bail out in that case.
Fixes the crash reported in PR15608. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 44d43a1d07..d1f476e644 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/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);
}
}