// Transform trunc(lshr (sext A), Cst) to ashr A, Cst to eliminate type
// conversion.
// It works because bits coming from sign extension have the same value as
- // sign bit of the original value; performing ashr instead of lshr
+ // the sign bit of the original value; performing ashr instead of lshr
// generates bits of the same value as the sign bit.
if (Src->hasOneUse() &&
match(Src, m_LShr(m_SExt(m_Value(A)), m_ConstantInt(Cst))) &&
const unsigned ASize = A->getType()->getPrimitiveSizeInBits();
// This optimization can be only performed when zero bits generated by
// the original lshr aren't pulled into the value after truncation, so we
- // can only shift by values smaller then the size of destination type (in
+ // can only shift by values smaller than the size of destination type (in
// bits).
if (Cst->getValue().ult(ASize)) {
Value *Shift = Builder->CreateAShr(A, Cst->getZExtValue());