forked from OSchip/llvm-project
Simplify the ZIV tester to the max.
As suggested by Nick Lewycky. llvm-svn: 78277
This commit is contained in:
parent
aa5e5fd2f4
commit
3c7b95d9aa
|
@ -144,9 +144,8 @@ LoopDependenceAnalysis::DependenceResult
|
|||
LoopDependenceAnalysis::analyseZIV(const SCEV *A,
|
||||
const SCEV *B,
|
||||
Subscript *S) const {
|
||||
assert(isZIVPair(A, B));
|
||||
const SCEV *diff = SE->getMinusSCEV(A, B);
|
||||
return diff->isZero() ? Dependent : Independent;
|
||||
assert(isZIVPair(A, B) && "Attempted to ZIV-test non-ZIV SCEVs!");
|
||||
return A == B ? Dependent : Independent;
|
||||
}
|
||||
|
||||
LoopDependenceAnalysis::DependenceResult
|
||||
|
|
Loading…
Reference in New Issue