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

References

gen/lib/Target/Mips/MipsGenDAGISel.inc
30284          Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1;
30312          Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1;
30325          Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 63;
gen/lib/Target/WebAssembly/WebAssemblyGenDAGISel.inc
21208   return (~Known0.Zero & ~Known1.Zero) == 0;
gen/lib/Target/X86/X86GenDAGISel.inc
254140   return (~Known0.Zero & ~Known1.Zero) == 0;
include/llvm/ADT/APInt.h
 1172   bool operator!=(uint64_t Val) const { return !((*this) == Val); }
 1979 inline bool operator==(uint64_t V1, const APInt &V2) { return V2 == V1; }
include/llvm/IR/Constants.h
  165     return Val == V;
include/llvm/IR/PatternMatch.h
  205         return CIV == static_cast<uint64_t>(Val);
  209       return -CIV == -Val;
lib/Analysis/BasicAliasAnalysis.cpp
  297     assert(Scale == 0 && "Constant values don't have a scale");
 1435   if (GEP1BaseOffset == 0 && DecompGEP1.VarIndices.empty())
lib/Analysis/ConstantFolding.cpp
  942       if (ElemSize == 0) {
 2227       cast<ConstantInt>(Operands[1])->getValue() == 4) {
lib/Analysis/DependenceAnalysis.cpp
 1443   if (R == 0)
 1456   if (R == 0)
 1667   return ConstDividend.srem(ConstDivisor) == 0;
 2404   if (ConstDelta == 0)
 3135     assert(Charlie.srem(Beta) == 0 && "C should be evenly divisible by B");
 3150     assert(Charlie.srem(Alpha) == 0 && "C should be evenly divisible by A");
 3164     assert(Charlie.srem(Alpha) == 0 && "C should be evenly divisible by A");
lib/Analysis/InstructionSimplify.cpp
 1632     if (Delta == 2) {
 1638     if (Delta == 1) {
 1646     if (Delta == 2)
 1649     if (Delta == 1)
 1705     if (Delta == 2) {
 1711     if (Delta == 1) {
 1719     if (Delta == 2)
 1722     if (Delta == 1)
lib/Analysis/LoopAccessAnalysis.cpp
 1536   if (Val == 0) {
lib/Analysis/ScalarEvolution.cpp
 5764   if (Step == 0 || MaxBECount == 0)
 5764   if (Step == 0 || MaxBECount == 0)
 7993     if (CondVal->getValue() == uint64_t(ExitWhen)) {
lib/Analysis/ValueTracking.cpp
 1254         assert((Known.Zero & Known.One) == 0 && "Bits known to be one AND zero?");
 1735   assert((Known.Zero & Known.One) == 0 && "Bits known to be one AND zero?");
 2745         if (Mul0CI->getValue() == 1) {
 2769         if (Mul1CI->getValue() == 1) {
 3924     if (*Denominator == 0)
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
 3067     } else if (Amt == NVTBits) {
 3085     } else if (Amt == NVTBits) {
 3107     } else if (Amt == NVTBits) {
lib/CodeGen/MIRParser/MIParser.cpp
 2662   unsigned NumBits = (A == 0) ? 32 : A.getActiveBits();
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
 2576       IsFlip = (Const->getAPIntValue() & 0x01) == 1;
 2899       if (ShiftAmt && ShiftAmt->getAPIntValue() == (BitWidth - 1)) {
 3104           if (C->getAPIntValue() == (OpSizeInBits - 1))
 3141         ShAmtC->getAPIntValue() == (N1.getScalarValueSizeInBits() - 1)) {
 4197     if (C2->getAPIntValue() == 2)
 5308   if (N1C && N1C->getAPIntValue() == 0xffff && N0.getOpcode() == ISD::OR) {
 5911       OppShiftCst->getAPIntValue() == ShiftedVT.getScalarSizeInBits() - 1)
 6103     return Width.getLoBits(MaskLoBits) == 0;
 6104   return Width == EltSize;
 6218     return (LHS->getAPIntValue() + RHS->getAPIntValue()) == EltSizeInBits;
 7007           if (C->getAPIntValue() == (OpSizeInBits - 1))
 7695       if (LargeShift->getAPIntValue() == TruncBits) {
 7841   if (N1C && N1C->getAPIntValue() == (OpSizeInBits - 1)) {
 7848       N1C->getAPIntValue() == Log2_32(OpSizeInBits)) {
 7858     if (UnknownBits == 0) return DAG.getConstant(1, SDLoc(N0), VT);
13361             cast<ConstantSDNode>(Op1)->getAPIntValue() == AndConst.logBase2()) {
14488   assert((UsedBits & Second.getUsedBits()) == 0 &&
14893     if (Imm == 0 || Imm.isAllOnesValue())
19402     if (AndConst && AndConst->getAPIntValue() == 0xffff) {
19501       else if (Bits == 0)
19938   if (N2C && ((N2C->getAPIntValue() & (N2C->getAPIntValue() - 1)) == 0)) {
20154       if (ValueOnZeroC->getAPIntValue() == VT.getSizeInBits()) {
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
 1851     } else if (Amt == NVTBits) {
 1872     } else if (Amt == NVTBits) {
 1895   } else if (Amt == NVTBits) {
 1928   if (((Known.Zero|Known.One) & HighBitMask) == 0)
 3728       (!EqAllowed && ((HiCmpC && (HiCmpC->getAPIntValue() == 1)) ||
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
 3109         assert((Known.Zero & Known.One) == 0&&"Bits known to be one AND zero?");
 3373     if (C && C->getAPIntValue() == 1)
lib/CodeGen/SelectionDAG/TargetLowering.cpp
  596   if (DemandedBits == 0 || DemandedElts == 0)
  596   if (DemandedBits == 0 || DemandedElts == 0)
  798   } else if (OriginalDemandedBits == 0 || OriginalDemandedElts == 0) {
  798   } else if (OriginalDemandedBits == 0 || OriginalDemandedElts == 0) {
 1632       if (IsVecInReg && DemandedElts == 1 &&
 1665       if (IsVecInReg && DemandedElts == 1 &&
 1711     if (IsVecInReg && DemandedElts == 1 &&
 2107   if (DemandedElts == 0) {
 2461         DemandedSrcElts == 1 && TLO.DAG.getDataLayout().isLittleEndian()) {
 2565   assert((KnownUndef & KnownZero) == 0 && "Elements flagged as undef AND zero");
 3091           ShAmt == Log2_32(N0.getValueSizeInBits())) {
 3092         if ((C1 == 0) == (Cond == ISD::SETEQ)) {
 3120       if ((Cond == ISD::SETULT && C1 == 2) || (Cond == ISD::SETUGT && C1 == 1)){
 3120       if ((Cond == ISD::SETULT && C1 == 2) || (Cond == ISD::SETUGT && C1 == 1)){
 3129       if (C1 == 1 && !isOperationLegalOrCustom(ISD::CTPOP, CTVT) &&
 3193           if (MinBits == 1 && C1 == 1)
 3239         N0.getOpcode() == ISD::AND && C1 == 0 &&
 3620         if (Cond == ISD::SETNE && C1 == 0) {// (X & 8) != 0  -->  (X & 8) >> 3
lib/CodeGen/SwitchLoweringUtils.cpp
  478         (CaseVal->getValue() - Clusters[DstIndex - 1].High->getValue()) == 1) {
lib/ExecutionEngine/Interpreter/Execution.cpp
  448       if (DestMask.AggregateVal[_i].IntVal == false)
  851         Dest.AggregateVal[i] = (Src1.AggregateVal[i].IntVal == 0) ?
  854       Dest = (Src1.IntVal == 0) ? Src3 : Src2;
  941     if (getOperandValue(Cond, SF).IntVal == 0) // If false cond...
lib/IR/ConstantRange.cpp
  186   if (V == 0)
  201   if (V == 0 || V.isOneValue())
 1034     if (RHS.getUpper() == 1)
lib/IR/Verifier.cpp
 5515       AssertTBAA(Offset == 0, "Offset not zero at the point of scalar access",
 5519                    (BaseNodeBitWidth == 0 && Offset == 0) ||
lib/Support/APInt.cpp
 1231   } while (q1.ult(delta) || (q1 == delta && r1 == 0));
 1283            (q1.ult(delta) || (q1 == delta && r1 == 0)));
 1634   if (*this == RHS)
 1726   if (*this == RHS)
 1867   if (LHS == RHS) {
 2171   if (*this == 0) {
 2802     if (Rem == 0)
 2817     if (Rem == 0)
lib/Target/AArch64/AArch64FastISel.cpp
  763           if (C->getValue() == 0xffffffff)
  767           if (C->getValue() == 0xffffffff) {
  858       if (C->getValue() == 0xffffffff)
  862       if (C->getValue() == 0xffffffff) {
 3417       if (C->getValue() == 2)
 3422       if (C->getValue() == 2)
 3709         if (C->getValue() == 2) {
 3716         if (C->getValue() == 2) {
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
 1878   return (SignificantDstMask & SignificantBitsToBeInserted) == 0 &&
 2152     assert((~APInt(BitWidth, AndImm) & ~Known.Zero) == 0);
lib/Target/AArch64/AArch64ISelLowering.cpp
 8061   bool IsZero = IsCnst && (CnstBits == 0);
 9306       if (Y1C->getAPIntValue() == VT.getSizeInBits() - 1) {
10153   return cast<ConstantSDNode>(N.getOperand(1))->getAPIntValue() ==
lib/Target/ARM/ARMISelLowering.cpp
14402     if (Known.Zero == 0xfffffffe)
14405     else if (Known.Zero == 0xffffff00)
14408     else if (Known.Zero == 0xffff0000)
lib/Target/ARM/ARMTargetTransformInfo.cpp
  120     if (Imm == 255 || Imm == 65535)
  120     if (Imm == 255 || Imm == 65535)
lib/Target/Hexagon/HexagonConstPropagation.cpp
 1248     if (A2 == 0) {
 1268     if (A2 == 0)
 1286     if (A2 == 0 || A2.isNegative())
 1395   if (A2 == -1)
 1397   if (A2 == 0) {
 1462   if (A2 == 0)
 1464   if (A2 == -1) {
lib/Target/Lanai/LanaiTargetTransformInfo.h
   54     if (Imm == 0)
lib/Target/Mips/MipsSEISelLowering.cpp
  705       else if (Mask == 0)
  753     if (Val == 0 || Val == 1)
  753     if (Val == 0 || Val == 1)
  795   if (C == 0)
  799   if (C == 1)
lib/Target/PowerPC/PPCISelLowering.cpp
 2313       if (~(LHSKnown.Zero | RHSKnown.Zero) == 0) {
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
   68   if (Imm == 0)
  176   if (ZeroFree && Imm == 0)
lib/Target/RISCV/RISCVTargetTransformInfo.cpp
   23   if (Imm == 0)
   38   if (Imm == 0)
lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
   45   if (Imm == 0)
lib/Target/X86/X86ISelDAGToDAG.cpp
  631             (Imm->getAPIntValue() == UINT8_MAX ||
  632              Imm->getAPIntValue() == UINT16_MAX ||
  633              Imm->getAPIntValue() == UINT32_MAX))
lib/Target/X86/X86ISelLowering.cpp
 4703       if (SetCCOpcode == ISD::SETLT && RHSC->getAPIntValue() == 1) {
 5588         Idx == (VT.getVectorNumElements() / 2) &&
 6800       else if (SrcEltBits[SrcIdx][M] == 0)
 6900       Mask.push_back(ByteBits == ZeroMask ? SM_SentinelZero : i);
 7633     CanFold = (SrcVector == V1) && (Current.getConstantOperandAPInt(1) == i);
 9053   if (VT.is256BitVector() && DemandedElts.lshr(HalfNumElts) == 0) {
10475         if (Val == 0)
10481         if (Val == 0)
12461   if (ExtIndex1 == 0 && ExtIndex0 == NumElts)
12461   if (ExtIndex1 == 0 && ExtIndex0 == NumElts)
14824   bool IsLowZero = (Zeroable & 0x3) == 0x3;
14825   bool IsHighZero = (Zeroable & 0xc) == 0xc;
16271   if (WidenedMask[0] == 0 && (Zeroable & 0xf0) == 0xf0 &&
16272       (WidenedMask[1] == 1 || (Zeroable & 0x0c) == 0x0c)) {
16273     unsigned NumElts = ((Zeroable & 0x0c) == 0x0c) ? 2 : 4;
22742       return C->getAPIntValue() == X86::STATIC_ROUNDING::CUR_DIRECTION;
24092     assert((HintVal == 2 || HintVal == 3) &&
24092     assert((HintVal == 2 || HintVal == 3) &&
24094     unsigned Opcode = (HintVal == 2 ? IntrData->Opc1 : IntrData->Opc0);
34496     if (DemandedElts == 1) {
34542       DemandedElts.lshr(NumElts / 2) == 0) {
34547     if (VT.is512BitVector() && DemandedElts.lshr(NumElts / 4) == 0)
34872       if (DemandedVecBits == 0)
35044         if (IdentityOp == 0)
35047       assert((IdentityOp == 0 || IdentityOp.countPopulation() == 1) &&
36695        (AbsDiff == 3 || AbsDiff == 5 || AbsDiff == 9))) {
36695        (AbsDiff == 3 || AbsDiff == 5 || AbsDiff == 9))) {
36695        (AbsDiff == 3 || AbsDiff == 5 || AbsDiff == 9))) {
37321   if (CC == X86::COND_S && Addend == 1)
37323   else if (CC == X86::COND_NS && Addend == 1)
37325   else if (CC == X86::COND_G && Addend == -1)
37327   else if (CC == X86::COND_LE && Addend == -1)
37617       if (FalseC->getAPIntValue() == 0 && TrueC->getAPIntValue().isPowerOf2()) {
38304       if (N1SplatC->getAPIntValue() == 1)
38352     if (SarConst == 0)
39678       ShAmt0.getConstantOperandAPInt(1) == (Bits - 1)) {
39685       ShAmt1.getConstantOperandAPInt(1) == (Bits - 1)) {
39726           ShAmt1Op1.getConstantOperandAPInt(1) == (Bits - 1)) {
39732       if ((SumC->getAPIntValue() == Bits ||
39733            (SumC->getAPIntValue() == 0 && ShMsk1)) &&
39752             Op1.getConstantOperandAPInt(1) == 1) {
lib/Target/X86/X86TargetTransformInfo.cpp
 2940   if (Imm == 0)
lib/Transforms/InstCombine/InstCombineAddSub.cpp
  939         C2 == C3 && *C2 == Ty->getScalarSizeInBits() - 1) {
 1787           *ShAmt == BitWidth - 1) {
 1799           *ShAmt == BitWidth - 1) {
 1996       Op1->hasNUses(2) && *ShAmt == Ty->getScalarSizeInBits() - 1 &&
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  480   if (BCst->getValue() == 0 || DCst->getValue() == 0)
  480   if (BCst->getValue() == 0 || DCst->getValue() == 0)
  487   if ((BCst->getValue() & DCst->getValue()) == 0)
  506   if ((((BCst->getValue() & DCst->getValue()) & ECst->getValue()) == 0) &&
 1970         *ShAmt == Ty->getScalarSizeInBits() - 1) {
 2721         *ShAmt == Ty->getScalarSizeInBits() - 1) {
 3226       Op1->hasNUses(2) && *ShAmt == Ty->getScalarSizeInBits() - 1 &&
lib/Transforms/InstCombine/InstCombineCalls.cpp
  178         mdconst::extract<ConstantInt>(M->getOperand(1))->getValue() ==
  753     unsigned Length = APLength == 0 ? 64 : APLength.getZExtValue();
  833   unsigned Length = APLength == 0 ? 64 : APLength.getZExtValue();
 2635       if (R->getValue() == 4) {
 2676       if (R->getValue() == 4) {
lib/Transforms/InstCombine/InstCombineCompares.cpp
 2608   if (Pred == ICmpInst::ICMP_ULT && C.isPowerOf2() && (*C2 & (C - 1)) == 0)
 2615   if (Pred == ICmpInst::ICMP_UGT && (C + 1).isPowerOf2() && (*C2 & C) == 0)
 3039     if (C == BitWidth) {
 3069     if (IsZero || C == BitWidth) {
 3548            NewShAmtSplat->getUniqueInteger() == WidestBitWidth - 1))
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  371   if (match(Op0, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1)
  373   if (match(Op1, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1)
lib/Transforms/InstCombine/InstCombineShifts.cpp
  363   if (*InnerShiftConst == OuterShAmt)
  411     if (CI->getValue() == NumBits) {
 1029       assert(*ShOp1 == ShAmt);
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
 1095   assert((DemandedElts & ~EltMask) == 0 && "Invalid DemandedElts!");
lib/Transforms/InstCombine/InstructionCombining.cpp
 1168   if (match(Val, m_Zero()) || Scale == 1) {
lib/Transforms/Scalar/ConstantHoisting.cpp
  628     Constant *Offset = Diff == 0 ? nullptr : ConstantInt::get(Ty, Diff);
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  391     if (BECst->getAPInt() == 0)
  683     if (FirstStride == FirstStoreSize || -FirstStride == FirstStoreSize) {
  683     if (FirstStride == FirstStoreSize || -FirstStride == FirstStoreSize) {
lib/Transforms/Scalar/LoopLoadElimination.cpp
  127     return Val == TypeByteSize;
lib/Transforms/Scalar/LoopStrengthReduce.cpp
  674     if (RA == 1)
 1267           if (Step->getAPInt() == F.BaseOffset)
lib/Transforms/Scalar/Reassociate.cpp
  325     assert(LHS == 1 && RHS == 1 && "Weights not reduced!");
  325     assert(LHS == 1 && RHS == 1 && "Weights not reduced!");
  330     assert(LHS == 1 && RHS == 1 && "Weights not reduced!");
  330     assert(LHS == 1 && RHS == 1 && "Weights not reduced!");
lib/Transforms/Scalar/SROA.cpp
  831     if ((Length && Length->getValue() == 0) ||
  851     if (Length && Length->getValue() == 0)
 1469   if (Offset == 0)
 1553   if (ElementSize == 0)
 1664     OffsetPtr = Int8PtrOffset == 0
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  743   if (ConstantOffset == 0) {
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  587     if (R == 0)
  595   if (IndexOffset == 1)
lib/Transforms/Utils/Local.cpp
 2770         if ((AndMask & Bit) == 0)
tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
 1511     return Node.getValue() == ExpectedValue;
 1780     return Node.getSize() == N;
tools/clang/lib/AST/Expr.cpp
 2317   return Lit && Lit->getValue() == 0;
 2458           if (IE->getValue() == 0)
tools/clang/lib/Analysis/CFG.cpp
  938     if ((IntValue == 1) || (IntValue == 0))
  938     if ((IntValue == 1) || (IntValue == 0))
 1000       if ((IntValue == 1) || (IntValue == 0)) {
 1000       if ((IntValue == 1) || (IntValue == 0)) {
 1912       if (AT->getSize() == 0)
 2003     if (AT->getSize() == 0)
tools/clang/lib/Basic/FixedPoint.cpp
   40   if (!(Masked == Mask || Masked == 0)) {
tools/clang/lib/CodeGen/CGExprAgg.cpp
 1366     return IL->getValue() == 0;
tools/clang/lib/CodeGen/CGExprCXX.cpp
  826       if (typeSizeMultiplier == 1)
  895       assert(arraySizeMultiplier == 1);
  927   if (cookieSize == 0)
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp
 1530       if (Alignment == 0) {
 1540       assert((Alignment == 0 || Alignment.isPowerOf2()) &&
tools/clang/lib/CodeGen/TargetInfo.cpp
  489       if (AT->getSize() == 0)
tools/clang/lib/Sema/SemaChecking.cpp
 6264   if (Result.isStrictlyPositive() && (Result & (Result - 1)) == 0)
 6335       (Result > 0 && Result < 0x10000 && (Result & 0xFF) == 0xFF))
 9532     return isa<IntegerLiteral>(E) && cast<IntegerLiteral>(E)->getValue() == 0;
10316         if (I->getValue() == 1) {
11516       if (LHS && LHS->getValue() == 0)
11533     if ((LHS->getValue() == 0 || LHS->getValue() == 1) &&
11533     if ((LHS->getValue() == 0 || LHS->getValue() == 1) &&
11534         (RHS->getValue() == 0 || RHS->getValue() == 1))
11534         (RHS->getValue() == 0 || RHS->getValue() == 1))
tools/clang/lib/Sema/SemaExpr.cpp
11246   if (LeftSideValue == 2 && RightSideIntValue >= 0) {
11269   } else if (LeftSideValue == 10) {
tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
   67     if (ArrayTy->getSize() == 1 && TypeSize > FlexSize)
tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
 1269     if (Value == 1 || Value == 2) {
 1269     if (Value == 1 || Value == 2) {
tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
  525                            (OpCode == BO_NE && RHS == NoErr);
tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
  154           if (I->getValue() == 0ULL)
tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
 2374       if (IL->getValue() == 0) {
 2380       if (IL->getValue() == 0) {
tools/clang/tools/extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
  158     return (IntLit->getValue() == 0) ? "false" : "true";
  164     return (FloatLitAbsValue.bitcastToAPInt() == 0) ? "false" : "true";
unittests/ADT/APIntTest.cpp
  397   EXPECT_TRUE(!(APInt(8, 0) == 256));
  399   EXPECT_TRUE(!(APInt(8, 1) == 256));
  423   EXPECT_TRUE(u64 == uint64max);
  441   EXPECT_TRUE(s64 == int64max);
unittests/IR/ConstantRangeTest.cpp
   73         if (SkipZeroRHS && N2 == 0)
  110         if (SkipZeroRHS && N2 == 0)
 1089         if (N2 == 0)
utils/unittest/googletest/include/gtest/gtest.h
 1392   if (lhs == rhs) {