[llvm] r232214 - Simplify expression
David Blaikie
dblaikie at gmail.com
Fri Mar 13 14:03:31 PDT 2015
Author: dblaikie
Date: Fri Mar 13 16:03:30 2015
New Revision: 232214
URL: http://llvm.org/viewvc/llvm-project?rev=232214&view=rev
Log:
Simplify expression
Modified:
llvm/trunk/include/llvm/IR/Instructions.h
Modified: llvm/trunk/include/llvm/IR/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Instructions.h?rev=232214&r1=232213&r2=232214&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Instructions.h (original)
+++ llvm/trunk/include/llvm/IR/Instructions.h Fri Mar 13 16:03:30 2015
@@ -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.
More information about the llvm-commits
mailing list