Code cleanup following CR by Duncan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nadav Rotem committed 2012-02-28 14:13:19 +00:00
1 parent 21ef70ed4f
commit 1c239200e4
1 file changed
+3 -5
@@ -3077,11 +3077,9 @@ void SelectionDAGBuilder::visitExtractValue(const ExtractValueInst &I) {
void SelectionDAGBuilder::visitGetElementPtr(const User &I) {
SDValue N = getValue(I.getOperand(0));
Type *Ty = I.getOperand(0)->getType();
// If this is a vector of pointers, use the size of the
// vector element and not the size of the pointer.
if (VectorType *VTy = dyn_cast<VectorType>(Ty))
Ty = VTy->getElementType();
// Note that the pointer operand may be a vector of pointers. Take the scalar
// element which holds a pointer.
Type *Ty = I.getOperand(0)->getType()->getScalarType();
for (GetElementPtrInst::const_op_iterator OI = I.op_begin()+1, E = I.op_end();
OI != E; ++OI) {