Simplify expression

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2015-03-13 21:03:30 +00:00
parent fe795a5d20
commit 3b43b23304

View File

@ -846,10 +846,8 @@ public:
} }
Type *getSourceElementType() const { Type *getSourceElementType() const {
SequentialType *Ty = cast<SequentialType>(getPointerOperandType()); return cast<SequentialType>(getPointerOperandType()->getScalarType())
if (VectorType *VTy = dyn_cast<VectorType>(Ty)) ->getElementType();
Ty = cast<SequentialType>(VTy->getElementType());
return Ty->getElementType();
} }
/// \brief Returns the address space of this instruction's pointer type. /// \brief Returns the address space of this instruction's pointer type.