Lines Matching refs:ConstantInt
113 ConstantInt *AndCst) { in foldCmpLoadFromIndexedGlobal()
132 if (GEP->getNumOperands() < 3 || !isa<ConstantInt>(GEP->getOperand(1)) || in foldCmpLoadFromIndexedGlobal()
133 !cast<ConstantInt>(GEP->getOperand(1))->isZero() || in foldCmpLoadFromIndexedGlobal()
144 ConstantInt *Idx = dyn_cast<ConstantInt>(GEP->getOperand(i)); in foldCmpLoadFromIndexedGlobal()
233 if (!isa<ConstantInt>(C)) in foldCmpLoadFromIndexedGlobal()
238 bool IsTrueForElt = !cast<ConstantInt>(C)->isZero(); in foldCmpLoadFromIndexedGlobal()
315 Value *Mask = ConstantInt::get(Idx->getType(), -1); in foldCmpLoadFromIndexedGlobal()
330 Value *FirstTrueIdx = ConstantInt::get(Idx->getType(), FirstTrueElement); in foldCmpLoadFromIndexedGlobal()
338 Value *SecondTrueIdx = ConstantInt::get(Idx->getType(), SecondTrueElement); in foldCmpLoadFromIndexedGlobal()
351 Value *FirstFalseIdx = ConstantInt::get(Idx->getType(), FirstFalseElement); in foldCmpLoadFromIndexedGlobal()
360 ConstantInt::get(Idx->getType(), SecondFalseElement); in foldCmpLoadFromIndexedGlobal()
373 Value *Offs = ConstantInt::get(Idx->getType(), -FirstTrueElement); in foldCmpLoadFromIndexedGlobal()
378 ConstantInt::get(Idx->getType(), TrueRangeEnd - FirstTrueElement + 1); in foldCmpLoadFromIndexedGlobal()
388 Value *Offs = ConstantInt::get(Idx->getType(), -FirstFalseElement); in foldCmpLoadFromIndexedGlobal()
393 ConstantInt::get(Idx->getType(), FalseRangeEnd - FirstFalseElement); in foldCmpLoadFromIndexedGlobal()
414 V = Builder.CreateLShr(ConstantInt::get(Ty, MagicBitvector), V); in foldCmpLoadFromIndexedGlobal()
415 V = Builder.CreateAnd(ConstantInt::get(Ty, 1), V); in foldCmpLoadFromIndexedGlobal()
416 return new ICmpInst(ICmpInst::ICMP_NE, V, ConstantInt::get(Ty, 0)); in foldCmpLoadFromIndexedGlobal()
461 auto IsNonConst = [](Value *V) { return !isa<ConstantInt>(V); }; in canRewriteGEPAsOffset()
554 NewInsts[Base] = ConstantInt::getNullValue(IndexType); in rewriteGEPAsOffset()
578 if (isa<ConstantInt>(Op) && cast<ConstantInt>(Op)->isZero()) in rewriteGEPAsOffset()
811 ConstantInt::get(I.getType(), ICmpInst::isTrueWhenEqual(Cond))); in foldGEPICmp()
891 auto *Res = ConstantInt::get( in foldAllocaCmp()
923 Constant *R = ConstantInt::get(X->getType(), in foldICmpAddOpConst()
933 ConstantInt::get(X->getType(), -C)); in foldICmpAddOpConst()
945 ConstantInt::get(X->getType(), SMax - C)); in foldICmpAddOpConst()
956 ConstantInt::get(X->getType(), SMax - (C - 1))); in foldICmpAddOpConst()
990 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
993 return getICmp(I.ICMP_EQ, A, ConstantInt::getNullValue(A->getType())); in foldICmpShrConstConst()
1006 return getICmp(I.ICMP_UGE, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShrConstConst()
1007 return getICmp(I.ICMP_EQ, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShrConstConst()
1009 return getICmp(I.ICMP_EQ, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShrConstConst()
1015 auto *TorF = ConstantInt::get(I.getType(), I.getPredicate() == I.ICMP_NE); in foldICmpShrConstConst()
1041 ConstantInt::get(A->getType(), AP2.getBitWidth() - AP2TrailingZeros)); in foldICmpShlConstConst()
1044 return getICmp(I.ICMP_EQ, A, ConstantInt::getNullValue(A->getType())); in foldICmpShlConstConst()
1050 return getICmp(I.ICMP_EQ, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShlConstConst()
1054 auto *TorF = ConstantInt::get(I.getType(), I.getPredicate() == I.ICMP_NE); in foldICmpShlConstConst()
1066 ConstantInt *CI2, ConstantInt *CI1, in processUGT_ADDCST_ADD()
1198 X, ConstantInt::getNullValue(XTy)); in foldSignBitTest()
1299 ConstantInt *CI, *CI2; // I = icmp ugt (add (add A, B), CI2), CI in foldICmpWithConstant()
1423 return new ICmpInst(Pred, X, ConstantInt::get(SrcTy, C.sext(SrcBits))); in foldICmpTruncConstant()
1425 return new ICmpInst(Pred, X, ConstantInt::get(SrcTy, C.zext(SrcBits))); in foldICmpTruncConstant()
1433 ConstantInt::get(V->getType(), 1)); in foldICmpTruncConstant()
1444 return new ICmpInst(NewPred, Y, ConstantInt::get(SrcTy, DstBits)); in foldICmpTruncConstant()
1449 return new ICmpInst(Pred, Y, ConstantInt::get(SrcTy, C.logBase2())); in foldICmpTruncConstant()
1457 ConstantInt::get(SrcTy, APInt::getLowBitsSet(SrcBits, DstBits)); in foldICmpTruncConstant()
1459 Constant *WideC = ConstantInt::get(SrcTy, C.zext(SrcBits)); in foldICmpTruncConstant()
1472 return new ICmpInst(Pred, X, ConstantInt::get(SrcTy, NewRHS)); in foldICmpTruncConstant()
1486 ConstantInt::getNullValue(SrcTy)) in foldICmpTruncConstant()
1488 ConstantInt::getAllOnesValue(SrcTy)); in foldICmpTruncConstant()
1582 ConstantInt::getAllOnesValue(X->getType())); in foldICmpXorConstant()
1585 ConstantInt::getNullValue(X->getType())); in foldICmpXorConstant()
1592 return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), C ^ *XorC)); in foldICmpXorConstant()
1599 return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), C ^ *XorC)); in foldICmpXorConstant()
1616 ConstantInt::get(X->getType(), ~C)); in foldICmpXorConstant()
1620 ConstantInt::get(X->getType(), ~C)); in foldICmpXorConstant()
1650 Value *Add = Builder.CreateAdd(X, ConstantInt::get(XType, PowerOf2)); in foldICmpXorShiftConst()
1653 return new ICmpInst(Pred, Add, ConstantInt::get(XType, Bound)); in foldICmpXorShiftConst()
1713 return replaceInstUsesWith(Cmp, ConstantInt::getFalse(Cmp.getType())); in foldICmpAndShift()
1715 return replaceInstUsesWith(Cmp, ConstantInt::getTrue(Cmp.getType())); in foldICmpAndShift()
1718 Shift->getOperand(0), ConstantInt::get(And->getType(), NewAndCst)); in foldICmpAndShift()
1720 NewAnd, ConstantInt::get(And->getType(), NewCmpCst)); in foldICmpAndShift()
1782 Constant *NegBOC = ConstantInt::get(And->getType(), -NewC2); in foldICmpAndConstConst()
1805 Constant *ZextC1 = ConstantInt::get(WideType, C1.zext(WideScalarBits)); in foldICmpAndConstConst()
1806 Constant *ZextC2 = ConstantInt::get(WideType, C2->zext(WideScalarBits)); in foldICmpAndConstConst()
1888 return new ICmpInst(NewPred, X, ConstantInt::getNullValue(X->getType())); in foldICmpAndConstant()
1893 Constant *MinSignedC = ConstantInt::get( in foldICmpAndConstant()
1906 if (auto *C2 = dyn_cast<ConstantInt>(Y)) in foldICmpAndConstant()
2047 ConstantInt::get(V->getType(), 1)); in foldICmpOrConstant()
2057 Builder.CreateXor(OrOp1, ConstantInt::get(OrOp1->getType(), C)); in foldICmpOrConstant()
2077 Constant *NewC = ConstantInt::get(Or->getType(), C ^ (*MaskC)); in foldICmpOrConstant()
2089 Constant *NewC = ConstantInt::get(X->getType(), TrueIfSigned ? 1 : 0); in foldICmpOrConstant()
2102 return new ICmpInst(Pred, X, ConstantInt::getNullValue(X->getType())); in foldICmpOrConstant()
2110 ConstantInt::getNullValue(X->getType())); in foldICmpOrConstant()
2125 Builder.CreateICmp(Pred, P, ConstantInt::getNullValue(P->getType())); in foldICmpOrConstant()
2127 Builder.CreateICmp(Pred, Q, ConstantInt::getNullValue(Q->getType())); in foldICmpOrConstant()
2151 return new ICmpInst(Pred, X, ConstantInt::getNullValue(MulTy)); in foldICmpMulConstant()
2164 return new ICmpInst(Pred, X, ConstantInt::getNullValue(MulTy)); in foldICmpMulConstant()
2175 Constant *NewC = ConstantInt::get(MulTy, C.sdiv(*MulC)); in foldICmpMulConstant()
2187 Constant *NewC = ConstantInt::get(MulTy, C.udiv(*MulC)); in foldICmpMulConstant()
2206 NewC = ConstantInt::get( in foldICmpMulConstant()
2211 NewC = ConstantInt::get( in foldICmpMulConstant()
2216 NewC = ConstantInt::get( in foldICmpMulConstant()
2221 NewC = ConstantInt::get( in foldICmpMulConstant()
2254 return new ICmpInst(Pred, Y, ConstantInt::get(ShiftType, CLog2)); in foldICmpShlOne()
2256 Constant *BitWidthMinusOne = ConstantInt::get(ShiftType, TypeBits - 1); in foldICmpShlOne()
2327 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2332 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2341 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2352 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2357 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2366 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2372 Constant *Mask = ConstantInt::get( in foldICmpShlConstant()
2376 Constant *LShrC = ConstantInt::get(ShType, C.lshr(*ShiftAmt)); in foldICmpShlConstant()
2384 Constant *Mask = ConstantInt::get( in foldICmpShlConstant()
2434 Pred, ConstantInt::get(ShType->getContext(), C))) { in foldICmpShlConstant()
2436 RHSC = cast<ConstantInt>(FlippedStrictness->second)->getValue(); in foldICmpShlConstant()
2443 ConstantInt::get(TruncTy, RHSC.ashr(*ShiftAmt).trunc(TypeBits - Amt)); in foldICmpShlConstant()
2478 ConstantInt::getNullValue(X->getType())); in foldICmpShrConstant()
2491 Constant *NewC = ConstantInt::get(Shr->getType(), CmpLZ - ShiftLZ); in foldICmpShrConstant()
2523 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2531 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2538 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2547 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2557 ConstantInt::getNullValue(ShrTy)); in foldICmpShrConstant()
2561 ConstantInt::getAllOnesValue(ShrTy)); in foldICmpShrConstant()
2570 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2576 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2595 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, C << ShAmtVal)); in foldICmpShrConstant()
2601 ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal))); in foldICmpShrConstant()
2604 ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal) - 1)); in foldICmpShrConstant()
2611 Constant *Mask = ConstantInt::get(ShrTy, Val); in foldICmpShrConstant()
2613 return new ICmpInst(Pred, And, ConstantInt::get(ShrTy, C << ShAmtVal)); in foldICmpShrConstant()
2651 Constant *MaskC = ConstantInt::get(Ty, SignMask | (*DivisorC - 1)); in foldICmpSRemConstant()
2655 return new ICmpInst(Pred, And, ConstantInt::get(Ty, C)); in foldICmpSRemConstant()
2661 return new ICmpInst(ICmpInst::ICMP_SGT, And, ConstantInt::getNullValue(Ty)); in foldICmpSRemConstant()
2666 return new ICmpInst(ICmpInst::ICMP_UGT, And, ConstantInt::get(Ty, SignMask)); in foldICmpSRemConstant()
2689 ConstantInt::get(Ty, C2->udiv(C + 1))); in foldICmpUDivConstant()
2696 ConstantInt::get(Ty, C2->udiv(C))); in foldICmpUDivConstant()
2722 Value *XBig = Builder.CreateICmp(Pred, X, ConstantInt::get(Ty, C)); in foldICmpDivConstant()
2723 Value *YOne = Builder.CreateICmp(Pred, Y, ConstantInt::get(Ty, 1)); in foldICmpDivConstant()
2846 X, ConstantInt::get(Ty, LoBound)); in foldICmpDivConstant()
2849 X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2857 X, ConstantInt::get(Ty, LoBound)); in foldICmpDivConstant()
2860 X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2869 return new ICmpInst(Pred, X, ConstantInt::get(Ty, LoBound)); in foldICmpDivConstant()
2877 return new ICmpInst(ICmpInst::ICMP_UGE, X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2878 return new ICmpInst(ICmpInst::ICMP_SGE, X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2897 ConstantExpr::getSub(SubC, ConstantInt::get(Ty, C))); in foldICmpSubConstant()
2909 return new ICmpInst(SwappedPred, Y, ConstantInt::get(Ty, SubResult)); in foldICmpSubConstant()
2964 Value *Add = Builder.CreateAdd(Y, ConstantInt::get(Ty, ~(*C2)), "notsub", in foldICmpSubConstant()
2966 return new ICmpInst(SwappedPred, Add, ConstantInt::get(Ty, ~C)); in foldICmpSubConstant()
3076 return new ICmpInst(Pred, X, ConstantInt::get(Ty, NewC)); in foldICmpAddConstant()
3084 return new ICmpInst(ICmpInst::ICMP_SLT, X, ConstantInt::get(Ty, Upper)); in foldICmpAddConstant()
3086 return new ICmpInst(ICmpInst::ICMP_SGE, X, ConstantInt::get(Ty, Lower)); in foldICmpAddConstant()
3089 return new ICmpInst(ICmpInst::ICMP_ULT, X, ConstantInt::get(Ty, Upper)); in foldICmpAddConstant()
3091 return new ICmpInst(ICmpInst::ICMP_UGE, X, ConstantInt::get(Ty, Lower)); in foldICmpAddConstant()
3102 return new ICmpInst(ICmpInst::ICMP_SLT, X, ConstantInt::get(Ty, -(*C2))); in foldICmpAddConstant()
3106 return new ICmpInst(ICmpInst::ICMP_SGT, X, ConstantInt::get(Ty, ~(*C2))); in foldICmpAddConstant()
3110 return new ICmpInst(ICmpInst::ICMP_ULT, X, ConstantInt::get(Ty, SMax - C)); in foldICmpAddConstant()
3114 return new ICmpInst(ICmpInst::ICMP_UGT, X, ConstantInt::get(Ty, C ^ SMax)); in foldICmpAddConstant()
3120 return new ICmpInst(ICmpInst::ICMP_ULE, X, ConstantInt::get(Ty, C)); in foldICmpAddConstant()
3138 ConstantInt::get(Ty, C * 2)); in foldICmpAddConstant()
3152 Builder.CreateAdd(X, ConstantInt::get(Ty, *C2 - C - 1)), in foldICmpAddConstant()
3153 ConstantInt::get(Ty, ~C)); in foldICmpAddConstant()
3159 Value *&RHS, ConstantInt *&Less, in matchThreeWayIntCompare()
3160 ConstantInt *&Equal, in matchThreeWayIntCompare()
3161 ConstantInt *&Greater) { in matchThreeWayIntCompare()
3214 ConstantInt *C) { in foldICmpSelectConstant()
3223 ConstantInt *C1LessThan, *C2Equal, *C3GreaterThan; in foldICmpSelectConstant()
3285 return new ICmpInst(Pred, X, ConstantInt::getNullValue(X->getType())); in foldICmpBitCast()
3289 return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), 1)); in foldICmpBitCast()
3294 ConstantInt::getAllOnesValue(X->getType())); in foldICmpBitCast()
3302 return new ICmpInst(Pred, X, ConstantInt::getNullValue(X->getType())); in foldICmpBitCast()
3326 ConstantInt::getNullValue(NewType)); in foldICmpBitCast()
3329 ConstantInt::getAllOnesValue(NewType)); in foldICmpBitCast()
3365 return new ICmpInst(Pred, Cast, ConstantInt::getNullValue(DstType)); in foldICmpBitCast()
3378 return new ICmpInst(Pred, NewCast, ConstantInt::getNullValue(NewType)); in foldICmpBitCast()
3404 Value *NewC = ConstantInt::get(EltTy, C->trunc(EltTy->getBitWidth())); in foldICmpBitCast()
3426 if (auto *ConstRHS = dyn_cast<ConstantInt>(Cmp.getOperand(1))) in foldICmpInstWithConstant()
3552 Builder.CreateMul(BOp1, ConstantInt::get(BO->getType(), C)); in foldICmpBinOpEqualityWithConstant()
3619 return new ICmpInst(Pred, II->getArgOperand(0), ConstantInt::get(Ty, C)); in foldICmpEqIntrinsicWithConstant()
3625 ConstantInt::get(Ty, C.byteSwap())); in foldICmpEqIntrinsicWithConstant()
3630 ConstantInt::get(Ty, C.reverseBits())); in foldICmpEqIntrinsicWithConstant()
3637 ConstantInt::getNullValue(Ty)); in foldICmpEqIntrinsicWithConstant()
3651 ConstantInt::get(Ty, Mask2)); in foldICmpEqIntrinsicWithConstant()
3677 ? ConstantInt::get(Ty, C.rotr(*RotAmtC)) in foldICmpEqIntrinsicWithConstant()
3678 : ConstantInt::get(Ty, C.rotl(*RotAmtC))); in foldICmpEqIntrinsicWithConstant()
3932 Builder.CreateAdd(Op0, ConstantInt::get(Op1->getType(), EquivOffset)), in foldICmpUSubSatOrUAddSatWithConstant()
3933 ConstantInt::get(Op1->getType(), EquivInt)); in foldICmpUSubSatOrUAddSatWithConstant()
4021 ConstantInt::getAllOnesValue(Ty)); in foldICmpIntrinsicWithConstant()
4025 ConstantInt::getAllOnesValue(Ty)); in foldICmpIntrinsicWithConstant()
4034 II->getArgOperand(0), ConstantInt::get(Ty, Limit)); in foldICmpIntrinsicWithConstant()
4042 II->getArgOperand(0), ConstantInt::get(Ty, Limit)); in foldICmpIntrinsicWithConstant()
4056 ConstantInt::getNullValue(Ty)); in foldICmpIntrinsicWithConstant()
4064 ConstantInt::getNullValue(Ty)); in foldICmpIntrinsicWithConstant()
4136 return ConstantInt::get(I.getType(), *Impl); in foldSelectICmp()
4140 ConstantInt *CI = nullptr; in foldSelectICmp()
4143 CI = dyn_cast<ConstantInt>(Op1); in foldSelectICmp()
4147 CI = dyn_cast<ConstantInt>(Op2); in foldSelectICmp()
4478 Value *T0 = Builder.CreateAdd(X, ConstantInt::get(XType, AddCst)); in foldICmpWithTruncSignExtendedVal()
4480 Value *T1 = Builder.CreateICmp(DstPred, T0, ConstantInt::get(XType, ICmpCst)); in foldICmpWithTruncSignExtendedVal()
4760 ConstantInt::get(Ty, APInt::getSignedMaxValue(BitWidth)); in foldICmpXNegX()
4951 Constant *Zero = ConstantInt::getNullValue(Op1->getType()); in foldICmpBinOp()
4960 Constant *Zero = ConstantInt::getNullValue(Op1->getType()); in foldICmpBinOp()
5243 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpBinOp()
5245 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpBinOp()
5296 Constant *Mask = ConstantInt::get( in foldICmpBinOp()
5413 return replaceInstUsesWith(I, ConstantInt::getBool(I.getType(), *CmpYZ)); in foldICmpWithMinMax()
5453 I, ConstantInt::getBool(I.getType(), Pred == ICmpInst::ICMP_NE)); in foldICmpWithMinMax()
5480 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpWithMinMax()
5503 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpWithMinMax()
5560 ConstantInt::get(Ty, 2)) in foldICmpPow2Test()
5562 ConstantInt::get(Ty, 1)); in foldICmpPow2Test()
5583 ConstantInt *C1, *C2; in foldICmpEquality()
5694 return new ICmpInst(NewPred, Xor, ConstantInt::get(A->getType(), CmpVal)); in foldICmpEquality()
5699 ConstantInt *Cst1; in foldICmpEquality()
5750 Value *Add = Builder.CreateAdd(A, ConstantInt::get(A->getType(), C)); in foldICmpEquality()
5753 Add, ConstantInt::get(A->getType(), C.shl(1))); in foldICmpEquality()
5763 ConstantInt::getNullValue(Op0->getType())); in foldICmpEquality()
5768 ConstantInt::getNullValue(Op1->getType())); in foldICmpEquality()
5814 : ConstantInt::getNullValue(A->getType())); in foldICmpEquality()
5837 Constant *Zero = ConstantInt::getNullValue(X->getType()); in foldICmpWithTrunc()
5845 Constant *MaskC = ConstantInt::get(X->getType(), C->zext(SrcBits)); in foldICmpWithTrunc()
5853 Constant *MaskC = ConstantInt::get(X->getType(), (*C + 1).zext(SrcBits)); in foldICmpWithTrunc()
5978 if (IsSignedCmp || !IsSignedExt || !isa<ConstantInt>(C)) in foldICmpWithZextOrSext()
6102 Overflow = ConstantInt::getFalse(OverflowTy); in OptimizeOverflowCheck()
6113 Overflow = ConstantInt::getTrue(OverflowTy); in OptimizeOverflowCheck()
6118 Overflow = ConstantInt::getFalse(OverflowTy); in OptimizeOverflowCheck()
6194 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) { in processUMulZExtIdiom()
6267 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in processUMulZExtIdiom()
6515 ConstantInt::get(Op1->getType(), *CmpC - 1)); in foldICmpUsingKnownBits()
6532 ConstantInt::get(Op1->getType(), *CmpC + 1)); in foldICmpUsingKnownBits()
6548 ConstantInt::get(Op1->getType(), *CmpC - 1)); in foldICmpUsingKnownBits()
6559 ConstantInt::get(Op1->getType(), *CmpC + 1)); in foldICmpUsingKnownBits()
6575 I, ConstantInt::getBool(I.getType(), Pred == CmpInst::ICMP_NE)); in foldICmpUsingKnownBits()
6601 auto *CmpC = ConstantInt::get(XTy, Log2C2 - Log2C1); in foldICmpUsingKnownBits()
6613 ConstantInt::getNullValue(Op1->getType())); in foldICmpUsingKnownBits()
6618 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6620 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6625 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6627 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6632 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6634 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6639 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6641 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6645 assert(!isa<ConstantInt>(Op1) && "ICMP_SGE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6647 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6649 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6654 assert(!isa<ConstantInt>(Op1) && "ICMP_SLE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6656 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6658 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6663 assert(!isa<ConstantInt>(Op1) && "ICMP_UGE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6665 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6667 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6672 assert(!isa<ConstantInt>(Op1) && "ICMP_ULE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6674 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6676 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6725 Pred1, X, ConstantInt::getSigned(X->getType(), IsSExt ? -1 : 1)); in foldICmpUsingBoolRange()
6735 I, ConstantInt::getBool(I.getType(), Pred1 == ICmpInst::ICMP_NE)); in foldICmpUsingBoolRange()
6750 I, ConstantInt::getBool(I.getType(), Pred1 == ICmpInst::ICMP_NE)); in foldICmpUsingBoolRange()
6771 ConstantInt::getSigned(X->getType(), Pred2 == ICmpInst::ICMP_NE in foldICmpUsingBoolRange()
6795 auto ConstantIsOk = [WillIncrement, IsSigned](ConstantInt *C) { in getFlippedStrictnessPredicateAndConstant()
6800 if (auto *CI = dyn_cast<ConstantInt>(C)) { in getFlippedStrictnessPredicateAndConstant()
6816 auto *CI = dyn_cast<ConstantInt>(Elt); in getFlippedStrictnessPredicateAndConstant()
6826 auto *CI = dyn_cast_or_null<ConstantInt>(SplatC); in getFlippedStrictnessPredicateAndConstant()
6847 Constant *OneOrNegOne = ConstantInt::get(Type, WillIncrement ? 1 : -1, true); in getFlippedStrictnessPredicateAndConstant()
7234 return replaceInstUsesWith(CxtI, ConstantInt::getTrue(CxtI.getType())); in foldICmpCommutative()
7237 return replaceInstUsesWith(CxtI, ConstantInt::getFalse(CxtI.getType())); in foldICmpCommutative()
7245 X, ConstantInt::get(X->getType(), SMin + 1))); in foldICmpCommutative()
7254 X, ConstantInt::get(X->getType(), SMin))); in foldICmpCommutative()
7633 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7636 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7701 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7703 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7719 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7720 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7731 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7732 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7744 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7745 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7755 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7756 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7775 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7777 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7782 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7794 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldFCmpIntToFPConst()
7807 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7819 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldFCmpIntToFPConst()
7835 ConstantInt::get(LHSI->getOperand(0)->getType(), RHSInt)); in foldFCmpIntToFPConst()
8202 Value *MaskX = Builder.CreateAnd(X, ConstantInt::get(IntTy, SignMask)); in visitFCmpInst()
8203 return new ICmpInst(IntPred, MaskX, ConstantInt::getNullValue(IntTy)); in visitFCmpInst()
8289 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in visitFCmpInst()
8300 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in visitFCmpInst()
8334 ConstantInt::getNullValue(IntType)); in visitFCmpInst()