Simplify code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakub Staszak 2012-10-21 15:29:19 +00:00
parent 5c6e9ae14e
commit b75209cb66

View File

@ -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;
return A->hasNoAliasAttr();
if (Argument *A = dyn_cast<Argument>(Val))
return A->hasNoAliasAttr();
return false;
}
bool LoopVectorizationLegality::AddReductionVar(PHINode *Phi,