From b75209cb66ab5d7a155af3cffe0e552e69820e2c Mon Sep 17 00:00:00 2001 From: Jakub Staszak Date: Sun, 21 Oct 2012 15:29:19 +0000 Subject: [PATCH] Simplify code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166392 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Vectorize/LoopVectorize.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 1b6011bd1a9..7efb003b276 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(Val)) + if (isa(Val)) return true; - if (dyn_cast(Val)) + if (isa(Val)) return true; - Argument *A = dyn_cast(Val); - if (!A) - return false; - return A->hasNoAliasAttr(); + if (Argument *A = dyn_cast(Val)) + return A->hasNoAliasAttr(); + return false; } bool LoopVectorizationLegality::AddReductionVar(PHINode *Phi,