[PATCH] D20379: Codegen: Fix broken assumption in Tail Merge.

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 08:09:36 PDT 2016

haicheng added a comment.

Please see the inlined comment.

Comment at: lib/CodeGen/BranchFolding.cpp:1219
@@ -1214,3 +1218,3 @@
       // jump to a landing pad, and so can safely jump to the fallthrough?
-    } else {
+    } else if (MBB->isSuccessor(&*FallThrough)) {
       // Rewrite all predecessors of the old block to go to the fallthrough
I think we can enter here only if MBB is empty which means MBB does not have any branch.  In this case,  I think MBB has nowhere to go but fallthrough to FallThrough and this check is not necessary.


More information about the llvm-commits mailing list