summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-05-15 22:38:14 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-05-15 22:38:14 +0000
commit88e7fddc8c8a9e3ef095db8d342fc27e3e23ac64 (patch)
tree9fea38db66d452b8c42161a542c6f46dfc7d2e9e /llvm/lib
parent84ee6c40a82b6e79d3967f63726d54eec76018bb (diff)
downloadbcm5719-llvm-88e7fddc8c8a9e3ef095db8d342fc27e3e23ac64.tar.gz
bcm5719-llvm-88e7fddc8c8a9e3ef095db8d342fc27e3e23ac64.zip
LoopVectorize: Move call of canHoistAllLoads to canVectorizeWithIfConvert
We only want to check this once, not for every conditional block in the loop. No functionality change (except that we don't perform a check redudantly anymore). llvm-svn: 181942
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 58a1a746555..88e76dabfb5 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2432,6 +2432,10 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() {
return false;
}
+ // Check that we can actually speculate the hoistable loads.
+ if (!LoadSpeculation.canHoistAllLoads())
+ return false;
+
// We can if-convert this loop.
return true;
}
@@ -3369,10 +3373,6 @@ bool LoopVectorizationLegality::blockCanBePredicated(BasicBlock *BB) {
}
}
- // Check that we can actually speculate the hoistable loads.
- if (!LoadSpeculation.canHoistAllLoads())
- return false;
-
return true;
}
OpenPOWER on IntegriCloud