[PATCH] D130247: [LoongArch] Refactor insertDivByZeroTrap

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 23 13:31:07 PDT 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

Some nits



================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:741
 
 static MachineBasicBlock *insertDivByZeroTrap(MachineInstr &MI,
+                                              MachineBasicBlock *MBB) {
----------------
Keep the reference for the non-null semantics.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:769
+
+  EndMBB->splice(EndMBB->end(), MBB, std::next(MI.getIterator()), MBB->end());
+  EndMBB->transferSuccessorsAndUpdatePHIs(MBB);
----------------
Move EndMBB operations after BreakMBB? So that the MBB modify order resembles more on the MBB placement order.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130247



More information about the llvm-commits mailing list