[PATCH] D14632: [MachineSink] Don't break ImplicitNulls

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 13:05:17 PST 2015


sanjoy added inline comments.

================
Comment at: lib/CodeGen/MachineSink.cpp:694
@@ +693,3 @@
+  auto *PredMBB = *MBB->pred_begin();
+  auto *PredBB = PredMBB->getBasicBlock();
+
----------------
majnemer wrote:
> Can't `getBasicBlock` fail?  IIRC, `MachineBasicBlock`s aren't obligated to map back to a `BasicBlock`.
I think the failure mode is to return `nullptr`, which should be caught by the check below.


http://reviews.llvm.org/D14632





More information about the llvm-commits mailing list