[PATCH] D138973: [PowerPC] [NFC] add test for O0 pipeline
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 19:15:39 PST 2022
lkail added inline comments.
================
Comment at: llvm/test/CodeGen/PowerPC/O0-pipeline.ll:59
+; CHECK-NEXT: Implement the 'patchable-function' attribute
+; CHECK-NEXT: PowerPC Pre-Emit Peephole
+; CHECK-NEXT: PowerPC Expand ISEL Generation
----------------
shchenz wrote:
> This pass seems should not be run at -O0?
In this pass, we have
```
if (skipFunction(MF.getFunction()) || !RunPreEmitPeephole) {
// Remove UNENCODED_NOP even when this pass is disabled.
// This needs to be done unconditionally so we don't emit zeros
// in the instruction stream.
SmallVector<MachineInstr *, 4> InstrsToErase;
for (MachineBasicBlock &MBB : MF)
for (MachineInstr &MI : MBB)
if (MI.getOpcode() == PPC::UNENCODED_NOP)
InstrsToErase.push_back(&MI);
for (MachineInstr *MI : InstrsToErase)
MI->eraseFromParent();
return false;
}
```
So I think it's essential to guarantee correct codegen.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138973/new/
https://reviews.llvm.org/D138973
More information about the llvm-commits
mailing list