mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
[DAGCombine] Ensure SDNode use iterator is incremented properly.
Fixes an ASAN bug found by oss-fuzz. llvm-svn: 321813
This commit is contained in:
parent
d6aaa92099
commit
3b228c9dca
@ -2816,8 +2816,8 @@ SDValue DAGCombiner::useDivRem(SDNode *Node) {
|
||||
SDValue Op1 = Node->getOperand(1);
|
||||
SDValue combined;
|
||||
for (SDNode::use_iterator UI = Op0.getNode()->use_begin(),
|
||||
UE = Op0.getNode()->use_end(); UI != UE;) {
|
||||
SDNode *User = *UI++;
|
||||
UE = Op0.getNode()->use_end(); UI != UE; ++UI) {
|
||||
SDNode *User = *UI;
|
||||
if (User == Node || User->use_empty())
|
||||
continue;
|
||||
// Convert the other matching node(s), too;
|
||||
|
Loading…
Reference in New Issue
Block a user