Make the SLP store-merger less paranoid about function calls. We check for function calls when we check if it is safe to sink instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nadav Rotem
2013-04-10 19:41:36 +00:00
parent 20cd5e6862
commit 4b924d3a61
2 changed files with 40 additions and 4 deletions

View File

@ -65,10 +65,6 @@ struct SLPVectorizer : public BasicBlockPass {
/// if we flush the chain creation every time we run into a memory barrier.
bool CollectStores(BasicBlock *BB, BoUpSLP &R) {
for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; ++it) {
// Can't vectorize instructions with side effects.
if (it->mayThrow())
return false;
StoreInst *SI = dyn_cast<StoreInst>(it);
if (!SI)
continue;