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 | 3c7b95d9aaaa06a856aa08a6ebce23d4825b15d9 (patch) | |
tree | a30733627e9a4a930f178eccb2381da6bd0d6828 | |
parent | aa5e5fd2f43f3b66565108bb7182d5575d9fe3db (diff) | |
download | bcm5719-llvm-3c7b95d9aaaa06a856aa08a6ebce23d4825b15d9.tar.gz bcm5719-llvm-3c7b95d9aaaa06a856aa08a6ebce23d4825b15d9.zip |
Simplify the ZIV tester to the max.
As suggested by Nick Lewycky.
llvm-svn: 78277
-rw-r--r-- | llvm/lib/Analysis/LoopDependenceAnalysis.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LoopDependenceAnalysis.cpp b/llvm/lib/Analysis/LoopDependenceAnalysis.cpp index 10a6a8eb06f..eb8ea0ebdb0 100644 --- a/llvm/lib/Analysis/LoopDependenceAnalysis.cpp +++ b/llvm/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 |