diff options
author | Dan Gohman <gohman@apple.com> | 2010-09-03 22:12:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-09-03 22:12:56 +0000 |
commit | 47bec3cb57cec41da562c38b83a4ef50f2d7fc46 (patch) | |
tree | 3da3d1385b0244bf38e7d2cb34914e9a2ea50af3 | |
parent | 2bef20eda7bae7cdf98c2142e2637578ac23e9a3 (diff) | |
download | llvm-47bec3cb57cec41da562c38b83a4ef50f2d7fc46.zip llvm-47bec3cb57cec41da562c38b83a4ef50f2d7fc46.tar.gz llvm-47bec3cb57cec41da562c38b83a4ef50f2d7fc46.tar.bz2 |
Disable the asserts that check that normalization is perfectly
invertible. ScalarEvolution's folding routines don't always succeed
in canonicalizing equal expressions to a single canonical form, and
this can cause these asserts to fail, even though there's no actual
correctness problem. This fixes PR8066.
llvm-svn: 113021
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolutionNormalization.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp b/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp index 498387a..ac36cef 100644 --- a/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp @@ -108,7 +108,11 @@ const SCEV *llvm::TransformForPostIncUse(TransformKind Kind, Result = SE.getMinusSCEV(Result, TransformedStep); Loops.insert(L); } -#ifdef XDEBUG +#if 0 + // This assert is conceptually correct, but ScalarEvolution currently + // sometimes fails to canonicalize two equal SCEVs to exactly the same + // form. It's possibly a pessimization when this happens, but it isn't a + // correctness problem, so disable this assert for now. assert(S == TransformForPostIncUse(Denormalize, Result, User, OperandValToReplace, Loops, SE, DT) && @@ -122,7 +126,8 @@ const SCEV *llvm::TransformForPostIncUse(TransformKind Kind, User, OperandValToReplace, Loops, SE, DT); Result = SE.getMinusSCEV(Result, TransformedStep); } -#ifdef XDEBUG +#if 0 + // See the comment on the assert above. assert(S == TransformForPostIncUse(Denormalize, Result, User, OperandValToReplace, Loops, SE, DT) && |