forked from OSchip/llvm-project
When canonicalizing only erase the operation after calling the 'fold' hook if replacement results were supplied. This fixes a bug where the operation would always get erased, even if it was modified in place.
PiperOrigin-RevId: 232757964
This commit is contained in:
parent
fd2d7c857b
commit
99fee0b181
|
@ -267,9 +267,9 @@ void GreedyPatternRewriteDriver::simplifyFunction() {
|
|||
addToWorklist(operand.getOwner());
|
||||
res->replaceAllUsesWith(resultValues[i]);
|
||||
}
|
||||
}
|
||||
|
||||
op->erase();
|
||||
op->erase();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue