From 19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 16 Feb 2010 11:11:14 +0000 Subject: There are two ways of checking for a given type, for example isa(T) and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344 --- llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 20fda1a2718..a58124d7032 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -78,7 +78,7 @@ static std::vector getShuffleMask(const ShuffleVectorInst *SVI) { /// value is already around as a register, for example if it were inserted then /// extracted from the vector. static Value *FindScalarElement(Value *V, unsigned EltNo) { - assert(isa(V->getType()) && "Not looking at a vector?"); + assert(V->getType()->isVectorTy() && "Not looking at a vector?"); const VectorType *PTy = cast(V->getType()); unsigned Width = PTy->getNumElements(); if (EltNo >= Width) // Out of range access. @@ -322,7 +322,7 @@ static bool CollectSingleShuffleElements(Value *V, Value *LHS, Value *RHS, /// that computes V and the LHS value of the shuffle. static Value *CollectShuffleElements(Value *V, std::vector &Mask, Value *&RHS) { - assert(isa(V->getType()) && + assert(V->getType()->isVectorTy() && (RHS == 0 || V->getType() == RHS->getType()) && "Invalid shuffle!"); unsigned NumElts = cast(V->getType())->getNumElements(); -- cgit v1.2.3