Add isNotDuplicable to CTRLoop pseudo instructions, to avoid other pass such as early-tailduplication break the loop structure by duplicating pseudo instructions.
Attached test case will be added before and removed by this fix.
Paths
| Differential D132738
[PowerPC] CTRLoop pseudo instructions should not be duplicated ClosedPublic Authored by tingwang on Aug 26 2022, 6:26 AM.
Details
Summary Add isNotDuplicable to CTRLoop pseudo instructions, to avoid other pass such as early-tailduplication break the loop structure by duplicating pseudo instructions. Attached test case will be added before and removed by this fix.
Diff Detail
Event TimelineComment Actions
Do you mean you plan to remove the test case? I think the test case should still be kept and check that a ctr-loop is generated after this fix.
Comment Actions
Sure. Test case updated. This revision is now accepted and ready to land.Aug 29 2022, 8:34 PM This revision was landed with ongoing or failed builds.Aug 30 2022, 1:33 AM Closed by commit rG710923cdc88d: [PowerPC] CTRLoop pseudo instructions should not be duplicated (authored by tingwang). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 456567 llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/ctrloop-do-not-duplicate-mi.mir
|
Maybe we can add some comments for this change, like MTCTR8loop must be inside a loop-preheader, duplicating the loop-preheader block will break this assumption?