summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/IR/Instructions.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h
index a737e563407..1ae17578506 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<SequentialType>(getPointerOperandType());
- if (VectorType *VTy = dyn_cast<VectorType>(Ty))
- Ty = cast<SequentialType>(VTy->getElementType());
- return Ty->getElementType();
+ return cast<SequentialType>(getPointerOperandType()->getScalarType())
+ ->getElementType();
}
/// \brief Returns the address space of this instruction's pointer type.
OpenPOWER on IntegriCloud