Add support for vectors of pointers.
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineCalls.cpp
index 81dad7e022e1eb83fbcc4cce5f749d845eb26f86..27c7c54a9c84e8186a344e53c91e829e2f10ce3c 100644 (file)
@@ -265,6 +265,8 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
       // Get the current byte offset into the thing. Use the original
       // operand in case we're looking through a bitcast.
       SmallVector<Value*, 8> Ops(GEP->idx_begin(), GEP->idx_end());
+      if (!GEP->getPointerOperandType()->isPointerTy())
+        return 0;
       Offset = TD->getIndexedOffset(GEP->getPointerOperandType(), Ops);
 
       Op1 = GEP->getPointerOperand()->stripPointerCasts();