mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
LoopVectorizer: When checking for vectorizable types, also check
the StoreInst operands. PR14705. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171023 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1464,13 +1464,20 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We do not re-vectorize vectors.
|
||||
// Check that the instruction return type is vectorizable.
|
||||
if (!VectorType::isValidElementType(it->getType()) &&
|
||||
!it->getType()->isVoidTy()) {
|
||||
DEBUG(dbgs() << "LV: Found unvectorizable type." << "\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the stored type is vectorizable.
|
||||
if (StoreInst *ST = dyn_cast<StoreInst>(it)) {
|
||||
Type *T = ST->getValueOperand()->getType();
|
||||
if (!VectorType::isValidElementType(T))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Reduction instructions are allowed to have exit users.
|
||||
// All other instructions must not have external users.
|
||||
if (!AllowedExit.count(it))
|
||||
|
Reference in New Issue
Block a user