forked from OSchip/llvm-project
parent
a18228a95f
commit
9694ab8ffa
|
|
@ -1186,14 +1186,13 @@ bool LoopVectorizationLegality::canVectorizeMemory(BasicBlock &BB) {
|
|||
/// marked with the NoAlias attribute.
|
||||
bool LoopVectorizationLegality::isIdentifiedSafeObject(Value* Val) {
|
||||
assert(Val && "Invalid value");
|
||||
if (dyn_cast<GlobalValue>(Val))
|
||||
if (isa<GlobalValue>(Val))
|
||||
return true;
|
||||
if (dyn_cast<AllocaInst>(Val))
|
||||
if (isa<AllocaInst>(Val))
|
||||
return true;
|
||||
Argument *A = dyn_cast<Argument>(Val);
|
||||
if (!A)
|
||||
return false;
|
||||
if (Argument *A = dyn_cast<Argument>(Val))
|
||||
return A->hasNoAliasAttr();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LoopVectorizationLegality::AddReductionVar(PHINode *Phi,
|
||||
|
|
|
|||
Loading…
Reference in New Issue