[PATCH] D88386: [MIR][M68K] (Patch 2/8): Changes on Target-independent MIR part

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 02:38:08 PST 2020


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:1357
+  // Skip debug declarations, we don't want a DebugLoc from them.
+  MBBI = skipDebugInstructionsForward(std::prev(MBBI), instr_rend());
+  if (MBBI != instr_rend())
----------------
craig.topper wrote:
> Is it possible MBBI is already at instr_rend() so that std::prev isn't valid?
@myhsu Have you confirmed whether this can happen? It looks like it at least needs an assert, else an early-out.


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

https://reviews.llvm.org/D88386



More information about the llvm-commits mailing list