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

Kyle Butt via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 14:33:20 PDT 2016


iteratee added inline comments.

================
Comment at: lib/CodeGen/BranchFolding.cpp:969
@@ -966,1 +968,3 @@
     MachineBasicBlock *PredBB = &*std::prev(I);
+    if (PredBB && !PredBB->isSuccessor(IBB))
+      PredBB = nullptr;
----------------
iteratee wrote:
> No, there is no test case that changes, and nothing in the test suite changes hashes.
> 
> However, the comments documenting the function disagree with you. See the comments on lines 796-797. The fact that nothing bad has happened so far isn't a good argument for not fixing the code to match the assumptions given in the comments.
I need to get this in, so if you are set against this check, I can pull it out of this patch and worry about it later.


http://reviews.llvm.org/D20379





More information about the llvm-commits mailing list