[PATCH] D20379: Codegen: Fix broken assumption in Tail Merge.
Haicheng Wu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 10 11:48:10 PDT 2016
haicheng added a comment.
I checked the modifications to the broken test cases.
I think you still break v8_IT_5.ll and licm-dominance.ll. What is your plan about these two?
Your modifications to missinglabel.ll and eh.ll are reasonable.
Your patch causes unnecessary branches in thumb2-cbnz.ll and br-fold.ll, but I think it is not your fault. I will try to create a patch to merge empty blocks so that your change would not break these two.
================
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:
> That to me implies that it will be null if there is no such predecessor.
> I need to know if you want me to remove it from this patch.
Please remove it from this patch. I think it is not closely related to the rest of the change.
I understand your concern and do not have strong opinion about it. If you insist, it might be better to do it in your next patch.
http://reviews.llvm.org/D20379
More information about the llvm-commits
mailing list