Lines Matching defs:MaxRecurse
68 const SimplifyQuery &Q, unsigned MaxRecurse);
81 unsigned MaxRecurse);
154 const SimplifyQuery &Q, unsigned MaxRecurse,
156 Value *SimplifiedCmp = simplifyCmpInst(Pred, LHS, RHS, Q, MaxRecurse);
172 unsigned MaxRecurse) {
173 return simplifyCmpSelCase(Pred, LHS, RHS, Cond, Q, MaxRecurse,
181 unsigned MaxRecurse) {
182 return simplifyCmpSelCase(Pred, LHS, RHS, Cond, Q, MaxRecurse,
191 unsigned MaxRecurse) {
199 if (Value *V = simplifyAndInst(Cond, TCmp, Q, MaxRecurse))
204 if (Value *V = simplifyOrInst(Cond, FCmp, Q, MaxRecurse))
210 Cond, Constant::getAllOnesValue(Cond->getType()), Q, MaxRecurse))
240 const SimplifyQuery &Q, unsigned MaxRecurse) {
246 simplifyBinOp(Opcode, B0, OtherOp, Q.getWithoutUndef(), MaxRecurse);
250 simplifyBinOp(Opcode, B1, OtherOp, Q.getWithoutUndef(), MaxRecurse);
262 Value *S = simplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse);
276 unsigned MaxRecurse) {
278 if (!MaxRecurse--)
281 if (Value *V = expandBinOp(Opcode, L, R, OpcodeToExpand, Q, MaxRecurse))
283 if (Value *V = expandBinOp(Opcode, R, L, OpcodeToExpand, Q, MaxRecurse))
293 unsigned MaxRecurse) {
297 if (!MaxRecurse--)
310 if (Value *V = simplifyBinOp(Opcode, B, C, Q, MaxRecurse)) {
316 if (Value *W = simplifyBinOp(Opcode, A, V, Q, MaxRecurse)) {
330 if (Value *V = simplifyBinOp(Opcode, A, B, Q, MaxRecurse)) {
336 if (Value *W = simplifyBinOp(Opcode, V, C, Q, MaxRecurse)) {
354 if (Value *V = simplifyBinOp(Opcode, C, A, Q, MaxRecurse)) {
360 if (Value *W = simplifyBinOp(Opcode, V, B, Q, MaxRecurse)) {
374 if (Value *V = simplifyBinOp(Opcode, C, A, Q, MaxRecurse)) {
380 if (Value *W = simplifyBinOp(Opcode, B, V, Q, MaxRecurse)) {
396 unsigned MaxRecurse) {
398 if (!MaxRecurse--)
413 TV = simplifyBinOp(Opcode, SI->getTrueValue(), RHS, Q, MaxRecurse);
414 FV = simplifyBinOp(Opcode, SI->getFalseValue(), RHS, Q, MaxRecurse);
416 TV = simplifyBinOp(Opcode, LHS, SI->getTrueValue(), Q, MaxRecurse);
417 FV = simplifyBinOp(Opcode, LHS, SI->getFalseValue(), Q, MaxRecurse);
475 unsigned MaxRecurse) {
477 if (!MaxRecurse--)
493 Value *TCmp = simplifyCmpSelTrueCase(Pred, TV, RHS, Cond, Q, MaxRecurse);
498 Value *FCmp = simplifyCmpSelFalseCase(Pred, FV, RHS, Cond, Q, MaxRecurse);
510 return handleOtherCmpSelSimplifications(TCmp, FCmp, Cond, Q, MaxRecurse);
521 unsigned MaxRecurse) {
523 if (!MaxRecurse--)
549 Q.getWithInstruction(InTI), MaxRecurse)
551 Q.getWithInstruction(InTI), MaxRecurse);
567 const SimplifyQuery &Q, unsigned MaxRecurse) {
569 if (!MaxRecurse--)
596 MaxRecurse);
636 const SimplifyQuery &Q, unsigned MaxRecurse) {
681 if (MaxRecurse && Op0->getType()->isIntOrIntVectorTy(1))
682 if (Value *V = simplifyXorInst(Op0, Op1, Q, MaxRecurse - 1))
687 simplifyAssociativeBinOp(Instruction::Add, Op0, Op1, Q, MaxRecurse))
754 const SimplifyQuery &Q, unsigned MaxRecurse) {
756 if (MaxRecurse != RecursionLimit)
788 const SimplifyQuery &Q, unsigned MaxRecurse) {
831 if (MaxRecurse && match(Op0, m_Add(m_Value(X), m_Value(Y)))) { // (X + Y) - Z
833 if (Value *V = simplifyBinOp(Instruction::Sub, Y, Z, Q, MaxRecurse - 1))
835 if (Value *W = simplifyBinOp(Instruction::Add, X, V, Q, MaxRecurse - 1)) {
841 if (Value *V = simplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse - 1))
843 if (Value *W = simplifyBinOp(Instruction::Add, Y, V, Q, MaxRecurse - 1)) {
853 if (MaxRecurse && match(Op1, m_Add(m_Value(Y), m_Value(Z)))) { // X - (Y + Z)
855 if (Value *V = simplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse - 1))
857 if (Value *W = simplifyBinOp(Instruction::Sub, V, Z, Q, MaxRecurse - 1)) {
863 if (Value *V = simplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse - 1))
865 if (Value *W = simplifyBinOp(Instruction::Sub, V, Y, Q, MaxRecurse - 1)) {
875 if (MaxRecurse && match(Op1, m_Sub(m_Value(X), m_Value(Y)))) // Z - (X - Y)
877 if (Value *V = simplifyBinOp(Instruction::Sub, Z, X, Q, MaxRecurse - 1))
879 if (Value *W = simplifyBinOp(Instruction::Add, V, Y, Q, MaxRecurse - 1)) {
886 if (MaxRecurse && match(Op0, m_Trunc(m_Value(X))) &&
890 if (Value *V = simplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse - 1))
893 Q, MaxRecurse - 1))
904 if (MaxRecurse && Op0->getType()->isIntOrIntVectorTy(1))
905 if (Value *V = simplifyXorInst(Op0, Op1, Q, MaxRecurse - 1))
917 if (Value *V = simplifyByDomEq(Instruction::Sub, Op0, Op1, Q, MaxRecurse))
931 const SimplifyQuery &Q, unsigned MaxRecurse) {
963 if (MaxRecurse)
964 if (Value *V = simplifyAndInst(Op0, Op1, Q, MaxRecurse - 1))
970 simplifyAssociativeBinOp(Instruction::Mul, Op0, Op1, Q, MaxRecurse))
975 Instruction::Add, Q, MaxRecurse))
982 threadBinOpOverSelect(Instruction::Mul, Op0, Op1, Q, MaxRecurse))
989 threadBinOpOverPHI(Instruction::Mul, Op0, Op1, Q, MaxRecurse))
1004 const SimplifyQuery &Q, unsigned MaxRecurse) {
1005 Value *V = simplifyICmpInst(Pred, LHS, RHS, Q, MaxRecurse);
1013 unsigned MaxRecurse, bool IsSigned) {
1015 if (!MaxRecurse--)
1038 if (isICmpTrue(CmpInst::ICMP_SLT, Y, NegDividendC, Q, MaxRecurse) ||
1039 isICmpTrue(CmpInst::ICMP_SGT, Y, PosDividendC, Q, MaxRecurse))
1047 return isICmpTrue(CmpInst::ICMP_NE, X, Y, Q, MaxRecurse);
1054 if (isICmpTrue(CmpInst::ICMP_SGT, X, NegDivisorC, Q, MaxRecurse) &&
1055 isICmpTrue(CmpInst::ICMP_SLT, X, PosDivisorC, Q, MaxRecurse))
1073 return isICmpTrue(ICmpInst::ICMP_ULT, X, Y, Q, MaxRecurse);
1080 unsigned MaxRecurse) {
1163 if (isDivZero(Op0, Op1, Q, MaxRecurse, IsSigned))
1166 if (Value *V = simplifyByDomEq(Opcode, Op0, Op1, Q, MaxRecurse))
1172 if (Value *V = threadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse))
1178 if (Value *V = threadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse))
1187 unsigned MaxRecurse) {
1191 if (Value *V = simplifyDivRem(Opcode, Op0, Op1, Q, MaxRecurse))
1221 const SimplifyQuery &Q, unsigned MaxRecurse) {
1225 if (Value *V = simplifyDivRem(Opcode, Op0, Op1, Q, MaxRecurse))
1258 const SimplifyQuery &Q, unsigned MaxRecurse) {
1263 return simplifyDiv(Instruction::SDiv, Op0, Op1, IsExact, Q, MaxRecurse);
1274 const SimplifyQuery &Q, unsigned MaxRecurse) {
1275 return simplifyDiv(Instruction::UDiv, Op0, Op1, IsExact, Q, MaxRecurse);
1286 unsigned MaxRecurse) {
1297 return simplifyRem(Instruction::SRem, Op0, Op1, Q, MaxRecurse);
1307 unsigned MaxRecurse) {
1308 return simplifyRem(Instruction::URem, Op0, Op1, Q, MaxRecurse);
1349 unsigned MaxRecurse) {
1376 if (Value *V = threadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse))
1382 if (Value *V = threadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse))
1419 const SimplifyQuery &Q, unsigned MaxRecurse) {
1421 simplifyShift(Opcode, Op0, Op1, /*IsNSW*/ false, Q, MaxRecurse))
1447 const SimplifyQuery &Q, unsigned MaxRecurse) {
1449 simplifyShift(Instruction::Shl, Op0, Op1, IsNSW, Q, MaxRecurse))
1488 const SimplifyQuery &Q, unsigned MaxRecurse) {
1490 MaxRecurse))
1525 const SimplifyQuery &Q, unsigned MaxRecurse) {
1527 MaxRecurse))
1942 unsigned MaxRecurse);
1946 unsigned MaxRecurse) {
1983 /* DropFlags */ nullptr, MaxRecurse))
1987 /* DropFlags */ nullptr, MaxRecurse))
2020 unsigned MaxRecurse) {
2063 simplifyAndOrWithICmpEq(Instruction::And, Op0, Op1, Q, MaxRecurse))
2072 unsigned MaxRecurse) {
2096 if (Value *Res = simplifyAndCommutative(Op0, Op1, Q, MaxRecurse))
2098 if (Value *Res = simplifyAndCommutative(Op1, Op0, Q, MaxRecurse))
2140 simplifyAssociativeBinOp(Instruction::And, Op0, Op1, Q, MaxRecurse))
2145 Instruction::Or, Q, MaxRecurse))
2150 Instruction::Xor, Q, MaxRecurse))
2165 threadBinOpOverSelect(Instruction::And, Op0, Op1, Q, MaxRecurse))
2173 threadBinOpOverPHI(Instruction::And, Op0, Op1, Q, MaxRecurse))
2244 if (Value *V = simplifyByDomEq(Instruction::And, Op0, Op1, Q, MaxRecurse))
2347 unsigned MaxRecurse) {
2417 simplifyAndOrWithICmpEq(Instruction::Or, Op0, Op1, Q, MaxRecurse))
2420 simplifyAndOrWithICmpEq(Instruction::Or, Op1, Op0, Q, MaxRecurse))
2436 simplifyAssociativeBinOp(Instruction::Or, Op0, Op1, Q, MaxRecurse))
2441 Instruction::And, Q, MaxRecurse))
2456 threadBinOpOverSelect(Instruction::Or, Op0, Op1, Q, MaxRecurse))
2489 if (Value *V = threadBinOpOverPHI(Instruction::Or, Op0, Op1, Q, MaxRecurse))
2518 if (Value *V = simplifyByDomEq(Instruction::Or, Op0, Op1, Q, MaxRecurse))
2531 unsigned MaxRecurse) {
2583 simplifyAssociativeBinOp(Instruction::Xor, Op0, Op1, Q, MaxRecurse))
2595 if (Value *V = simplifyByDomEq(Instruction::Xor, Op0, Op1, Q, MaxRecurse))
3084 unsigned MaxRecurse) {
3265 unsigned MaxRecurse) {
3268 if (MaxRecurse && (LBO || RBO)) {
3298 MaxRecurse - 1))
3305 C == LHS ? D : C, Q, MaxRecurse - 1))
3332 if (Value *V = simplifyICmpInst(Pred, Y, Z, Q, MaxRecurse - 1))
3338 if (Value *V = simplifyICmpWithBinOpOnLHS(Pred, LBO, RHS, Q, MaxRecurse))
3343 ICmpInst::getSwappedPredicate(Pred), RBO, LHS, Q, MaxRecurse))
3399 if (!MaxRecurse || !LBO || !RBO || LBO->getOpcode() != RBO->getOpcode())
3413 RBO->getOperand(1), Q, MaxRecurse - 1))
3460 RBO->getOperand(0), Q, MaxRecurse - 1))
3468 RBO->getOperand(0), Q, MaxRecurse - 1))
3475 RBO->getOperand(0), Q, MaxRecurse - 1))
3486 RBO->getOperand(0), Q, MaxRecurse - 1))
3499 unsigned MaxRecurse) {
3550 if (MaxRecurse)
3551 if (Value *V = simplifyICmpInst(EqP, A, B, Q, MaxRecurse - 1))
3564 if (MaxRecurse)
3565 if (Value *V = simplifyICmpInst(InvEqP, A, B, Q, MaxRecurse - 1))
3624 if (MaxRecurse)
3625 if (Value *V = simplifyICmpInst(EqP, A, B, Q, MaxRecurse - 1))
3638 if (MaxRecurse)
3639 if (Value *V = simplifyICmpInst(InvEqP, A, B, Q, MaxRecurse - 1))
3753 const SimplifyQuery &Q, unsigned MaxRecurse) {
3815 if (MaxRecurse && isa<PtrToIntInst>(LI) &&
3821 Q, MaxRecurse - 1))
3827 MaxRecurse - 1))
3836 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType())
3840 RI->getOperand(0), Q, MaxRecurse - 1))
3873 if (AnyEq->isAllOnesValue() && MaxRecurse)
3875 SrcOp, Trunc, Q, MaxRecurse - 1))
3916 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType())
3919 MaxRecurse - 1))
3950 if (AnyEq->isAllOnesValue() && MaxRecurse)
3952 simplifyICmpInst(Pred, SrcOp, Trunc, Q, MaxRecurse - 1))
3984 if (MaxRecurse)
3987 MaxRecurse - 1))
3993 if (MaxRecurse)
3996 MaxRecurse - 1))
4013 if (Value *V = simplifyICmpWithBinOp(Pred, LHS, RHS, Q, MaxRecurse))
4016 if (Value *V = simplifyICmpWithMinMax(Pred, LHS, RHS, Q, MaxRecurse))
4049 if (Value *V = threadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse))
4055 if (Value *V = threadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse))
4070 unsigned MaxRecurse) {
4284 if (Value *V = threadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse))
4290 if (Value *V = threadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse))
4305 unsigned MaxRecurse) {
4313 if (!MaxRecurse--)
4350 InstOp, Op, RepOp, Q, AllowRefinement, DropFlags, MaxRecurse)) {
4436 ::simplifyInstructionWithOperands(I, NewOps, Q, MaxRecurse));
4624 unsigned MaxRecurse) {
4627 /* DropFlags */ nullptr, MaxRecurse) == TrueVal)
4631 /* DropFlags */ nullptr, MaxRecurse) == FalseVal)
4642 unsigned MaxRecurse) {
4726 Q, MaxRecurse))
4729 Q, MaxRecurse))
4739 MaxRecurse))
4742 MaxRecurse))
4751 MaxRecurse))
4754 MaxRecurse))
4796 const SimplifyQuery &Q, unsigned MaxRecurse) {
4956 simplifySelectWithICmpCond(Cond, TrueVal, FalseVal, Q, MaxRecurse))
5322 const SimplifyQuery &Q, unsigned MaxRecurse) {
5373 unsigned MaxRecurse) {
5374 if (!MaxRecurse--)
5396 SourceShuf->getMaskValue(RootElt), RootVec, MaxRecurse);
5419 unsigned MaxRecurse) {
5522 foldIdentityShuffles(i, Op0, Op1, Indices[i], RootVec, MaxRecurse);
5548 const SimplifyQuery &Q, unsigned MaxRecurse) {
5652 const SimplifyQuery &Q, unsigned MaxRecurse,
5718 const SimplifyQuery &Q, unsigned MaxRecurse,
5784 const SimplifyQuery &Q, unsigned MaxRecurse,
5833 const SimplifyQuery &Q, unsigned MaxRecurse,
5841 return simplifyFMAFMul(Op0, Op1, FMF, Q, MaxRecurse, ExBehavior, Rounding);
5978 unsigned MaxRecurse) {
5981 return simplifyFNegInst(Op, FastMathFlags(), Q, MaxRecurse);
5992 unsigned MaxRecurse) {
5995 return simplifyFNegInst(Op, FMF, Q, MaxRecurse);
5997 return simplifyUnOp(Opcode, Op, Q, MaxRecurse);
6013 const SimplifyQuery &Q, unsigned MaxRecurse) {
6017 MaxRecurse);
6020 MaxRecurse);
6023 MaxRecurse);
6025 return simplifySDivInst(LHS, RHS, /* IsExact */ false, Q, MaxRecurse);
6027 return simplifyUDivInst(LHS, RHS, /* IsExact */ false, Q, MaxRecurse);
6029 return simplifySRemInst(LHS, RHS, Q, MaxRecurse);
6031 return simplifyURemInst(LHS, RHS, Q, MaxRecurse);
6034 MaxRecurse);
6036 return simplifyLShrInst(LHS, RHS, /* IsExact */ false, Q, MaxRecurse);
6038 return simplifyAShrInst(LHS, RHS, /* IsExact */ false, Q, MaxRecurse);
6040 return simplifyAndInst(LHS, RHS, Q, MaxRecurse);
6042 return simplifyOrInst(LHS, RHS, Q, MaxRecurse);
6044 return simplifyXorInst(LHS, RHS, Q, MaxRecurse);
6046 return simplifyFAddInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse);
6048 return simplifyFSubInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse);
6050 return simplifyFMulInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse);
6052 return simplifyFDivInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse);
6054 return simplifyFRemInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse);
6065 unsigned MaxRecurse) {
6068 return simplifyFAddInst(LHS, RHS, FMF, Q, MaxRecurse);
6070 return simplifyFSubInst(LHS, RHS, FMF, Q, MaxRecurse);
6072 return simplifyFMulInst(LHS, RHS, FMF, Q, MaxRecurse);
6074 return simplifyFDivInst(LHS, RHS, FMF, Q, MaxRecurse);
6076 return simplifyBinOp(Opcode, LHS, RHS, Q, MaxRecurse);
6092 const SimplifyQuery &Q, unsigned MaxRecurse) {
6094 return simplifyICmpInst(Predicate, LHS, RHS, Q, MaxRecurse);
6095 return simplifyFCmpInst(Predicate, LHS, RHS, FastMathFlags(), Q, MaxRecurse);
7060 unsigned MaxRecurse) {
7077 return simplifyFNegInst(NewOps[0], I->getFastMathFlags(), Q, MaxRecurse);
7080 MaxRecurse);
7084 Q.IIQ.hasNoUnsignedWrap(cast<BinaryOperator>(I)), Q, MaxRecurse);
7087 MaxRecurse);
7091 Q.IIQ.hasNoUnsignedWrap(cast<BinaryOperator>(I)), Q, MaxRecurse);
7094 MaxRecurse);
7098 Q.IIQ.hasNoUnsignedWrap(cast<BinaryOperator>(I)), Q, MaxRecurse);
7102 MaxRecurse);
7106 MaxRecurse);
7109 MaxRecurse);
7111 return simplifySRemInst(NewOps[0], NewOps[1], Q, MaxRecurse);
7113 return simplifyURemInst(NewOps[0], NewOps[1], Q, MaxRecurse);
7116 MaxRecurse);
7120 Q.IIQ.hasNoUnsignedWrap(cast<BinaryOperator>(I)), Q, MaxRecurse);
7124 MaxRecurse);
7128 MaxRecurse);
7130 return simplifyAndInst(NewOps[0], NewOps[1], Q, MaxRecurse);
7132 return simplifyOrInst(NewOps[0], NewOps[1], Q, MaxRecurse);
7134 return simplifyXorInst(NewOps[0], NewOps[1], Q, MaxRecurse);
7137 NewOps[1], Q, MaxRecurse);
7140 NewOps[1], I->getFastMathFlags(), Q, MaxRecurse);
7142 return simplifySelectInst(NewOps[0], NewOps[1], NewOps[2], Q, MaxRecurse);
7148 MaxRecurse);
7153 MaxRecurse);
7160 MaxRecurse);
7163 return simplifyExtractElementInst(NewOps[0], NewOps[1], Q, MaxRecurse);
7168 MaxRecurse);
7182 MaxRecurse);