Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Trunc

134     const SCEVTruncateExpr *Trunc = cast<SCEVTruncateExpr>(this);
135 const SCEV *Op = Trunc->getOperand();
136 OS << "(trunc " << *Op->getType() << " " << *Op << " to "
137 << *Trunc->getType() << ")";
742 MultiplyFactor = MultiplyFactor.trunc(W);
813 // trunc(trunc(x)) --> trunc(x)
817 // trunc(sext(x)) --> sext(x) if widening or trunc(x) if narrowing
821 // trunc(zext(x)) --> zext(x) if widening or trunc(x) if narrowing
825 // trunc(x1+x2+...+xN) --> trunc(x1)+trunc(x2)+...+trunc(xN) if we can
840 // trunc(x1*x2*...*xN) --> trunc(x1)*trunc(x2)*...*trunc(xN) if we can
863 // As a special case, fold trunc(undef) to undef. We don't want to
906 // zext(trunc(x)) --> zext(x) or x or trunc(x)
1172 // sext(trunc(x)) --> sext(x) or x or trunc(x)
1526 // folded. eg., trunc(x) + m*trunc(n) --> trunc(x + trunc(m)*n)
1527 // if the contents of the resulting outer trunc fold to something simple.
1529 const SCEVTruncateExpr *Trunc = cast<SCEVTruncateExpr>(Ops[Idx]);
1530 Type *DstType = Trunc->getType();
1531 Type *SrcType = Trunc->getOperand()->getType();
3324 if (const SCEVTruncateExpr *Trunc = dyn_cast<SCEVTruncateExpr>(S)) {
3325 ConstantRange X = getUnsignedRange(Trunc->getOperand());
3326 return setUnsignedRange(Trunc,
3466 if (const SCEVTruncateExpr *Trunc = dyn_cast<SCEVTruncateExpr>(S)) {
3467 ConstantRange X = getSignedRange(Trunc->getOperand());
3468 return setSignedRange(Trunc,
3630 // use zext(trunc(x)) as the SCEV expression.
3719 APInt Trunc = CI->getValue().trunc(Z0TySize);
3720 if (Trunc.zext(getTypeSizeInBits(UTy)) == CI->getValue() &&
3721 Trunc.isSignBit())
3722 return getZeroExtendExpr(getAddExpr(Z0, getConstant(Trunc)),
3765 // For a two-shift sext-inreg, use sext(trunc(x)) as the SCEV expression.
3790 case Instruction::Trunc:
5170 return SE.getConstant(Result.trunc(BW));