Skip to content

Commit f81e32c

Browse files
sebpopMeinersbur
andauthored
simplify logic for similar code-paths
Co-authored-by: Michael Kruse <[email protected]>
1 parent 61ca542 commit f81e32c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

llvm/lib/Analysis/DependenceAnalysis.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3670,13 +3670,7 @@ static bool checkOffsets(ScalarEvolution *SE, const SCEV *V, const SCEV *&Param,
36703670
return checkParamsMultipleOfSize(V, Param);
36713671

36723672
// Expressions like "n + 1".
3673-
if (isa<SCEVAddExpr>(V))
3674-
return !SCEVExprContains(V, [](const SCEV *S) {
3675-
return isa<SCEVUnknown>(S);
3676-
}) || checkParamsMultipleOfSize(V, Param);
3677-
3678-
// Expressions like "n * 2".
3679-
if (isa<SCEVMulExpr>(V))
3673+
if (isa<SCEVAddExpr>(V) || isa<SCEVMulExpr>(V))
36803674
return !SCEVExprContains(V, [](const SCEV *S) {
36813675
return isa<SCEVUnknown>(S);
36823676
}) || checkParamsMultipleOfSize(V, Param);

0 commit comments

Comments
 (0)