[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.
This commit is contained in:
Jon Roelofs 2020-07-27 13:37:35 -06:00
parent 536baa11cf
commit 6dadf7cb65
1 changed files with 5 additions and 5 deletions

View File

@ -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 {