This patch fixes a problem of the commit
52cc97a0 Zap the argument of llvm.assume when deleting it
A test case is created to demonstrate the crash caused by the instruction iterator invalidated by the recursive removal of dead operands of assume. The solution restarts from the first instruction in case CurInstIterator is invalidated by RecursivelyDeleteTriviallyDeadInstructions().
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Thanks. Can we just wrap it in resetIteratorIfInvalidatedWhileCalling like the call a few lines later? That seems less error prone.
Comment Actions
RecursivelyDeleteTriviallyDeadInstructions() call is wrapped with resetIteratorIfInvalidatedWhileCalling().