reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

include/llvm/ADT/APInt.h
   37 inline APInt operator-(APInt);

References

gen/lib/Target/AVR/AVRGenDAGISel.inc
 1774   return CurDAG->getTargetConstant(-N->getAPIntValue(), SDLoc(N), MVT::i16);
 1780   return CurDAG->getTargetConstant(-N->getAPIntValue(), SDLoc(N), MVT::i8);
include/llvm/ADT/APInt.h
 1814       return -(*this);
include/llvm/ADT/APSInt.h
  221     return APSInt(-static_cast<const APInt&>(*this), IsUnsigned);
include/llvm/IR/PatternMatch.h
  209       return -CIV == -Val;
  420   bool isValue(const APInt &C) { return (-C).isPowerOf2(); }
lib/Analysis/BasicAliasAnalysis.cpp
 1460         if ((-GEP1BaseOffset).ult(V1Size.getValue()))
 1971       VariableGEPIndex Entry = {V, ZExtBits, SExtBits, -Scale};
 1991       Var0.Scale != -Var1.Scale)
 2022   APInt MinDiff = V0Offset - V1Offset, Wrapped = -MinDiff;
lib/Analysis/CmpInstAnalysis.cpp
  110     Mask = -*C;
  131     Mask = -*C;
lib/Analysis/DependenceAnalysis.cpp
 1426   X = AM.slt(0) ? -A1 : A1;
 1427   Y = BM.slt(0) ? B1 : -B1;
 1548     TL = maxAPInt(TL, ceilingOfQuotient(-X, TMUL));
 1556     TU = minAPInt(TU, floorOfQuotient(-X, TMUL));
 1567     TL = maxAPInt(TL, ceilingOfQuotient(-Y, TMUL));
 1575     TU = minAPInt(TU, floorOfQuotient(-Y, TMUL));
 1956     TL = maxAPInt(TL, ceilingOfQuotient(-X, TMUL));
 1964     TU = minAPInt(TU, floorOfQuotient(-X, TMUL));
 1975     TL = maxAPInt(TL, ceilingOfQuotient(-Y, TMUL));
 1983     TU = minAPInt(TU, floorOfQuotient(-Y, TMUL));
lib/Analysis/InstructionSimplify.cpp
  978       Constant *NegDividendC = ConstantInt::get(Ty, -C->abs());
  994       Constant *NegDivisorC = ConstantInt::get(Ty, -C->abs());
lib/Analysis/ScalarEvolution.cpp
 1886             getAddExpr(getConstant(-D), SA, SCEV::FlagAnyWrap, Depth);
 2019             getAddExpr(getConstant(-D), SA, SCEV::FlagAnyWrap, Depth);
 8610       SO = APIntOps::SolveQuadraticEquationWrap(A, B, -Bound, BitWidth);
 8614     Optional<APInt> UO = APIntOps::SolveQuadraticEquationWrap(A, B, -Bound,
 9912         return -(C1->getAPInt());
 9992     FoundRHSLimit = -(*RDiff);
lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
   59         (-BSizeInt).uge(SE.getUnsignedRange(BA).getUnsignedMax()))
   73         (-ASizeInt).uge(SE.getUnsignedRange(AB).getUnsignedMax()))
lib/Analysis/ValueTracking.cpp
 5539         Lower = (-Upper) + 1;
 5558       Lower = (-Upper) + 1;
lib/CodeGen/CodeGenPrepare.cpp
 1325         match(B, m_APInt(CmpC)) && *AddC == -(*CmpC)) {
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
 3075           NVT, InL, MIRBuilder.buildConstant(AmtTy, -Amt + NVTBits));
 3093           NVT, InH, MIRBuilder.buildConstant(AmtTy, -Amt + NVTBits));
 3116           NVT, InH, MIRBuilder.buildConstant(AmtTy, -Amt + NVTBits));
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
 2229              (Max && Op && Max->getAPIntValue() == (-Op->getAPIntValue()));
 2888                        DAG.getConstant(-N1C->getAPIntValue(), DL, VT));
 3251                        DAG.getConstant(-N1C->getAPIntValue(), DL, VT));
 3393   if (N1IsConst && !N1IsOpaqueConst && (-ConstValue1).isPowerOf2()) {
 3394     unsigned Log2Val = (-ConstValue1).logBase2();
 3699     if ((-C->getAPIntValue()).isPowerOf2())
 4526           SDValue OffsetC = DAG.getConstant(-C1Val, DL, OpVT);
13703     if (X0 < 0) CNV = -CNV;
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
 1860                                    DAG.getConstant(-Amt + NVTBits, DL, ShTy)));
 1880                                    DAG.getConstant(-Amt + NVTBits, DL, ShTy)));
 1904                                  DAG.getConstant(-Amt + NVTBits, DL, ShTy)));
lib/CodeGen/SelectionDAG/TargetLowering.cpp
 3650           if ((-AndRHSC).isPowerOf2() && (AndRHSC & C1) == C1) {
lib/IR/ConstantRange.cpp
  208     return ConstantRange(-MaxValue, MinValue);
  246                          -Other.getUnsignedMax());
 1171     if (MinLHS.ugt(-MinAbsRHS))
 1174     APInt Lower = APIntOps::umax(MinLHS, -MaxAbsRHS + 1);
 1179   APInt Lower = APIntOps::umax(MinLHS, -MaxAbsRHS + 1);
 1346       Lo = APIntOps::umin(Lower, -Upper + 1);
 1360     return ConstantRange(-SMax, -SMin + 1);
 1360     return ConstantRange(-SMax, -SMin + 1);
 1364                        APIntOps::umax(-SMin, SMax) + 1);
lib/Support/APFloat.cpp
 2254     api = -api;
 2299     api = -api;
lib/Support/APInt.cpp
  787     return isNeg ? -APInt(width, mantissa >> (52 - exp)) :
  798   return isNeg ? -Tmp : Tmp;
  824   APInt Tmp(isNeg ? -(*this) : (*this));
 1234   if (d.isNegative()) mag.m = -mag.m;   // resulting magic number
 1650       return (-(*this)).udiv(-RHS);
 1650       return (-(*this)).udiv(-RHS);
 1651     return -((-(*this)).udiv(RHS));
 1651     return -((-(*this)).udiv(RHS));
 1654     return -(this->udiv(-RHS));
 1654     return -(this->udiv(-RHS));
 1661       return (-(*this)).udiv(-RHS);
 1662     return -((-(*this)).udiv(RHS));
 1662     return -((-(*this)).udiv(RHS));
 1665     return -(this->udiv(-RHS));
 1742       return -((-(*this)).urem(-RHS));
 1742       return -((-(*this)).urem(-RHS));
 1742       return -((-(*this)).urem(-RHS));
 1743     return -((-(*this)).urem(RHS));
 1743     return -((-(*this)).urem(RHS));
 1746     return this->urem(-RHS);
 1753       return -((-(*this)).urem(-RHS));
 1754     return -((-(*this)).urem(RHS));
 1897       APInt::udivrem(-LHS, -RHS, Quotient, Remainder);
 1897       APInt::udivrem(-LHS, -RHS, Quotient, Remainder);
 1899       APInt::udivrem(-LHS, RHS, Quotient, Remainder);
 1904     APInt::udivrem(LHS, -RHS, Quotient, Remainder);
 1916       APInt::udivrem(-LHS, -RHS, Quotient, R);
 1918       APInt::udivrem(-LHS, RHS, Quotient, R);
 2949       C -= -RoundUp(-C, R);      // C = C - RoundDown(C, R)
 2949       C -= -RoundUp(-C, R);      // C = C - RoundDown(C, R)
 2990     APInt::sdivrem(-B - (SQ+InexactSQ), TwoA, X, Rem);
 2992     APInt::sdivrem(-B + SQ, TwoA, X, Rem);
