summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslNodeBuilder.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-04-08 10:25:58 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-04-08 10:25:58 +0000
commit7b8110358912c296a52fed7fdb50f883a74414e0 (patch)
treec67c7670cfccaa66e1cf48dea96f01d80a0bc9f2 /polly/lib/CodeGen/IslNodeBuilder.cpp
parent477e5d8d3160367e03edc1343900e87267b22fac (diff)
downloadbcm5719-llvm-7b8110358912c296a52fed7fdb50f883a74414e0.tar.gz
bcm5719-llvm-7b8110358912c296a52fed7fdb50f883a74414e0.zip
[FIX] Look through div & srem instructions in SCEVs
The findValues() function did not look through div & srem instructions that were part of the argument SCEV. However, in different other places we already look through it. This mismatch caused us to preload values in the wrong order. llvm-svn: 265775
Diffstat (limited to 'polly/lib/CodeGen/IslNodeBuilder.cpp')
-rw-r--r--polly/lib/CodeGen/IslNodeBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp
index 3068de4915b..b21136e5a4f 100644
--- a/polly/lib/CodeGen/IslNodeBuilder.cpp
+++ b/polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -304,7 +304,7 @@ void IslNodeBuilder::getReferencesInSubtree(__isl_keep isl_ast_node *For,
addReferencesFromStmtUnionSet(Schedule, References);
for (const SCEV *Expr : SCEVs) {
- findValues(Expr, Values);
+ findValues(Expr, SE, Values);
findLoops(Expr, Loops);
}
@@ -852,7 +852,7 @@ bool IslNodeBuilder::materializeValue(isl_id *Id) {
// check if any value refered to in ParamSCEV is an invariant load
// and if so make sure its equivalence class is preloaded.
SetVector<Value *> Values;
- findValues(ParamSCEV, Values);
+ findValues(ParamSCEV, SE, Values);
for (auto *Val : Values) {
// Check if the value is an instruction in a dead block within the SCoP
OpenPOWER on IntegriCloud