Lines Matching refs:ICmp

1340   return ICmpInst::Create(Instruction::ICmp, Pred, Masked, Zero);  in foldIRemByPowerOfTwoToBitTest()
1369 return ICmpInst::Create(Instruction::ICmp, in foldSignBitTest()
3470 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_EQ, X, in foldICmpIntrinsicWithConstant()
3474 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_NE, X, in foldICmpIntrinsicWithConstant()
3483 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_ULT, in foldICmpIntrinsicWithConstant()
3491 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_UGT, in foldICmpIntrinsicWithConstant()
3504 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_EQ, in foldICmpIntrinsicWithConstant()
3512 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_NE, in foldICmpIntrinsicWithConstant()
4060 return ICmpInst::Create(Instruction::ICmp, Pred, X, in foldICmpXNegX()
4746 if (Instruction *ICmp = foldICmpIntrinsicWithIntrinsic(I)) in foldICmpEquality() local
4747 return ICmp; in foldICmpEquality()
4792 static Instruction *foldICmpWithTrunc(ICmpInst &ICmp, in foldICmpWithTrunc() argument
4794 ICmpInst::Predicate Pred = ICmp.getPredicate(); in foldICmpWithTrunc()
4795 Value *Op0 = ICmp.getOperand(0), *Op1 = ICmp.getOperand(1); in foldICmpWithTrunc()
4834 Instruction *InstCombinerImpl::foldICmpWithZextOrSext(ICmpInst &ICmp) { in foldICmpWithZextOrSext() argument
4835 assert(isa<CastInst>(ICmp.getOperand(0)) && "Expected cast for operand 0"); in foldICmpWithZextOrSext()
4836 auto *CastOp0 = cast<CastInst>(ICmp.getOperand(0)); in foldICmpWithZextOrSext()
4842 bool IsSignedCmp = ICmp.isSigned(); in foldICmpWithZextOrSext()
4846 if (match(ICmp.getOperand(1), m_ZExtOrSExt(m_Value(Y)))) { in foldICmpWithZextOrSext()
4847 bool IsZext0 = isa<ZExtOperator>(ICmp.getOperand(0)); in foldICmpWithZextOrSext()
4848 bool IsZext1 = isa<ZExtOperator>(ICmp.getOperand(1)); in foldICmpWithZextOrSext()
4854 if ((IsZext0 && isKnownNonNegative(X, DL, 0, &AC, &ICmp, &DT)) || in foldICmpWithZextOrSext()
4855 (IsZext1 && isKnownNonNegative(Y, DL, 0, &AC, &ICmp, &DT))) in foldICmpWithZextOrSext()
4865 if (!ICmp.getOperand(0)->hasOneUse() && !ICmp.getOperand(1)->hasOneUse()) in foldICmpWithZextOrSext()
4880 if (ICmp.isEquality()) in foldICmpWithZextOrSext()
4881 return new ICmpInst(ICmp.getPredicate(), X, Y); in foldICmpWithZextOrSext()
4886 return new ICmpInst(ICmp.getPredicate(), X, Y); in foldICmpWithZextOrSext()
4889 return new ICmpInst(ICmp.getUnsignedPredicate(), X, Y); in foldICmpWithZextOrSext()
4893 auto *C = dyn_cast<Constant>(ICmp.getOperand(1)); in foldICmpWithZextOrSext()
4906 if (ICmp.isEquality()) in foldICmpWithZextOrSext()
4907 return new ICmpInst(ICmp.getPredicate(), X, Res1); in foldICmpWithZextOrSext()
4912 return new ICmpInst(ICmp.getPredicate(), X, Res1); in foldICmpWithZextOrSext()
4915 return new ICmpInst(ICmp.getUnsignedPredicate(), X, Res1); in foldICmpWithZextOrSext()
4928 if (ICmp.getPredicate() == ICmpInst::ICMP_ULT) in foldICmpWithZextOrSext()
4933 assert(ICmp.getPredicate() == ICmpInst::ICMP_UGT && "ICmp should be folded!"); in foldICmpWithZextOrSext()
4938 Instruction *InstCombinerImpl::foldICmpWithCastOp(ICmpInst &ICmp) { in foldICmpWithCastOp() argument
4942 Value *SimplifiedOp0 = simplifyIntToPtrRoundTripCast(ICmp.getOperand(0)); in foldICmpWithCastOp()
4943 Value *SimplifiedOp1 = simplifyIntToPtrRoundTripCast(ICmp.getOperand(1)); in foldICmpWithCastOp()
4945 return new ICmpInst(ICmp.getPredicate(), in foldICmpWithCastOp()
4946 SimplifiedOp0 ? SimplifiedOp0 : ICmp.getOperand(0), in foldICmpWithCastOp()
4947 SimplifiedOp1 ? SimplifiedOp1 : ICmp.getOperand(1)); in foldICmpWithCastOp()
4949 auto *CastOp0 = dyn_cast<CastInst>(ICmp.getOperand(0)); in foldICmpWithCastOp()
4952 if (!isa<Constant>(ICmp.getOperand(1)) && !isa<CastInst>(ICmp.getOperand(1))) in foldICmpWithCastOp()
4971 if (auto *PtrToIntOp1 = dyn_cast<PtrToIntOperator>(ICmp.getOperand(1))) { in foldICmpWithCastOp()
4980 } else if (auto *RHSC = dyn_cast<Constant>(ICmp.getOperand(1))) { in foldICmpWithCastOp()
4985 return new ICmpInst(ICmp.getPredicate(), Op0Src, NewOp1); in foldICmpWithCastOp()
4988 if (Instruction *R = foldICmpWithTrunc(ICmp, Builder)) in foldICmpWithCastOp()
4991 return foldICmpWithZextOrSext(ICmp); in foldICmpWithCastOp()
5979 return CmpInst::Create(Instruction::ICmp, NewPred, NewX, Zero); in foldICmpWithHighBitMask()
6066 return ICmpInst::Create(Instruction::ICmp, I.getPredicate(), in foldICmpInvariantGroup()
6114 return ICmpInst::Create(Instruction::ICmp, OuterPred, LHS, RHS, in foldReductionIdiom()
6149 return CmpInst::Create(Instruction::ICmp, I.getPredicate(), V, Op1); in visitICmpInst()
6153 return CmpInst::Create(Instruction::ICmp, I.getPredicate(), V, Op1); in visitICmpInst()