summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ScalarEvolutionExpander.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-10-25 21:35:56 +0000
committerAndrew Trick <atrick@apple.com>2013-10-25 21:35:56 +0000
commit4d4bbaf997c16f9e79503bd640306d784efd090e (patch)
treedce5058bb8c237bdf493aabc2ebf4af4e9e8fbbd /include/llvm/Analysis/ScalarEvolutionExpander.h
parent8aa8cea3e964796187f8682e502a8446b3ce02e1 (diff)
downloadllvm-4d4bbaf997c16f9e79503bd640306d784efd090e.tar.gz
llvm-4d4bbaf997c16f9e79503bd640306d784efd090e.tar.bz2
llvm-4d4bbaf997c16f9e79503bd640306d784efd090e.tar.xz
Fix SCEVExpander: don't try to expand quadratic recurrences outside a loop.
Partial fix for PR17459: wrong code at -O3 on x86_64-linux-gnu (affecting trunk and 3.3) When SCEV expands a recurrence outside of a loop it attempts to scale by the stride of the recurrence. Chained recurrences don't work that way. We could compute binomial coefficients, but would hve to guarantee that the chained AddRec's are in a perfectly reduced form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpander.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h
index 1e88bd5445..4433be000d 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -26,7 +26,7 @@ namespace llvm {
/// Return true if the given expression is safe to expand in the sense that
/// all materialized values are safe to speculate.
- bool isSafeToExpand(const SCEV *S);
+ bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE);
/// SCEVExpander - This class uses information about analyze scalars to
/// rewrite expressions in canonical form.