summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-05-11 23:04:26 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-05-11 23:04:26 +0000
commit6bb539a643b385520c25f3b03199f68012b9c09b (patch)
tree700b7abd91c08ad5c9e19c93d6680d982d9bbd52 /lib/Transforms
parent8112d227017f70b870217b4c96841d1dc5e95277 (diff)
downloadllvm-6bb539a643b385520c25f3b03199f68012b9c09b.tar.gz
llvm-6bb539a643b385520c25f3b03199f68012b9c09b.tar.bz2
llvm-6bb539a643b385520c25f3b03199f68012b9c09b.tar.xz
LoopVectorize: Use variable instead of repeated function call
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 4422079c38..c9275b2371 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2389,10 +2389,11 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
++it) {
if (PHINode *Phi = dyn_cast<PHINode>(it)) {
+ Type *PhiTy = Phi->getType();
// Check that this PHI type is allowed.
- if (!Phi->getType()->isIntegerTy() &&
- !Phi->getType()->isFloatingPointTy() &&
- !Phi->getType()->isPointerTy()) {
+ if (!PhiTy->isIntegerTy() &&
+ !PhiTy->isFloatingPointTy() &&
+ !PhiTy->isPointerTy()) {
DEBUG(dbgs() << "LV: Found an non-int non-pointer PHI.\n");
return false;
}