aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/LoopDependenceAnalysis.cpp
diff options
context:
space:
mode:
authorAndreas Bolka <a@bolka.at>2009-08-06 03:10:33 +0000
committerAndreas Bolka <a@bolka.at>2009-08-06 03:10:33 +0000
commit6151f672854f59743aeb34019a6926259dec9933 (patch)
tree1aa049e816b81ab5b766d491f60d7ab43dcf3eb9 /lib/Analysis/LoopDependenceAnalysis.cpp
parente90acceb505662b1e3ba641b21b8079d331594f0 (diff)
Simplify the ZIV tester to the max.
As suggested by Nick Lewycky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopDependenceAnalysis.cpp')
-rw-r--r--lib/Analysis/LoopDependenceAnalysis.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/LoopDependenceAnalysis.cpp b/lib/Analysis/LoopDependenceAnalysis.cpp
index 10a6a8eb06..eb8ea0ebdb 100644
--- a/lib/Analysis/LoopDependenceAnalysis.cpp
+++ b/lib/Analysis/LoopDependenceAnalysis.cpp
@@ -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