[PATCH] D111434: [PowerPC] PPC backend optimization on conditional trap intrustions

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 26 05:45:15 PDT 2021


nemanjai 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);
----------------
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


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111434



More information about the cfe-commits mailing list