amyk added inline comments.
================ Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:1011 + case PPC::TDI: + case PPC::TWI: { + MachineInstr *LiMIA = getVRegDefOrNull(&MI.getOperand(1), MRI); ---------------- nemanjai wrote: > Seems that we should be able to handle all 4 in the same block: > - Check that both operands are `LI[8]`/`LI[S][8]+ORI[8]` or an immediate > - Set the variables for the three constants > - Determine if this is an unconditional trap or never trap > - Emit the correct instruction +1 ================ Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:1013 + MachineInstr *LiMIA = getVRegDefOrNull(&MI.getOperand(1), MRI); + // will not optimize if no value set + if (!(LiMIA && (LiMIA->getOpcode() == PPC::LI || ---------------- nit: Capitalize and add a period (and for all other comments). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111434/new/ https://reviews.llvm.org/D111434 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits