LoopVectorize: Use variable instead of repeated function call
No functionality change intended. llvm-svn: 181666
This commit is contained in:
@@ -2389,10 +2389,11 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
|
|||||||
++it) {
|
++it) {
|
||||||
|
|
||||||
if (PHINode *Phi = dyn_cast<PHINode>(it)) {
|
if (PHINode *Phi = dyn_cast<PHINode>(it)) {
|
||||||
|
Type *PhiTy = Phi->getType();
|
||||||
// Check that this PHI type is allowed.
|
// Check that this PHI type is allowed.
|
||||||
if (!Phi->getType()->isIntegerTy() &&
|
if (!PhiTy->isIntegerTy() &&
|
||||||
!Phi->getType()->isFloatingPointTy() &&
|
!PhiTy->isFloatingPointTy() &&
|
||||||
!Phi->getType()->isPointerTy()) {
|
!PhiTy->isPointerTy()) {
|
||||||
DEBUG(dbgs() << "LV: Found an non-int non-pointer PHI.\n");
|
DEBUG(dbgs() << "LV: Found an non-int non-pointer PHI.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user