diff options
author | Andreas Bolka <a@bolka.at> | 2009-08-06 03:10:33 +0000 |
---|---|---|
committer | Andreas Bolka <a@bolka.at> | 2009-08-06 03:10:33 +0000 |
commit | 17722c4cd57aa343f6c8d0ca88d41080d74fdad0 (patch) | |
tree | 1aa049e816b81ab5b766d491f60d7ab43dcf3eb9 /lib/Analysis/LoopDependenceAnalysis.cpp | |
parent | be499b18f2a75fb2d241f5848d0a3a6e2006946d (diff) | |
download | external_llvm-17722c4cd57aa343f6c8d0ca88d41080d74fdad0.zip external_llvm-17722c4cd57aa343f6c8d0ca88d41080d74fdad0.tar.gz external_llvm-17722c4cd57aa343f6c8d0ca88d41080d74fdad0.tar.bz2 |
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.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/LoopDependenceAnalysis.cpp b/lib/Analysis/LoopDependenceAnalysis.cpp index 10a6a8e..eb8ea0e 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 |