Lines Matching refs:MaxRecurse

141                           unsigned MaxRecurse) {  in ExpandBinOp()  argument
144 if (!MaxRecurse--) in ExpandBinOp()
153 if (Value *L = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse)) in ExpandBinOp()
154 if (Value *R = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) { in ExpandBinOp()
163 if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) { in ExpandBinOp()
176 if (Value *L = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse)) in ExpandBinOp()
177 if (Value *R = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse)) { in ExpandBinOp()
186 if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) { in ExpandBinOp()
199 const Query &Q, unsigned MaxRecurse) { in SimplifyAssociativeBinOp() argument
204 if (!MaxRecurse--) in SimplifyAssociativeBinOp()
217 if (Value *V = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
222 if (Value *W = SimplifyBinOp(Opcode, A, V, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
236 if (Value *V = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
241 if (Value *W = SimplifyBinOp(Opcode, V, C, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
259 if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
264 if (Value *W = SimplifyBinOp(Opcode, V, B, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
278 if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
283 if (Value *W = SimplifyBinOp(Opcode, B, V, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
298 const Query &Q, unsigned MaxRecurse) { in ThreadBinOpOverSelect() argument
300 if (!MaxRecurse--) in ThreadBinOpOverSelect()
315 TV = SimplifyBinOp(Opcode, SI->getTrueValue(), RHS, Q, MaxRecurse); in ThreadBinOpOverSelect()
316 FV = SimplifyBinOp(Opcode, SI->getFalseValue(), RHS, Q, MaxRecurse); in ThreadBinOpOverSelect()
318 TV = SimplifyBinOp(Opcode, LHS, SI->getTrueValue(), Q, MaxRecurse); in ThreadBinOpOverSelect()
319 FV = SimplifyBinOp(Opcode, LHS, SI->getFalseValue(), Q, MaxRecurse); in ThreadBinOpOverSelect()
371 unsigned MaxRecurse) { in ThreadCmpOverSelect() argument
373 if (!MaxRecurse--) in ThreadCmpOverSelect()
389 Value *TCmp = SimplifyCmpInst(Pred, TV, RHS, Q, MaxRecurse); in ThreadCmpOverSelect()
403 Value *FCmp = SimplifyCmpInst(Pred, FV, RHS, Q, MaxRecurse); in ThreadCmpOverSelect()
429 if (Value *V = SimplifyAndInst(Cond, TCmp, Q, MaxRecurse)) in ThreadCmpOverSelect()
434 if (Value *V = SimplifyOrInst(Cond, FCmp, Q, MaxRecurse)) in ThreadCmpOverSelect()
441 Q, MaxRecurse)) in ThreadCmpOverSelect()
452 const Query &Q, unsigned MaxRecurse) { in ThreadBinOpOverPHI() argument
454 if (!MaxRecurse--) in ThreadBinOpOverPHI()
477 SimplifyBinOp(Opcode, Incoming, RHS, Q, MaxRecurse) : in ThreadBinOpOverPHI()
478 SimplifyBinOp(Opcode, LHS, Incoming, Q, MaxRecurse); in ThreadBinOpOverPHI()
494 const Query &Q, unsigned MaxRecurse) { in ThreadCmpOverPHI() argument
496 if (!MaxRecurse--) in ThreadCmpOverPHI()
516 Value *V = SimplifyCmpInst(Pred, Incoming, RHS, Q, MaxRecurse); in ThreadCmpOverPHI()
530 const Query &Q, unsigned MaxRecurse) { in SimplifyAddInst() argument
564 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifyAddInst()
565 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyAddInst()
570 MaxRecurse)) in SimplifyAddInst()
662 const Query &Q, unsigned MaxRecurse) { in SimplifySubInst() argument
690 if (MaxRecurse && match(Op0, m_Add(m_Value(X), m_Value(Y)))) { // (X + Y) - Z in SimplifySubInst()
692 if (Value *V = SimplifyBinOp(Instruction::Sub, Y, Z, Q, MaxRecurse-1)) in SimplifySubInst()
694 if (Value *W = SimplifyBinOp(Instruction::Add, X, V, Q, MaxRecurse-1)) { in SimplifySubInst()
700 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1)) in SimplifySubInst()
702 if (Value *W = SimplifyBinOp(Instruction::Add, Y, V, Q, MaxRecurse-1)) { in SimplifySubInst()
712 if (MaxRecurse && match(Op1, m_Add(m_Value(Y), m_Value(Z)))) { // X - (Y + Z) in SimplifySubInst()
714 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1)) in SimplifySubInst()
716 if (Value *W = SimplifyBinOp(Instruction::Sub, V, Z, Q, MaxRecurse-1)) { in SimplifySubInst()
722 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1)) in SimplifySubInst()
724 if (Value *W = SimplifyBinOp(Instruction::Sub, V, Y, Q, MaxRecurse-1)) { in SimplifySubInst()
734 if (MaxRecurse && match(Op1, m_Sub(m_Value(X), m_Value(Y)))) // Z - (X - Y) in SimplifySubInst()
736 if (Value *V = SimplifyBinOp(Instruction::Sub, Z, X, Q, MaxRecurse-1)) in SimplifySubInst()
738 if (Value *W = SimplifyBinOp(Instruction::Add, V, Y, Q, MaxRecurse-1)) { in SimplifySubInst()
745 if (MaxRecurse && match(Op0, m_Trunc(m_Value(X))) && in SimplifySubInst()
749 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1)) in SimplifySubInst()
751 if (Value *W = SimplifyTruncInst(V, Op0->getType(), Q, MaxRecurse-1)) in SimplifySubInst()
762 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifySubInst()
763 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifySubInst()
789 const Query &Q, unsigned MaxRecurse) { in SimplifyFAddInst() argument
831 const Query &Q, unsigned MaxRecurse) { in SimplifyFSubInst() argument
869 unsigned MaxRecurse) { in SimplifyFMulInst() argument
895 unsigned MaxRecurse) { in SimplifyMulInst() argument
926 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifyMulInst()
927 if (Value *V = SimplifyAndInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyMulInst()
932 MaxRecurse)) in SimplifyMulInst()
937 Q, MaxRecurse)) in SimplifyMulInst()
944 MaxRecurse)) in SimplifyMulInst()
951 MaxRecurse)) in SimplifyMulInst()
995 const Query &Q, unsigned MaxRecurse) { in SimplifyDiv() argument
1066 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyDiv()
1072 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyDiv()
1081 unsigned MaxRecurse) { in SimplifySDivInst() argument
1082 if (Value *V = SimplifyDiv(Instruction::SDiv, Op0, Op1, Q, MaxRecurse)) in SimplifySDivInst()
1099 unsigned MaxRecurse) { in SimplifyUDivInst() argument
1100 if (Value *V = SimplifyDiv(Instruction::UDiv, Op0, Op1, Q, MaxRecurse)) in SimplifyUDivInst()
1160 const Query &Q, unsigned MaxRecurse) { in SimplifyRem() argument
1206 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRem()
1212 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRem()
1221 unsigned MaxRecurse) { in SimplifySRemInst() argument
1222 if (Value *V = SimplifyRem(Instruction::SRem, Op0, Op1, Q, MaxRecurse)) in SimplifySRemInst()
1239 unsigned MaxRecurse) { in SimplifyURemInst() argument
1240 if (Value *V = SimplifyRem(Instruction::URem, Op0, Op1, Q, MaxRecurse)) in SimplifyURemInst()
1312 const Query &Q, unsigned MaxRecurse) { in SimplifyShift() argument
1335 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1341 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1351 unsigned MaxRecurse) { in SimplifyRightShift() argument
1352 if (Value *V = SimplifyShift(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRightShift()
1381 const Query &Q, unsigned MaxRecurse) { in SimplifyShlInst() argument
1382 if (Value *V = SimplifyShift(Instruction::Shl, Op0, Op1, Q, MaxRecurse)) in SimplifyShlInst()
1408 const Query &Q, unsigned MaxRecurse) { in SimplifyLShrInst() argument
1410 MaxRecurse)) in SimplifyLShrInst()
1433 const Query &Q, unsigned MaxRecurse) { in SimplifyAShrInst() argument
1435 MaxRecurse)) in SimplifyAShrInst()
1560 unsigned MaxRecurse) { in SimplifyAndInst() argument
1626 MaxRecurse)) in SimplifyAndInst()
1631 Q, MaxRecurse)) in SimplifyAndInst()
1636 Q, MaxRecurse)) in SimplifyAndInst()
1643 MaxRecurse)) in SimplifyAndInst()
1650 MaxRecurse)) in SimplifyAndInst()
1719 unsigned MaxRecurse) { in SimplifyOrInst() argument
1784 MaxRecurse)) in SimplifyOrInst()
1789 MaxRecurse)) in SimplifyOrInst()
1796 MaxRecurse)) in SimplifyOrInst()
1838 if (Value *V = ThreadBinOpOverPHI(Instruction::Or, Op0, Op1, Q, MaxRecurse)) in SimplifyOrInst()
1855 unsigned MaxRecurse) { in SimplifyXorInst() argument
1886 MaxRecurse)) in SimplifyXorInst()
2133 const Query &Q, unsigned MaxRecurse) { in SimplifyICmpInst() argument
2432 if (MaxRecurse && isa<PtrToIntInst>(LI) && in SimplifyICmpInst()
2438 Q, MaxRecurse-1)) in SimplifyICmpInst()
2444 Q, MaxRecurse-1)) in SimplifyICmpInst()
2453 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst()
2457 MaxRecurse-1)) in SimplifyICmpInst()
2470 if (RExt == CI && MaxRecurse) in SimplifyICmpInst()
2472 SrcOp, Trunc, Q, MaxRecurse-1)) in SimplifyICmpInst()
2513 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst()
2516 Q, MaxRecurse-1)) in SimplifyICmpInst()
2529 if (RExt == CI && MaxRecurse) in SimplifyICmpInst()
2530 if (Value *V = SimplifyICmpInst(Pred, SrcOp, Trunc, Q, MaxRecurse-1)) in SimplifyICmpInst()
2561 if (MaxRecurse) in SimplifyICmpInst()
2564 Q, MaxRecurse-1)) in SimplifyICmpInst()
2570 if (MaxRecurse) in SimplifyICmpInst()
2573 Q, MaxRecurse-1)) in SimplifyICmpInst()
2593 if (MaxRecurse && (LBO || RBO)) { in SimplifyICmpInst()
2615 Q, MaxRecurse-1)) in SimplifyICmpInst()
2622 C == LHS ? D : C, Q, MaxRecurse-1)) in SimplifyICmpInst()
2648 if (Value *V = SimplifyICmpInst(Pred, Y, Z, Q, MaxRecurse-1)) in SimplifyICmpInst()
2815 if (MaxRecurse && LBO && RBO && LBO->getOpcode() == RBO->getOpcode() && in SimplifyICmpInst()
2829 RBO->getOperand(0), Q, MaxRecurse-1)) in SimplifyICmpInst()
2840 RBO->getOperand(0), Q, MaxRecurse-1)) in SimplifyICmpInst()
2893 if (MaxRecurse) in SimplifyICmpInst()
2894 if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
2907 if (MaxRecurse) in SimplifyICmpInst()
2908 if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
2963 if (MaxRecurse) in SimplifyICmpInst()
2964 if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
2977 if (MaxRecurse) in SimplifyICmpInst()
2978 if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
3084 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3090 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3109 unsigned MaxRecurse) { in SimplifyFCmpInst() argument
3209 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyFCmpInst()
3215 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyFCmpInst()
3234 unsigned MaxRecurse) { in SimplifyWithOpReplaced() argument
3258 if (MaxRecurse) { in SimplifyWithOpReplaced()
3261 MaxRecurse - 1); in SimplifyWithOpReplaced()
3264 MaxRecurse - 1); in SimplifyWithOpReplaced()
3270 if (MaxRecurse) { in SimplifyWithOpReplaced()
3273 MaxRecurse - 1); in SimplifyWithOpReplaced()
3276 MaxRecurse - 1); in SimplifyWithOpReplaced()
3318 unsigned MaxRecurse) { in SimplifySelectInst() argument
3416 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in SimplifySelectInst()
3418 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in SimplifySelectInst()
3421 if (SimplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in SimplifySelectInst()
3423 SimplifyWithOpReplaced(TrueVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in SimplifySelectInst()
3427 if (SimplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in SimplifySelectInst()
3429 SimplifyWithOpReplaced(TrueVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in SimplifySelectInst()
3432 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in SimplifySelectInst()
3434 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in SimplifySelectInst()
3702 const Query &Q, unsigned MaxRecurse) { in SimplifyBinOp() argument
3706 Q, MaxRecurse); in SimplifyBinOp()
3708 return SimplifyFAddInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3712 Q, MaxRecurse); in SimplifyBinOp()
3714 return SimplifyFSubInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3716 case Instruction::Mul: return SimplifyMulInst (LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3718 return SimplifyFMulInst (LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3719 case Instruction::SDiv: return SimplifySDivInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3720 case Instruction::UDiv: return SimplifyUDivInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3722 return SimplifyFDivInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3723 case Instruction::SRem: return SimplifySRemInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3724 case Instruction::URem: return SimplifyURemInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3726 return SimplifyFRemInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3729 Q, MaxRecurse); in SimplifyBinOp()
3731 return SimplifyLShrInst(LHS, RHS, /*isExact*/false, Q, MaxRecurse); in SimplifyBinOp()
3733 return SimplifyAShrInst(LHS, RHS, /*isExact*/false, Q, MaxRecurse); in SimplifyBinOp()
3734 case Instruction::And: return SimplifyAndInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3735 case Instruction::Or: return SimplifyOrInst (LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3736 case Instruction::Xor: return SimplifyXorInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3747 if (Value *V = SimplifyAssociativeBinOp(Opcode, LHS, RHS, Q, MaxRecurse)) in SimplifyBinOp()
3753 if (Value *V = ThreadBinOpOverSelect(Opcode, LHS, RHS, Q, MaxRecurse)) in SimplifyBinOp()
3759 if (Value *V = ThreadBinOpOverPHI(Opcode, LHS, RHS, Q, MaxRecurse)) in SimplifyBinOp()
3772 unsigned MaxRecurse) { in SimplifyFPBinOp() argument
3775 return SimplifyFAddInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
3777 return SimplifyFSubInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
3779 return SimplifyFMulInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
3781 return SimplifyBinOp(Opcode, LHS, RHS, Q, MaxRecurse); in SimplifyFPBinOp()
3805 const Query &Q, unsigned MaxRecurse) { in SimplifyCmpInst() argument
3807 return SimplifyICmpInst(Predicate, LHS, RHS, Q, MaxRecurse); in SimplifyCmpInst()
3808 return SimplifyFCmpInst(Predicate, LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyCmpInst()
3837 const Query &Q, unsigned MaxRecurse) { in SimplifyIntrinsic() argument
3892 const Query &Q, unsigned MaxRecurse) { in SimplifyCall() argument
3907 if (Value *Ret = SimplifyIntrinsic(F, ArgBegin, ArgEnd, Q, MaxRecurse)) in SimplifyCall()