summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorGerolf Hoflehner <ghoflehner@apple.com>2018-04-17 07:22:34 +0000
committerGerolf Hoflehner <ghoflehner@apple.com>2018-04-17 07:22:34 +0000
commit5b4a67af1b09295fcb9080bc68d92f30374331fb (patch)
treef9832e5d30a77684c1b4b721b2b736e45fc486e9 /llvm/lib/CodeGen
parentc4f5f605fdf9a232d86b9a3d871d79fa2876a296 (diff)
downloadbcm5719-llvm-5b4a67af1b09295fcb9080bc68d92f30374331fb.tar.gz
bcm5719-llvm-5b4a67af1b09295fcb9080bc68d92f30374331fb.zip
[DAGCombiner] Fix for oss-fuzz bug
llvm-svn: 330178
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b1e03e327ce..abb25fb4f27 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2799,7 +2799,8 @@ SDValue DAGCombiner::useDivRem(SDNode *Node) {
for (SDNode::use_iterator UI = Op0.getNode()->use_begin(),
UE = Op0.getNode()->use_end(); UI != UE; ++UI) {
SDNode *User = *UI;
- if (User == Node || User->use_empty())
+ if (User == Node || User->getOpcode() == ISD::DELETED_NODE ||
+ User->use_empty())
continue;
// Convert the other matching node(s), too;
// otherwise, the DIVREM may get target-legalized into something
OpenPOWER on IntegriCloud