summaryrefslogtreecommitdiff
path: root/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
commit0aad08adfda3ff7c4f9c453ba821057b5436c4ef (patch)
tree2a255c8921cab1e9a9803ea58e0d7f7ffa8807ff /lib
parent377b2270124f6f566c0f291bcb02f7755b642c2c (diff)
downloadllvm-0aad08adfda3ff7c4f9c453ba821057b5436c4ef.tar.gz
llvm-0aad08adfda3ff7c4f9c453ba821057b5436c4ef.tar.bz2
llvm-0aad08adfda3ff7c4f9c453ba821057b5436c4ef.tar.xz
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 58a1a74655..88e76dabfb 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/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;
}