[llvm] 5c8c24d - Revert "[NFCI][SimplifyCFG] simplifyCondBranch(): assert that branch is non-tautological"
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 13 03:16:50 PDT 2021
Author: Roman Lebedev
Date: 2021-08-13T13:16:22+03:00
New Revision: 5c8c24d2decae4a76047777271d60411fc3316eb
URL: https://github.com/llvm/llvm-project/commit/5c8c24d2decae4a76047777271d60411fc3316eb
DIFF: https://github.com/llvm/llvm-project/commit/5c8c24d2decae4a76047777271d60411fc3316eb.diff
LOG: Revert "[NFCI][SimplifyCFG] simplifyCondBranch(): assert that branch is non-tautological"
The assertion does not hold on a provided reproducer.
Reverting until after fixing the problem.
This reverts commit f30a7dff8a5b32919951dcbf92e4a9d56c4679ff.
Added:
Modified:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 5cd7cd71d264..482316c6111f 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -6394,11 +6394,6 @@ static BasicBlock *allPredecessorsComeFromSameSource(BasicBlock *BB) {
}
bool SimplifyCFGOpt::simplifyCondBranch(BranchInst *BI, IRBuilder<> &Builder) {
- assert(
- !isa<ConstantInt>(BI->getCondition()) &&
- BI->getSuccessor(0) != BI->getSuccessor(1) &&
- "Tautological conditional branch should have been eliminated already.");
-
BasicBlock *BB = BI->getParent();
if (!Options.SimplifyCondBranch)
return false;
More information about the llvm-commits
mailing list