diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-04-20 10:36:17 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-04-20 10:36:17 +0000 |
commit | 519b2e30870a27846b07cc30f48c957ce86ba3f1 (patch) | |
tree | 9d72499afe21b73e78d160799ac2b371488506e3 /llvm/lib | |
parent | 4600bcc337f7617ab8152856496a7ecad956858e (diff) | |
download | bcm5719-llvm-519b2e30870a27846b07cc30f48c957ce86ba3f1.tar.gz bcm5719-llvm-519b2e30870a27846b07cc30f48c957ce86ba3f1.zip |
VecUtils: Clean up uses of dyn_cast.
llvm-svn: 179936
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/VecUtils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VecUtils.cpp b/llvm/lib/Transforms/Vectorize/VecUtils.cpp index ad9ccf2bbc2..03dd5c73266 100644 --- a/llvm/lib/Transforms/Vectorize/VecUtils.cpp +++ b/llvm/lib/Transforms/Vectorize/VecUtils.cpp @@ -557,7 +557,7 @@ Value *BoUpSLP::vectorizeTree_rec(ArrayRef<Value *> VL, int VF) { bool AllConst = true; bool AllSameScalar = true; for (unsigned i = 0, e = VF; i < e; ++i) { - AllConst &= !!dyn_cast<Constant>(VL[i]); + AllConst &= isa<Constant>(VL[i]); AllSameScalar &= (VL[0] == VL[i]); // The instruction must be in the same BB, and it must be vectorizable. Instruction *I = dyn_cast<Instruction>(VL[i]); @@ -609,13 +609,13 @@ Value *BoUpSLP::vectorizeTree_rec(ArrayRef<Value *> VL, int VF) { Value *RHS = vectorizeTree_rec(RHSVL, VF); Value *LHS = vectorizeTree_rec(LHSVL, VF); IRBuilder<> Builder(GetLastInstr(VL, VF)); - BinaryOperator *BinOp = dyn_cast<BinaryOperator>(VL0); + BinaryOperator *BinOp = cast<BinaryOperator>(VL0); Value *V = Builder.CreateBinOp(BinOp->getOpcode(), RHS,LHS); VectorizedValues[VL0] = V; return V; } case Instruction::Load: { - LoadInst *LI = dyn_cast<LoadInst>(VL0); + LoadInst *LI = cast<LoadInst>(VL0); unsigned Alignment = LI->getAlignment(); // Check if all of the loads are consecutive. @@ -632,7 +632,7 @@ Value *BoUpSLP::vectorizeTree_rec(ArrayRef<Value *> VL, int VF) { return LI; } case Instruction::Store: { - StoreInst *SI = dyn_cast<StoreInst>(VL0); + StoreInst *SI = cast<StoreInst>(VL0); unsigned Alignment = SI->getAlignment(); ValueList ValueOp; |