[llvm] 6dadf7c - [llvm][examples][SimplifyCFG] Fix pass's IR changed reporting
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 27 12:40:11 PDT 2020
Author: Jon Roelofs
Date: 2020-07-27T13:39:58-06:00
New Revision: 6dadf7cb654ce131c1d05b3add8e30344b6d22be
URL: https://github.com/llvm/llvm-project/commit/6dadf7cb654ce131c1d05b3add8e30344b6d22be
DIFF: https://github.com/llvm/llvm-project/commit/6dadf7cb654ce131c1d05b3add8e30344b6d22be.diff
LOG: [llvm][examples][SimplifyCFG] Fix pass's IR changed reporting
... under the EXPENSIVE_CHECKS build, this fails the assert in the LegacyPM
that verifies whether a pass really did leave the IR alone when it reports no
changes back from its return status.
Added:
Modified:
llvm/examples/IRTransforms/SimplifyCFG.cpp
Removed:
################################################################################
diff --git a/llvm/examples/IRTransforms/SimplifyCFG.cpp b/llvm/examples/IRTransforms/SimplifyCFG.cpp
index 10658c9f0959..82368d749421 100644
--- a/llvm/examples/IRTransforms/SimplifyCFG.cpp
+++ b/llvm/examples/IRTransforms/SimplifyCFG.cpp
@@ -354,18 +354,18 @@ static bool mergeIntoSinglePredecessor_v2(Function &F, DominatorTree &DT) {
}
static bool doSimplify_v1(Function &F) {
- return eliminateCondBranches_v1(F) & mergeIntoSinglePredecessor_v1(F) &
+ return eliminateCondBranches_v1(F) | mergeIntoSinglePredecessor_v1(F) |
removeDeadBlocks_v1(F);
}
static bool doSimplify_v2(Function &F, DominatorTree &DT) {
- return eliminateCondBranches_v2(F, DT) &
- mergeIntoSinglePredecessor_v2(F, DT) & removeDeadBlocks_v2(F, DT);
+ return eliminateCondBranches_v2(F, DT) |
+ mergeIntoSinglePredecessor_v2(F, DT) | removeDeadBlocks_v2(F, DT);
}
static bool doSimplify_v3(Function &F, DominatorTree &DT) {
- return eliminateCondBranches_v3(F, DT) &
- mergeIntoSinglePredecessor_v2(F, DT) & removeDeadBlocks_v2(F, DT);
+ return eliminateCondBranches_v3(F, DT) |
+ mergeIntoSinglePredecessor_v2(F, DT) | removeDeadBlocks_v2(F, DT);
}
namespace {
More information about the llvm-commits
mailing list