lib/Target/AArch64/AArch64FastISel.cpp
 4929       !(C.isPowerOf2() || (-C).isPowerOf2()))
lib/Target/AArch64/AArch64ISelLowering.cpp
 9343       !(Divisor.isPowerOf2() || (-Divisor).isPowerOf2()))
 9441     APInt CVNegPlus1 = -ConstValue + 1;
 9442     APInt CVNegMinus1 = -ConstValue - 1;
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  525       return TII->isInlineConstant(-C->getAPIntValue());
  528       return TII->isInlineConstant(-C->getValueAPF().bitcastToAPInt());
lib/Target/ARM/ARMTargetTransformInfo.cpp
  128     return std::min(getIntImmCost(Imm, Ty), getIntImmCost(-Imm, Ty));
lib/Target/ARM/MVETailPredication.cpp
  329       if (Const->getAPInt() != -VF->getValue())
lib/Target/AVR/AVRISelLowering.cpp
  726           DAG.getConstant(-C->getAPIntValue(), DL, C->getValueType(0)));
lib/Target/PowerPC/PPCISelLowering.cpp
14102       !(Divisor.isPowerOf2() || (-Divisor).isPowerOf2()))
14108   bool IsNegPow2 = (-Divisor).isPowerOf2();
14109   unsigned Lg2 = (IsNegPow2 ? -Divisor : Divisor).countTrailingZeros();
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
 1380     OperandV = -OperandV;
lib/Target/SystemZ/SystemZISelLowering.cpp
 3755       int64_t Value = (-Op2->getAPIntValue()).getSExtValue();
lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
  388           (CVal->getValue().isPowerOf2() || (-CVal->getValue()).isPowerOf2()))
lib/Target/X86/X86ISelDAGToDAG.cpp
  639             (-Imm->getAPIntValue()).isSignedIntN(8))
lib/Target/X86/X86ISelLowering.cpp
 4949          (1 - MulC).isPowerOf2() || (-(MulC + 1)).isPowerOf2();
