This change will fix the accidental deletion of the instruction
which is pointed by the instruction iterator of the current MBB.
Details
Diff Detail
Unit Tests
Event Timeline
I did not find any existing test case which specifically tests the "insertDeleteInstructions()" function. Also, I did not find MIR test cases with many of the previous commits. Please provide me with some pointers on testing this specific change. I found this issue when experimenting with this transform for my company-specific backend.
I would hope there were at least some IR tests in previous commits touching this pass. Perhaps you can use -stop-after to get a MIR starting point on one of them, and manually modify the MIR until it breaks?
I have tried to add a test case by tweaking existing ll tests. But the existing overloads of this transform will not hit this case since they always delete instructions that are previous to "Root". But nobody is stopping clients of this transform to mark currently pointed instruction as a to be deleted instruction. It has become very tricky to hit this case with a test. Please let me know how to proceed further.
Typo cuurent