From 3b43b23304976ae1ff7c97e8d799d271e5a8cfc6 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 13 Mar 2015 21:03:30 +0000 Subject: [PATCH] Simplify expression git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232214 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Instructions.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/llvm/IR/Instructions.h b/include/llvm/IR/Instructions.h index a737e563407..1ae17578506 100644 --- a/include/llvm/IR/Instructions.h +++ b/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.