20312   assert((Divisor.isPowerOf2() || (-Divisor).isPowerOf2()) &&
37128                     Cond->getAPIntValue() == (-Op->getAPIntValue() - 1));
37290     Addend = -Addend;
37300   if (Comparison == -Addend) {
37307         /*RHS*/ DAG.getConstant(-Addend, SDLoc(CmpRHS), CmpRHS.getValueType()),
38356                          DAG.getConstant(-SarConst, DL, CVT));
lib/Transforms/InstCombine/InstCombineAddSub.cpp
  840       C1->isNegative() && C1->sge(-C2->sext(C1->getBitWidth()))) {
  904   if (match(Op0, m_Or(m_Value(), m_APInt(C2))) && *C2 == -*C)
 1235       if (XorRHS->getValue() == -RHSVal) {
 1334       APInt AddRHSHighBits(~((AddRHSV & -AddRHSV)-1));
 1903       Constant *NegDivC = ConstantInt::get(I.getType(), -(*DivC));
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  850     Value *Add = Builder.CreateAdd(X, ConstantInt::get(X->getType(), -(*C1)));
 2235         APInt RRangeLow = -RAddC->getValue();
 2237         APInt LRangeLow = -LAddC->getValue();
lib/Transforms/InstCombine/InstCombineCompares.cpp
 1123                         ConstantInt::get(X->getType(), -C));
 1621     if (*XorC == -C && C.isPowerOf2())
 1625     if (*XorC == C && (-C).isPowerOf2())
 1852   if (Cmp.getOperand(1) == Y && (-C).isPowerOf2()) {
 2396       LoBound = -(RangeSize - 1);
 2408         APInt DivNeg = -RangeSize;
 2418       HiBound = -RangeSize;
 2609     return new ICmpInst(ICmpInst::ICMP_EQ, Builder.CreateAnd(X, -C),
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
 1102       Constant *NegC = ConstantInt::get(I.getType(), -(*Op1C));
 1412       I.setOperand(1, ConstantInt::get(I.getType(), -*Y));
lib/Transforms/InstCombine/InstCombineSelect.cpp
 2036   if (!(*MaxValue + 1).isPowerOf2() || -*MinValue != *MaxValue + 1)
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  543     if (StoreSize != Stride && StoreSize != -Stride)
  683     if (FirstStride == FirstStoreSize || -FirstStride == FirstStoreSize) {
  789     if (StoreSize != Stride && StoreSize != -Stride)
  792     bool NegStride = StoreSize == -Stride;
  837   if (SizeInBytes != Stride && SizeInBytes != -Stride)
  848   bool NegStride = SizeInBytes == -Stride;
 1063   bool NegStride = StoreSize == -Stride;
lib/Transforms/Scalar/Reassociate.cpp
 1068         if (FC1->getValue() == -FC2->getValue()) {
 1560           Factor = ConstantInt::get(CI->getContext(), -CI->getValue());
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  566     ConstantOffset = -ConstantOffset;
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  611   if ((-IndexOffset).isPowerOf2()) {
  614         ConstantInt::get(DeltaType, (-IndexOffset).logBase2());
tools/clang/lib/CodeGen/CGBuiltin.cpp
 7094         -cast<llvm::ConstantInt>(CacheLevel)->getValue() + 3);
tools/clang/lib/CodeGen/CGExpr.cpp
 1567       Min = -End;
tools/clang/lib/Sema/SemaExpr.cpp
11223     RightSideValue = -RightSideValue;
tools/lldb/source/Utility/Scalar.cpp
 2028       m_integer = -m_integer;
 2063     m_integer = -m_integer;
tools/polly/lib/Support/GICHelper.cpp
   71     A = -A;
tools/polly/unittests/Isl/IslTest.cpp
  264     EXPECT_EQ(500, (-APLargeNPow2).exactLogBase2());
  282     EXPECT_EQ(512, (-APLargeNPow2).exactLogBase2());
unittests/ADT/APIntTest.cpp
  331   EXPECT_EQ(nine.srem(-two), one);
  332   EXPECT_EQ((-nine).srem(two), -one);
  332   EXPECT_EQ((-nine).srem(two), -one);
  333   EXPECT_EQ((-nine).srem(-two), -one);
  333   EXPECT_EQ((-nine).srem(-two), -one);
  333   EXPECT_EQ((-nine).srem(-two), -one);
  338   APInt::sdivrem(-nine, two, q, r);
  339   EXPECT_EQ(-four, q);
  340   EXPECT_EQ(-one, r);
  341   APInt::sdivrem(nine, -two, q, r);
  342   EXPECT_EQ(-four, q);
  344   APInt::sdivrem(-nine, -two, q, r);
  344   APInt::sdivrem(-nine, -two, q, r);
  346   EXPECT_EQ(-one, r);
  609   APInt MinusOne = -One;
 1024     EXPECT_EQ(-c, -r); // Need to negate so the uint64_t compare will work.
 1031     EXPECT_EQ(-c, -sr); // Need to negate so the uint64_t compare will work.
 1043   testDiv(-APInt{64, 9},
 1045           -APInt{64, 1});
 1053   testDiv(-APInt{256, 9},
 1055           -APInt{256, 1});
 1189   EXPECT_EQ(APInt(8, -128), (-AP_100).sadd_sat(-AP_100));
 1189   EXPECT_EQ(APInt(8, -128), (-AP_100).sadd_sat(-AP_100));
 1197   EXPECT_EQ(APInt(8, 127), AP_100.ssub_sat(-AP_100));
 1198   EXPECT_EQ(APInt(8, -128), (-AP_100).ssub_sat(AP_100));