Lines Matching refs:ConstantInt

112     ConstantInt *AndCst) {  in foldCmpLoadFromIndexedGlobal()
131 if (GEP->getNumOperands() < 3 || !isa<ConstantInt>(GEP->getOperand(1)) || in foldCmpLoadFromIndexedGlobal()
132 !cast<ConstantInt>(GEP->getOperand(1))->isZero() || in foldCmpLoadFromIndexedGlobal()
143 ConstantInt *Idx = dyn_cast<ConstantInt>(GEP->getOperand(i)); in foldCmpLoadFromIndexedGlobal()
229 if (!isa<ConstantInt>(C)) in foldCmpLoadFromIndexedGlobal()
234 bool IsTrueForElt = !cast<ConstantInt>(C)->isZero(); in foldCmpLoadFromIndexedGlobal()
311 Value *Mask = ConstantInt::get(Idx->getType(), -1); in foldCmpLoadFromIndexedGlobal()
326 Value *FirstTrueIdx = ConstantInt::get(Idx->getType(), FirstTrueElement); in foldCmpLoadFromIndexedGlobal()
334 Value *SecondTrueIdx = ConstantInt::get(Idx->getType(), SecondTrueElement); in foldCmpLoadFromIndexedGlobal()
347 Value *FirstFalseIdx = ConstantInt::get(Idx->getType(), FirstFalseElement); in foldCmpLoadFromIndexedGlobal()
356 ConstantInt::get(Idx->getType(), SecondFalseElement); in foldCmpLoadFromIndexedGlobal()
369 Value *Offs = ConstantInt::get(Idx->getType(), -FirstTrueElement); in foldCmpLoadFromIndexedGlobal()
374 ConstantInt::get(Idx->getType(), TrueRangeEnd - FirstTrueElement + 1); in foldCmpLoadFromIndexedGlobal()
384 Value *Offs = ConstantInt::get(Idx->getType(), -FirstFalseElement); in foldCmpLoadFromIndexedGlobal()
389 ConstantInt::get(Idx->getType(), FalseRangeEnd - FirstFalseElement); in foldCmpLoadFromIndexedGlobal()
410 V = Builder.CreateLShr(ConstantInt::get(Ty, MagicBitvector), V); in foldCmpLoadFromIndexedGlobal()
411 V = Builder.CreateAnd(ConstantInt::get(Ty, 1), V); in foldCmpLoadFromIndexedGlobal()
412 return new ICmpInst(ICmpInst::ICMP_NE, V, ConstantInt::get(Ty, 0)); in foldCmpLoadFromIndexedGlobal()
457 auto IsNonConst = [](Value *V) { return !isa<ConstantInt>(V); }; in canRewriteGEPAsOffset()
550 NewInsts[Base] = ConstantInt::getNullValue(IndexType); in rewriteGEPAsOffset()
573 if (isa<ConstantInt>(Op) && cast<ConstantInt>(Op)->isZero()) in rewriteGEPAsOffset()
806 ConstantInt::get(I.getType(), ICmpInst::isTrueWhenEqual(Cond))); in foldGEPICmp()
890 auto *Res = ConstantInt::get( in foldAllocaCmp()
922 Constant *R = ConstantInt::get(X->getType(), in foldICmpAddOpConst()
932 ConstantInt::get(X->getType(), -C)); in foldICmpAddOpConst()
944 ConstantInt::get(X->getType(), SMax - C)); in foldICmpAddOpConst()
955 ConstantInt::get(X->getType(), SMax - (C - 1))); in foldICmpAddOpConst()
989 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
992 return getICmp(I.ICMP_EQ, A, ConstantInt::getNullValue(A->getType())); in foldICmpShrConstConst()
1005 return getICmp(I.ICMP_UGE, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShrConstConst()
1006 return getICmp(I.ICMP_EQ, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShrConstConst()
1008 return getICmp(I.ICMP_EQ, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShrConstConst()
1014 auto *TorF = ConstantInt::get(I.getType(), I.getPredicate() == I.ICMP_NE); in foldICmpShrConstConst()
1040 ConstantInt::get(A->getType(), AP2.getBitWidth() - AP2TrailingZeros)); in foldICmpShlConstConst()
1043 return getICmp(I.ICMP_EQ, A, ConstantInt::getNullValue(A->getType())); in foldICmpShlConstConst()
1049 return getICmp(I.ICMP_EQ, A, ConstantInt::get(A->getType(), Shift)); in foldICmpShlConstConst()
1053 auto *TorF = ConstantInt::get(I.getType(), I.getPredicate() == I.ICMP_NE); in foldICmpShlConstConst()
1065 ConstantInt *CI2, ConstantInt *CI1, in processUGT_ADDCST_ADD()
1197 X, ConstantInt::getNullValue(XTy)); in foldSignBitTest()
1298 ConstantInt *CI, *CI2; // I = icmp ugt (add (add A, B), CI2), CI in foldICmpWithConstant()
1418 ConstantInt::get(V->getType(), 1)); in foldICmpTruncConstant()
1433 return new ICmpInst(NewPred, Y, ConstantInt::get(SrcTy, DstBits)); in foldICmpTruncConstant()
1438 return new ICmpInst(Pred, Y, ConstantInt::get(SrcTy, C.logBase2())); in foldICmpTruncConstant()
1446 ConstantInt::get(SrcTy, APInt::getLowBitsSet(SrcBits, DstBits)); in foldICmpTruncConstant()
1448 Constant *WideC = ConstantInt::get(SrcTy, C.zext(SrcBits)); in foldICmpTruncConstant()
1461 return new ICmpInst(Pred, X, ConstantInt::get(SrcTy, NewRHS)); in foldICmpTruncConstant()
1475 ConstantInt::getNullValue(SrcTy)) in foldICmpTruncConstant()
1477 ConstantInt::getAllOnesValue(SrcTy)); in foldICmpTruncConstant()
1565 ConstantInt::getAllOnesValue(X->getType())); in foldICmpXorConstant()
1568 ConstantInt::getNullValue(X->getType())); in foldICmpXorConstant()
1575 return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), C ^ *XorC)); in foldICmpXorConstant()
1582 return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), C ^ *XorC)); in foldICmpXorConstant()
1599 ConstantInt::get(X->getType(), ~C)); in foldICmpXorConstant()
1603 ConstantInt::get(X->getType(), ~C)); in foldICmpXorConstant()
1633 Value *Add = Builder.CreateAdd(X, ConstantInt::get(XType, PowerOf2)); in foldICmpXorShiftConst()
1636 return new ICmpInst(Pred, Add, ConstantInt::get(XType, Bound)); in foldICmpXorShiftConst()
1696 return replaceInstUsesWith(Cmp, ConstantInt::getFalse(Cmp.getType())); in foldICmpAndShift()
1698 return replaceInstUsesWith(Cmp, ConstantInt::getTrue(Cmp.getType())); in foldICmpAndShift()
1701 Shift->getOperand(0), ConstantInt::get(And->getType(), NewAndCst)); in foldICmpAndShift()
1703 NewAnd, ConstantInt::get(And->getType(), NewCmpCst)); in foldICmpAndShift()
1765 Constant *NegBOC = ConstantInt::get(And->getType(), -NewC2); in foldICmpAndConstConst()
1788 Constant *ZextC1 = ConstantInt::get(WideType, C1.zext(WideScalarBits)); in foldICmpAndConstConst()
1789 Constant *ZextC2 = ConstantInt::get(WideType, C2->zext(WideScalarBits)); in foldICmpAndConstConst()
1849 return new ICmpInst(NewPred, X, ConstantInt::getNullValue(X->getType())); in foldICmpAndConstant()
1854 Constant *MinSignedC = ConstantInt::get( in foldICmpAndConstant()
1867 if (auto *C2 = dyn_cast<ConstantInt>(Y)) in foldICmpAndConstant()
1997 ConstantInt::get(V->getType(), 1)); in foldICmpOrConstant()
2017 Constant *NewC = ConstantInt::get(Or->getType(), C ^ (*MaskC)); in foldICmpOrConstant()
2029 Constant *NewC = ConstantInt::get(X->getType(), TrueIfSigned ? 1 : 0); in foldICmpOrConstant()
2042 return new ICmpInst(Pred, X, ConstantInt::getNullValue(X->getType())); in foldICmpOrConstant()
2050 ConstantInt::getNullValue(X->getType())); in foldICmpOrConstant()
2065 Builder.CreateICmp(Pred, P, ConstantInt::getNullValue(P->getType())); in foldICmpOrConstant()
2067 Builder.CreateICmp(Pred, Q, ConstantInt::getNullValue(Q->getType())); in foldICmpOrConstant()
2091 return new ICmpInst(Pred, X, ConstantInt::getNullValue(MulTy)); in foldICmpMulConstant()
2104 return new ICmpInst(Pred, X, ConstantInt::getNullValue(MulTy)); in foldICmpMulConstant()
2115 Constant *NewC = ConstantInt::get(MulTy, C.sdiv(*MulC)); in foldICmpMulConstant()
2127 Constant *NewC = ConstantInt::get(MulTy, C.udiv(*MulC)); in foldICmpMulConstant()
2146 NewC = ConstantInt::get( in foldICmpMulConstant()
2151 NewC = ConstantInt::get( in foldICmpMulConstant()
2156 NewC = ConstantInt::get( in foldICmpMulConstant()
2161 NewC = ConstantInt::get( in foldICmpMulConstant()
2194 return new ICmpInst(Pred, Y, ConstantInt::get(ShiftType, CLog2)); in foldICmpShlOne()
2196 Constant *BitWidthMinusOne = ConstantInt::get(ShiftType, TypeBits - 1); in foldICmpShlOne()
2267 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2272 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2281 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2292 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2297 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2306 return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC)); in foldICmpShlConstant()
2312 Constant *Mask = ConstantInt::get( in foldICmpShlConstant()
2316 Constant *LShrC = ConstantInt::get(ShType, C.lshr(*ShiftAmt)); in foldICmpShlConstant()
2324 Constant *Mask = ConstantInt::get( in foldICmpShlConstant()
2366 ConstantInt::get(TruncTy, C.ashr(*ShiftAmt).trunc(TypeBits - Amt)); in foldICmpShlConstant()
2397 ConstantInt::getNullValue(X->getType())); in foldICmpShrConstant()
2410 Constant *NewC = ConstantInt::get(Shr->getType(), CmpLZ - ShiftLZ); in foldICmpShrConstant()
2440 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2447 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2456 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2466 ConstantInt::getNullValue(ShrTy)); in foldICmpShrConstant()
2470 ConstantInt::getAllOnesValue(ShrTy)); in foldICmpShrConstant()
2479 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2485 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC)); in foldICmpShrConstant()
2504 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, C << ShAmtVal)); in foldICmpShrConstant()
2510 ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal))); in foldICmpShrConstant()
2513 ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal) - 1)); in foldICmpShrConstant()
2520 Constant *Mask = ConstantInt::get(ShrTy, Val); in foldICmpShrConstant()
2522 return new ICmpInst(Pred, And, ConstantInt::get(ShrTy, C << ShAmtVal)); in foldICmpShrConstant()
2560 Constant *MaskC = ConstantInt::get(Ty, SignMask | (*DivisorC - 1)); in foldICmpSRemConstant()
2564 return new ICmpInst(Pred, And, ConstantInt::get(Ty, C)); in foldICmpSRemConstant()
2570 return new ICmpInst(ICmpInst::ICMP_SGT, And, ConstantInt::getNullValue(Ty)); in foldICmpSRemConstant()
2575 return new ICmpInst(ICmpInst::ICMP_UGT, And, ConstantInt::get(Ty, SignMask)); in foldICmpSRemConstant()
2598 ConstantInt::get(Ty, C2->udiv(C + 1))); in foldICmpUDivConstant()
2605 ConstantInt::get(Ty, C2->udiv(C))); in foldICmpUDivConstant()
2631 Value *XBig = Builder.CreateICmp(Pred, X, ConstantInt::get(Ty, C)); in foldICmpDivConstant()
2632 Value *YOne = Builder.CreateICmp(Pred, Y, ConstantInt::get(Ty, 1)); in foldICmpDivConstant()
2755 X, ConstantInt::get(Ty, LoBound)); in foldICmpDivConstant()
2758 X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2766 X, ConstantInt::get(Ty, LoBound)); in foldICmpDivConstant()
2769 X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2778 return new ICmpInst(Pred, X, ConstantInt::get(Ty, LoBound)); in foldICmpDivConstant()
2786 return new ICmpInst(ICmpInst::ICMP_UGE, X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2787 return new ICmpInst(ICmpInst::ICMP_SGE, X, ConstantInt::get(Ty, HiBound)); in foldICmpDivConstant()
2806 ConstantExpr::getSub(SubC, ConstantInt::get(Ty, C))); in foldICmpSubConstant()
2818 return new ICmpInst(SwappedPred, Y, ConstantInt::get(Ty, SubResult)); in foldICmpSubConstant()
2873 Value *Add = Builder.CreateAdd(Y, ConstantInt::get(Ty, ~(*C2)), "notsub", in foldICmpSubConstant()
2875 return new ICmpInst(SwappedPred, Add, ConstantInt::get(Ty, ~C)); in foldICmpSubConstant()
2985 return new ICmpInst(Pred, X, ConstantInt::get(Ty, NewC)); in foldICmpAddConstant()
2993 return new ICmpInst(ICmpInst::ICMP_SLT, X, ConstantInt::get(Ty, Upper)); in foldICmpAddConstant()
2995 return new ICmpInst(ICmpInst::ICMP_SGE, X, ConstantInt::get(Ty, Lower)); in foldICmpAddConstant()
2998 return new ICmpInst(ICmpInst::ICMP_ULT, X, ConstantInt::get(Ty, Upper)); in foldICmpAddConstant()
3000 return new ICmpInst(ICmpInst::ICMP_UGE, X, ConstantInt::get(Ty, Lower)); in foldICmpAddConstant()
3011 return new ICmpInst(ICmpInst::ICMP_SLT, X, ConstantInt::get(Ty, -(*C2))); in foldICmpAddConstant()
3015 return new ICmpInst(ICmpInst::ICMP_SGT, X, ConstantInt::get(Ty, ~(*C2))); in foldICmpAddConstant()
3019 return new ICmpInst(ICmpInst::ICMP_ULT, X, ConstantInt::get(Ty, SMax - C)); in foldICmpAddConstant()
3023 return new ICmpInst(ICmpInst::ICMP_UGT, X, ConstantInt::get(Ty, C ^ SMax)); in foldICmpAddConstant()
3029 return new ICmpInst(ICmpInst::ICMP_ULE, X, ConstantInt::get(Ty, C)); in foldICmpAddConstant()
3054 Builder.CreateAdd(X, ConstantInt::get(Ty, *C2 - C - 1)), in foldICmpAddConstant()
3055 ConstantInt::get(Ty, ~C)); in foldICmpAddConstant()
3061 Value *&RHS, ConstantInt *&Less, in matchThreeWayIntCompare()
3062 ConstantInt *&Equal, in matchThreeWayIntCompare()
3063 ConstantInt *&Greater) { in matchThreeWayIntCompare()
3116 ConstantInt *C) { in foldICmpSelectConstant()
3125 ConstantInt *C1LessThan, *C2Equal, *C3GreaterThan; in foldICmpSelectConstant()
3190 return new ICmpInst(Pred, X, ConstantInt::getNullValue(X->getType())); in foldICmpBitCast()
3194 return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), 1)); in foldICmpBitCast()
3199 ConstantInt::getAllOnesValue(X->getType())); in foldICmpBitCast()
3207 return new ICmpInst(Pred, X, ConstantInt::getNullValue(X->getType())); in foldICmpBitCast()
3231 ConstantInt::getNullValue(NewType)); in foldICmpBitCast()
3234 ConstantInt::getAllOnesValue(NewType)); in foldICmpBitCast()
3256 return new ICmpInst(Pred, Cast, ConstantInt::getNullValue(DstType)); in foldICmpBitCast()
3269 return new ICmpInst(Pred, NewCast, ConstantInt::getNullValue(NewType)); in foldICmpBitCast()
3295 Value *NewC = ConstantInt::get(EltTy, C->trunc(EltTy->getBitWidth())); in foldICmpBitCast()
3317 if (auto *ConstRHS = dyn_cast<ConstantInt>(Cmp.getOperand(1))) in foldICmpInstWithConstant()
3440 Builder.CreateMul(BOp1, ConstantInt::get(BO->getType(), C)); in foldICmpBinOpEqualityWithConstant()
3507 return new ICmpInst(Pred, II->getArgOperand(0), ConstantInt::get(Ty, C)); in foldICmpEqIntrinsicWithConstant()
3513 ConstantInt::get(Ty, C.byteSwap())); in foldICmpEqIntrinsicWithConstant()
3518 ConstantInt::get(Ty, C.reverseBits())); in foldICmpEqIntrinsicWithConstant()
3525 ConstantInt::getNullValue(Ty)); in foldICmpEqIntrinsicWithConstant()
3539 ConstantInt::get(Ty, Mask2)); in foldICmpEqIntrinsicWithConstant()
3565 ? ConstantInt::get(Ty, C.rotr(*RotAmtC)) in foldICmpEqIntrinsicWithConstant()
3566 : ConstantInt::get(Ty, C.rotl(*RotAmtC))); in foldICmpEqIntrinsicWithConstant()
3820 Builder.CreateAdd(Op0, ConstantInt::get(Op1->getType(), EquivOffset)), in foldICmpUSubSatOrUAddSatWithConstant()
3821 ConstantInt::get(Op1->getType(), EquivInt)); in foldICmpUSubSatOrUAddSatWithConstant()
3858 ConstantInt::getAllOnesValue(Ty)); in foldICmpIntrinsicWithConstant()
3862 ConstantInt::getAllOnesValue(Ty)); in foldICmpIntrinsicWithConstant()
3871 II->getArgOperand(0), ConstantInt::get(Ty, Limit)); in foldICmpIntrinsicWithConstant()
3879 II->getArgOperand(0), ConstantInt::get(Ty, Limit)); in foldICmpIntrinsicWithConstant()
3893 ConstantInt::getNullValue(Ty)); in foldICmpIntrinsicWithConstant()
3901 ConstantInt::getNullValue(Ty)); in foldICmpIntrinsicWithConstant()
3973 return ConstantInt::get(I.getType(), *Impl); in foldSelectICmp()
3977 ConstantInt *CI = nullptr; in foldSelectICmp()
3980 CI = dyn_cast<ConstantInt>(Op1); in foldSelectICmp()
3984 CI = dyn_cast<ConstantInt>(Op2); in foldSelectICmp()
4184 Value *T0 = Builder.CreateAdd(X, ConstantInt::get(XType, AddCst)); in foldICmpWithTruncSignExtendedVal()
4186 Value *T1 = Builder.CreateICmp(DstPred, T0, ConstantInt::get(XType, ICmpCst)); in foldICmpWithTruncSignExtendedVal()
4466 ConstantInt::get(Ty, APInt::getSignedMaxValue(BitWidth)); in foldICmpXNegX()
4620 Constant *Zero = ConstantInt::getNullValue(Op1->getType()); in foldICmpBinOp()
4629 Constant *Zero = ConstantInt::getNullValue(Op1->getType()); in foldICmpBinOp()
4912 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpBinOp()
4914 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpBinOp()
4965 Constant *Mask = ConstantInt::get( in foldICmpBinOp()
5085 return replaceInstUsesWith(I, ConstantInt::getBool(I.getType(), *CmpYZ)); in foldICmpWithMinMax()
5125 I, ConstantInt::getBool(I.getType(), Pred == ICmpInst::ICMP_NE)); in foldICmpWithMinMax()
5152 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpWithMinMax()
5175 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpWithMinMax()
5232 ConstantInt::get(Ty, 2)) in foldICmpPow2Test()
5234 ConstantInt::get(Ty, 1)); in foldICmpPow2Test()
5255 ConstantInt *C1, *C2; in foldICmpEquality()
5365 return new ICmpInst(NewPred, Xor, ConstantInt::get(A->getType(), CmpVal)); in foldICmpEquality()
5370 ConstantInt *Cst1; in foldICmpEquality()
5421 Value *Add = Builder.CreateAdd(A, ConstantInt::get(A->getType(), C)); in foldICmpEquality()
5424 Add, ConstantInt::get(A->getType(), C.shl(1))); in foldICmpEquality()
5434 ConstantInt::getNullValue(Op0->getType())); in foldICmpEquality()
5439 ConstantInt::getNullValue(Op1->getType())); in foldICmpEquality()
5485 : ConstantInt::getNullValue(A->getType())); in foldICmpEquality()
5508 Constant *Zero = ConstantInt::getNullValue(X->getType()); in foldICmpWithTrunc()
5516 Constant *MaskC = ConstantInt::get(X->getType(), C->zext(SrcBits)); in foldICmpWithTrunc()
5524 Constant *MaskC = ConstantInt::get(X->getType(), (*C + 1).zext(SrcBits)); in foldICmpWithTrunc()
5649 if (IsSignedCmp || !IsSignedExt || !isa<ConstantInt>(C)) in foldICmpWithZextOrSext()
5773 Overflow = ConstantInt::getFalse(OverflowTy); in OptimizeOverflowCheck()
5784 Overflow = ConstantInt::getTrue(OverflowTy); in OptimizeOverflowCheck()
5789 Overflow = ConstantInt::getFalse(OverflowTy); in OptimizeOverflowCheck()
5865 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) { in processUMulZExtIdiom()
5938 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in processUMulZExtIdiom()
6186 ConstantInt::get(Op1->getType(), *CmpC - 1)); in foldICmpUsingKnownBits()
6203 ConstantInt::get(Op1->getType(), *CmpC + 1)); in foldICmpUsingKnownBits()
6219 ConstantInt::get(Op1->getType(), *CmpC - 1)); in foldICmpUsingKnownBits()
6230 ConstantInt::get(Op1->getType(), *CmpC + 1)); in foldICmpUsingKnownBits()
6246 I, ConstantInt::getBool(I.getType(), Pred == CmpInst::ICMP_NE)); in foldICmpUsingKnownBits()
6272 auto *CmpC = ConstantInt::get(XTy, Log2C2 - Log2C1); in foldICmpUsingKnownBits()
6284 ConstantInt::getNullValue(Op1->getType())); in foldICmpUsingKnownBits()
6289 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6291 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6296 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6298 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6303 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6305 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6310 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6312 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6316 assert(!isa<ConstantInt>(Op1) && "ICMP_SGE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6318 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6320 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6325 assert(!isa<ConstantInt>(Op1) && "ICMP_SLE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6327 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6329 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6334 assert(!isa<ConstantInt>(Op1) && "ICMP_UGE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6336 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6338 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6343 assert(!isa<ConstantInt>(Op1) && "ICMP_ULE with ConstantInt not folded!"); in foldICmpUsingKnownBits()
6345 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in foldICmpUsingKnownBits()
6347 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in foldICmpUsingKnownBits()
6396 Pred1, X, ConstantInt::getSigned(X->getType(), IsSExt ? -1 : 1)); in foldICmpUsingBoolRange()
6406 I, ConstantInt::getBool(I.getType(), Pred1 == ICmpInst::ICMP_NE)); in foldICmpUsingBoolRange()
6421 I, ConstantInt::getBool(I.getType(), Pred1 == ICmpInst::ICMP_NE)); in foldICmpUsingBoolRange()
6442 ConstantInt::getSigned(X->getType(), Pred2 == ICmpInst::ICMP_NE in foldICmpUsingBoolRange()
6466 auto ConstantIsOk = [WillIncrement, IsSigned](ConstantInt *C) { in getFlippedStrictnessPredicateAndConstant()
6471 if (auto *CI = dyn_cast<ConstantInt>(C)) { in getFlippedStrictnessPredicateAndConstant()
6487 auto *CI = dyn_cast<ConstantInt>(Elt); in getFlippedStrictnessPredicateAndConstant()
6497 auto *CI = dyn_cast_or_null<ConstantInt>(SplatC); in getFlippedStrictnessPredicateAndConstant()
6518 Constant *OneOrNegOne = ConstantInt::get(Type, WillIncrement ? 1 : -1, true); in getFlippedStrictnessPredicateAndConstant()
6905 return replaceInstUsesWith(CxtI, ConstantInt::getTrue(CxtI.getType())); in foldICmpCommutative()
6908 return replaceInstUsesWith(CxtI, ConstantInt::getFalse(CxtI.getType())); in foldICmpCommutative()
6916 X, ConstantInt::get(X->getType(), SMin + 1))); in foldICmpCommutative()
6925 X, ConstantInt::get(X->getType(), SMin))); in foldICmpCommutative()
7733 Value *MaskX = Builder.CreateAnd(X, ConstantInt::get(IntTy, SignMask)); in visitFCmpInst()
7734 return new ICmpInst(IntPred, MaskX, ConstantInt::getNullValue(IntTy)); in visitFCmpInst()
7797 return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType())); in visitFCmpInst()
7808 return replaceInstUsesWith(I, ConstantInt::getTrue(I.getType())); in visitFCmpInst()
7843 ConstantInt::getNullValue(IntType)); in visitFCmpInst()