Terminators like invoke can have users outside the current basic block.
We have to replace those users with undef, before replacing the
terminator.
This fixes a crash exposed by rL373430.
Paths
| Differential D68327
[Local] Handle terminators with users in removeUnreachableBlocks. ClosedPublic Authored by fhahn on Oct 2 2019, 3:12 AM.
Details Summary Terminators like invoke can have users outside the current basic block. This fixes a crash exposed by rL373430.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Oct 2 2019, 10:10 AM Closed by commit rL373513: [Local] Handle terminators with users in removeUnreachableBlocks. (authored by fhahn). · Explain WhyOct 2 2019, 12:40 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 222792 llvm/lib/Transforms/Utils/Local.cpp
llvm/unittests/Transforms/Utils/LocalTest.cpp
|