diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2012-10-21 15:29:19 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2012-10-21 15:29:19 +0000 |
commit | b75209cb66ab5d7a155af3cffe0e552e69820e2c (patch) | |
tree | 47b55f560f8398b7c5159e173d8c8dca296f44b7 /lib/Transforms | |
parent | 5c6e9ae14e012bfe1fdf0e19957922d3c4d85670 (diff) |
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Vectorize/LoopVectorize.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 1b6011bd1a..7efb003b27 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -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, |