[llvm-commits] [llvm] r113021 - /llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp
Dan Gohman
gohman at apple.com
Fri Sep 3 15:12:56 PDT 2010
Author: djg
Date: Fri Sep 3 17:12:56 2010
New Revision: 113021
URL: http://llvm.org/viewvc/llvm-project?rev=113021&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp?rev=113021&r1=113020&r2=113021&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Fri Sep 3 17:12:56 2010
@@ -108,7 +108,11 @@
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 @@
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) &&
More information about the llvm-commits
mailing list