Offset += TD.getStructLayout(ST)->getElementOffset(CI->getZExtValue());
} else {
const SequentialType *SQT = cast<SequentialType>(*GTI);
- Offset += TD.getABITypeSize(SQT->getElementType())*CI->getSExtValue();
+ Offset += TD.getTypePaddedSize(SQT->getElementType())*CI->getSExtValue();
}
}
return true;
/// SymbolicallyEvaluateBinop - One of Op0/Op1 is a constant expression.
-/// Attempt to symbolically evaluate the result of a binary operator merging
+/// Attempt to symbolically evaluate the result of a binary operator merging
/// these together. If target data info is available, it is provided as TD,
/// otherwise TD is null.
static Constant *SymbolicallyEvaluateBinop(unsigned Opc, Constant *Op0,
}
}
- // TODO: Fold icmp setne/seteq as well.
return 0;
}