[PATCH] D147060: [MachineSink] Fix an assertion failure in isCycleInvariant

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 07:37:47 PDT 2023


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

LGTM -- when landing could you add a short comment to the test indicating which function used to crash, that'll ease the life of anyone reading the test in the future and let them know exactly what's being tested.



================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:389-390
+    II = skipDebugInstructionsForward(II, EI);
+    if (II == EI)
+      break;
+    MachineInstr &MI = *II;
----------------
You might be able to skip this as I believe we guarantee there are no debug intrinsics after the terminator of a block. On the other hand, it's not going to harm anything either.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147060



More information about the llvm-commits mailing list