Skip to content

Commit 0837913

Browse files
sebpopMeinersbur
andauthored
simplify logic with a single return
Co-authored-by: Michael Kruse <[email protected]>
1 parent 535b812 commit 0837913

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Analysis/DependenceAnalysis.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3577,9 +3577,8 @@ bool DependenceInfo::invalidate(Function &F, const PreservedAnalyses &PA,
35773577
static bool checkOffsets(ScalarEvolution *SE, const SCEV *V, const SCEV *&Param,
35783578
uint64_t EltSize) {
35793579
if (auto *AddRec = dyn_cast<SCEVAddRecExpr>(V)) {
3580-
if (!checkOffsets(SE, AddRec->getStart(), Param, EltSize))
3581-
return false;
3582-
return checkOffsets(SE, AddRec->getStepRecurrence(*SE), Param, EltSize);
3580+
return checkOffsets(SE, AddRec->getStart(), Param, EltSize) &&
3581+
checkOffsets(SE, AddRec->getStepRecurrence(*SE), Param, EltSize);
35833582
}
35843583
if (auto *Cst = dyn_cast<SCEVConstant>(V)) {
35853584
APInt C = Cst->getAPInt();

0 commit comments

Comments
 (0)