From 84a2fe141ad65a0ba4cf8581edde820f4ca7388e Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 13 Mar 2015 21:03:30 +0000 Subject: [PATCH] Simplify expression llvm-svn: 232214 --- llvm/include/llvm/IR/Instructions.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index a737e56..1ae1757 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -846,10 +846,8 @@ public: } Type *getSourceElementType() const { - SequentialType *Ty = cast(getPointerOperandType()); - if (VectorType *VTy = dyn_cast(Ty)) - Ty = cast(VTy->getElementType()); - return Ty->getElementType(); + return cast(getPointerOperandType()->getScalarType()) + ->getElementType(); } /// \brief Returns the address space of this instruction's pointer type. -- 2.7.4