[PATCH] D119070: [MachineCombiner] Update iterator while deleting instructions

Darshan Bhat via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 21 05:15:24 PST 2022


DarshanRamakant added a comment.

In D119070#3299948 <https://reviews.llvm.org/D119070#3299948>, @DarshanRamakant wrote:

> In D119070#3299315 <https://reviews.llvm.org/D119070#3299315>, @arsenm wrote:
>
>> In D119070#3299167 <https://reviews.llvm.org/D119070#3299167>, @DarshanRamakant wrote:
>>
>>> 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?
>
> Thanks for the suggestion. Let me try that approach.

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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119070/new/

https://reviews.llvm.org/D119070



More information about the llvm-commits mailing list