[llvm-commits] [llvm] r166392 - /llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Jakub Staszak
kubastaszak at gmail.com
Sun Oct 21 08:29:19 PDT 2012
Author: kuba
Date: Sun Oct 21 10:29:19 2012
New Revision: 166392
URL: http://llvm.org/viewvc/llvm-project?rev=166392&view=rev
Log:
Simplify code. No functionality change.
Modified:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=166392&r1=166391&r2=166392&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Sun Oct 21 10:29:19 2012
@@ -1186,14 +1186,13 @@
/// 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,
More information about the llvm-commits
mailing list