summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-04-20 01:25:01 +0000
committerBill Wendling <isanbard@gmail.com>2010-04-20 01:25:01 +0000
commit467e6c2deb2fb47fa22b5ff02651daade327c78f (patch)
treea19f51947d4860719d73ef2fbb1fad0899c4e57e /llvm/lib/CodeGen/SelectionDAG
parent4025306a91c78ecfc23cde2311d90b1b65f28e2a (diff)
downloadbcm5719-llvm-467e6c2deb2fb47fa22b5ff02651daade327c78f.tar.gz
bcm5719-llvm-467e6c2deb2fb47fa22b5ff02651daade327c78f.zip
The visitXOR method can return the same SDNode. If so, we don't want to delete
it as it's not dead. llvm-svn: 101855
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index f15c121668f..7ece6e85216 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4911,7 +4911,7 @@ SDValue DAGCombiner::visitBRCOND(SDNode *N) {
if (Op0.getOpcode() == Op1.getOpcode()) {
// Avoid missing important xor optimizations.
SDValue Tmp = visitXOR(TheXor);
- if (Tmp.getNode()) {
+ if (Tmp.getNode() && Tmp.getNode() != TheXor) {
DEBUG(dbgs() << "\nReplacing.8 ";
TheXor->dump(&DAG);
dbgs() << "\nWith: ";
OpenPOWER on IntegriCloud