forked from OSchip/llvm-project
parent
875e463b19
commit
1d666099be
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue