Lines Matching defs:Scale
365 /// Represents zext(sext(trunc(V))) * Scale + Offset.
368 APInt Scale;
374 LinearExpression(const CastedValue &Val, const APInt &Scale,
376 : Val(Val), Scale(Scale), Offset(Offset), IsNSW(IsNSW) {}
380 Scale = APInt(BitWidth, 1);
388 return LinearExpression(Val, Scale * Other, Offset * Other, NSW);
467 E.Scale <<= RHS.getLimitedValue();
504 // ZExt(SExt(Trunc(V, TruncBits), SExtBits), ZExtBits) * Scale.
507 APInt Scale;
516 /// negate the Scale, to avoid losing the NSW flag: X - INT_MIN*1 may be
522 return Scale == -Other.Scale;
523 return Scale == Other.Scale;
535 << ", scale=" << Scale
702 // Scale by the type size.
706 APInt Scale = LE.Scale.sext(MaxIndexSize);
716 Scale += Decomposed.VarIndices[i].Scale;
725 adjustToIndexSize(Scale, IndexSize);
727 if (!!Scale) {
728 VariableGEPIndex Entry = {LE.Val, Scale, CxtI, LE.IsNSW,
1214 APInt Scale =
1215 ScalableVar.IsNegated ? -ScalableVar.Scale : ScalableVar.Scale;
1216 LocationSize VLeftSize = Scale.isNegative() ? V1Size : V2Size;
1222 ConstantRange CR = getVScaleRange(&F, Scale.getBitWidth());
1223 (void)CR.getSignedMax().smul_ov(Scale, Overflows);
1231 Scale.abs().uge(VLeftSize.getValue().getKnownMinValue()))
1248 const APInt &Scale = Index.Scale;
1249 APInt ScaleForGCD = Scale;
1252 APInt::getOneBitSet(Scale.getBitWidth(), Scale.countr_zero());
1268 assert(OffsetRange.getBitWidth() == Scale.getBitWidth() &&
1271 CR = CR.smul_sat(ConstantRange(Scale));
1273 CR = CR.smul_fast(ConstantRange(Scale));
1308 // VarIndex = Scale*V.
1312 // Check if abs(V*Scale) >= abs(Scale) holds in the presence of
1319 // If Scale is small enough so that abs(V*Scale) >= abs(Scale) holds.
1325 return Var.Scale.ule(
1326 APInt::getMaxValue(MaxScaleValueBW).zext(Var.Scale.getBitWidth()));
1328 // Refine MinAbsVarIndex, if abs(Scale*V) >= abs(Scale) holds in the
1331 // If V != 0 then abs(VarIndex) >= abs(Scale).
1332 MinAbsVarIndex = Var.Scale.abs();
1336 // VarIndex = Scale*V0 + (-Scale)*V1.
1337 // If V0 != V1 then abs(VarIndex) >= abs(Scale).
1346 MinAbsVarIndex = Var0.Scale.abs();
1854 Dest.Scale = -Dest.Scale;
1859 // If we found it, subtract off Scale V's from the entry in Dest. If it
1861 if (Dest.Scale != Src.Scale) {
1862 Dest.Scale -= Src.Scale;
1873 VariableGEPIndex Entry = {Src.Val, Src.Scale, Src.CxtI, Src.IsNSW,
1908 if (E0.Scale != E1.Scale || !E0.Val.hasSameCastsAs(E1.Val) ||
1922 MinDiff.zextOrTrunc(Var0.Scale.getBitWidth()) * Var0.Scale.abs();