+ // If the instruction is actually a subtract, we are guaranteed to only have
+ // one index (from code above), so we just need to negate the pointer index
+ // long value.
+ if (I->getOpcode() == Instruction::Sub) {
+ Instruction *Neg = BinaryOperator::createNeg(GEP->getOperand(1),
+ GEP->getOperand(1)->getName()+".neg", I);
+ GEP->setOperand(1, Neg);
+ }
+