Lines Matching refs:MaxRecurse
60 const SimplifyQuery &Q, unsigned MaxRecurse);
169 const SimplifyQuery &Q, unsigned MaxRecurse) { in ExpandBinOp() argument
171 if (!MaxRecurse--) in ExpandBinOp()
180 if (Value *L = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse)) in ExpandBinOp()
181 if (Value *R = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) { in ExpandBinOp()
190 if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) { in ExpandBinOp()
203 if (Value *L = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse)) in ExpandBinOp()
204 if (Value *R = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse)) { in ExpandBinOp()
213 if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) { in ExpandBinOp()
228 unsigned MaxRecurse) { in SimplifyAssociativeBinOp() argument
232 if (!MaxRecurse--) in SimplifyAssociativeBinOp()
245 if (Value *V = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
250 if (Value *W = SimplifyBinOp(Opcode, A, V, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
264 if (Value *V = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
269 if (Value *W = SimplifyBinOp(Opcode, V, C, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
287 if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
292 if (Value *W = SimplifyBinOp(Opcode, V, B, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
306 if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
311 if (Value *W = SimplifyBinOp(Opcode, B, V, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
327 unsigned MaxRecurse) { in ThreadBinOpOverSelect() argument
329 if (!MaxRecurse--) in ThreadBinOpOverSelect()
344 TV = SimplifyBinOp(Opcode, SI->getTrueValue(), RHS, Q, MaxRecurse); in ThreadBinOpOverSelect()
345 FV = SimplifyBinOp(Opcode, SI->getFalseValue(), RHS, Q, MaxRecurse); in ThreadBinOpOverSelect()
347 TV = SimplifyBinOp(Opcode, LHS, SI->getTrueValue(), Q, MaxRecurse); in ThreadBinOpOverSelect()
348 FV = SimplifyBinOp(Opcode, LHS, SI->getFalseValue(), Q, MaxRecurse); in ThreadBinOpOverSelect()
399 unsigned MaxRecurse) { in ThreadCmpOverSelect() argument
401 if (!MaxRecurse--) in ThreadCmpOverSelect()
417 Value *TCmp = SimplifyCmpInst(Pred, TV, RHS, Q, MaxRecurse); in ThreadCmpOverSelect()
431 Value *FCmp = SimplifyCmpInst(Pred, FV, RHS, Q, MaxRecurse); in ThreadCmpOverSelect()
457 if (Value *V = SimplifyAndInst(Cond, TCmp, Q, MaxRecurse)) in ThreadCmpOverSelect()
462 if (Value *V = SimplifyOrInst(Cond, FCmp, Q, MaxRecurse)) in ThreadCmpOverSelect()
469 Q, MaxRecurse)) in ThreadCmpOverSelect()
481 unsigned MaxRecurse) { in ThreadBinOpOverPHI() argument
483 if (!MaxRecurse--) in ThreadBinOpOverPHI()
506 SimplifyBinOp(Opcode, Incoming, RHS, Q, MaxRecurse) : in ThreadBinOpOverPHI()
507 SimplifyBinOp(Opcode, LHS, Incoming, Q, MaxRecurse); in ThreadBinOpOverPHI()
523 const SimplifyQuery &Q, unsigned MaxRecurse) { in ThreadCmpOverPHI() argument
525 if (!MaxRecurse--) in ThreadCmpOverPHI()
545 Value *V = SimplifyCmpInst(Pred, Incoming, RHS, Q, MaxRecurse); in ThreadCmpOverPHI()
573 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyAddInst() argument
615 if (MaxRecurse && Op0->getType()->isIntOrIntVectorTy(1)) in SimplifyAddInst()
616 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyAddInst()
621 MaxRecurse)) in SimplifyAddInst()
714 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifySubInst() argument
752 if (MaxRecurse && match(Op0, m_Add(m_Value(X), m_Value(Y)))) { // (X + Y) - Z in SimplifySubInst()
754 if (Value *V = SimplifyBinOp(Instruction::Sub, Y, Z, Q, MaxRecurse-1)) in SimplifySubInst()
756 if (Value *W = SimplifyBinOp(Instruction::Add, X, V, Q, MaxRecurse-1)) { in SimplifySubInst()
762 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1)) in SimplifySubInst()
764 if (Value *W = SimplifyBinOp(Instruction::Add, Y, V, Q, MaxRecurse-1)) { in SimplifySubInst()
774 if (MaxRecurse && match(Op1, m_Add(m_Value(Y), m_Value(Z)))) { // X - (Y + Z) in SimplifySubInst()
776 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1)) in SimplifySubInst()
778 if (Value *W = SimplifyBinOp(Instruction::Sub, V, Z, Q, MaxRecurse-1)) { in SimplifySubInst()
784 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1)) in SimplifySubInst()
786 if (Value *W = SimplifyBinOp(Instruction::Sub, V, Y, Q, MaxRecurse-1)) { in SimplifySubInst()
796 if (MaxRecurse && match(Op1, m_Sub(m_Value(X), m_Value(Y)))) // Z - (X - Y) in SimplifySubInst()
798 if (Value *V = SimplifyBinOp(Instruction::Sub, Z, X, Q, MaxRecurse-1)) in SimplifySubInst()
800 if (Value *W = SimplifyBinOp(Instruction::Add, V, Y, Q, MaxRecurse-1)) { in SimplifySubInst()
807 if (MaxRecurse && match(Op0, m_Trunc(m_Value(X))) && in SimplifySubInst()
811 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1)) in SimplifySubInst()
814 Q, MaxRecurse - 1)) in SimplifySubInst()
825 if (MaxRecurse && Op0->getType()->isIntOrIntVectorTy(1)) in SimplifySubInst()
826 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifySubInst()
849 unsigned MaxRecurse) { in SimplifyMulInst() argument
871 if (MaxRecurse && Op0->getType()->isIntOrIntVectorTy(1)) in SimplifyMulInst()
872 if (Value *V = SimplifyAndInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyMulInst()
877 MaxRecurse)) in SimplifyMulInst()
882 Q, MaxRecurse)) in SimplifyMulInst()
889 MaxRecurse)) in SimplifyMulInst()
896 MaxRecurse)) in SimplifyMulInst()
966 const SimplifyQuery &Q, unsigned MaxRecurse) { in isICmpTrue() argument
967 Value *V = SimplifyICmpInst(Pred, LHS, RHS, Q, MaxRecurse); in isICmpTrue()
975 unsigned MaxRecurse, bool IsSigned) { in isDivZero() argument
977 if (!MaxRecurse--) in isDivZero()
996 if (isICmpTrue(CmpInst::ICMP_SLT, Y, NegDividendC, Q, MaxRecurse) || in isDivZero()
997 isICmpTrue(CmpInst::ICMP_SGT, Y, PosDividendC, Q, MaxRecurse)) in isDivZero()
1005 return isICmpTrue(CmpInst::ICMP_NE, X, Y, Q, MaxRecurse); in isDivZero()
1012 if (isICmpTrue(CmpInst::ICMP_SGT, X, NegDivisorC, Q, MaxRecurse) && in isDivZero()
1013 isICmpTrue(CmpInst::ICMP_SLT, X, PosDivisorC, Q, MaxRecurse)) in isDivZero()
1021 return isICmpTrue(ICmpInst::ICMP_ULT, X, Y, Q, MaxRecurse); in isDivZero()
1026 const SimplifyQuery &Q, unsigned MaxRecurse) { in simplifyDiv() argument
1067 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in simplifyDiv()
1073 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in simplifyDiv()
1076 if (isDivZero(Op0, Op1, Q, MaxRecurse, IsSigned)) in simplifyDiv()
1084 const SimplifyQuery &Q, unsigned MaxRecurse) { in simplifyRem() argument
1109 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in simplifyRem()
1115 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in simplifyRem()
1119 if (isDivZero(Op0, Op1, Q, MaxRecurse, Opcode == Instruction::SRem)) in simplifyRem()
1128 unsigned MaxRecurse) { in SimplifySDivInst() argument
1133 return simplifyDiv(Instruction::SDiv, Op0, Op1, Q, MaxRecurse); in SimplifySDivInst()
1143 unsigned MaxRecurse) { in SimplifyUDivInst() argument
1144 return simplifyDiv(Instruction::UDiv, Op0, Op1, Q, MaxRecurse); in SimplifyUDivInst()
1154 unsigned MaxRecurse) { in SimplifySRemInst() argument
1165 return simplifyRem(Instruction::SRem, Op0, Op1, Q, MaxRecurse); in SimplifySRemInst()
1175 unsigned MaxRecurse) { in SimplifyURemInst() argument
1176 return simplifyRem(Instruction::URem, Op0, Op1, Q, MaxRecurse); in SimplifyURemInst()
1213 Value *Op1, const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyShift() argument
1236 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1242 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1264 unsigned MaxRecurse) { in SimplifyRightShift() argument
1265 if (Value *V = SimplifyShift(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRightShift()
1290 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyShlInst() argument
1291 if (Value *V = SimplifyShift(Instruction::Shl, Op0, Op1, Q, MaxRecurse)) in SimplifyShlInst()
1322 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyLShrInst() argument
1324 MaxRecurse)) in SimplifyLShrInst()
1360 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyAShrInst() argument
1362 MaxRecurse)) in SimplifyAShrInst()
1782 unsigned MaxRecurse) { in SimplifyAndInst() argument
1849 MaxRecurse)) in SimplifyAndInst()
1854 Q, MaxRecurse)) in SimplifyAndInst()
1859 Q, MaxRecurse)) in SimplifyAndInst()
1866 MaxRecurse)) in SimplifyAndInst()
1873 MaxRecurse)) in SimplifyAndInst()
1920 unsigned MaxRecurse) { in SimplifyOrInst() argument
1999 MaxRecurse)) in SimplifyOrInst()
2004 MaxRecurse)) in SimplifyOrInst()
2011 MaxRecurse)) in SimplifyOrInst()
2043 if (Value *V = ThreadBinOpOverPHI(Instruction::Or, Op0, Op1, Q, MaxRecurse)) in SimplifyOrInst()
2056 unsigned MaxRecurse) { in SimplifyXorInst() argument
2079 MaxRecurse)) in SimplifyXorInst()
2755 unsigned MaxRecurse) { in simplifyICmpWithBinOp() argument
2760 if (MaxRecurse && (LBO || RBO)) { in simplifyICmpWithBinOp()
2790 MaxRecurse - 1)) in simplifyICmpWithBinOp()
2797 C == LHS ? D : C, Q, MaxRecurse - 1)) in simplifyICmpWithBinOp()
2823 if (Value *V = SimplifyICmpInst(Pred, Y, Z, Q, MaxRecurse - 1)) in simplifyICmpWithBinOp()
3019 if (MaxRecurse && LBO && RBO && LBO->getOpcode() == RBO->getOpcode() && in simplifyICmpWithBinOp()
3030 RBO->getOperand(0), Q, MaxRecurse - 1)) in simplifyICmpWithBinOp()
3038 RBO->getOperand(0), Q, MaxRecurse - 1)) in simplifyICmpWithBinOp()
3045 RBO->getOperand(0), Q, MaxRecurse - 1)) in simplifyICmpWithBinOp()
3056 RBO->getOperand(0), Q, MaxRecurse - 1)) in simplifyICmpWithBinOp()
3107 unsigned MaxRecurse) { in simplifyICmpWithMinMax() argument
3158 if (MaxRecurse) in simplifyICmpWithMinMax()
3159 if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse - 1)) in simplifyICmpWithMinMax()
3172 if (MaxRecurse) in simplifyICmpWithMinMax()
3173 if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse - 1)) in simplifyICmpWithMinMax()
3232 if (MaxRecurse) in simplifyICmpWithMinMax()
3233 if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse - 1)) in simplifyICmpWithMinMax()
3246 if (MaxRecurse) in simplifyICmpWithMinMax()
3247 if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse - 1)) in simplifyICmpWithMinMax()
3310 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyICmpInst() argument
3372 if (MaxRecurse && isa<PtrToIntInst>(LI) && in SimplifyICmpInst()
3378 Q, MaxRecurse-1)) in SimplifyICmpInst()
3384 Q, MaxRecurse-1)) in SimplifyICmpInst()
3393 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst()
3397 MaxRecurse-1)) in SimplifyICmpInst()
3410 if (RExt == CI && MaxRecurse) in SimplifyICmpInst()
3412 SrcOp, Trunc, Q, MaxRecurse-1)) in SimplifyICmpInst()
3453 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst()
3456 Q, MaxRecurse-1)) in SimplifyICmpInst()
3469 if (RExt == CI && MaxRecurse) in SimplifyICmpInst()
3470 if (Value *V = SimplifyICmpInst(Pred, SrcOp, Trunc, Q, MaxRecurse-1)) in SimplifyICmpInst()
3501 if (MaxRecurse) in SimplifyICmpInst()
3504 Q, MaxRecurse-1)) in SimplifyICmpInst()
3510 if (MaxRecurse) in SimplifyICmpInst()
3513 Q, MaxRecurse-1)) in SimplifyICmpInst()
3528 if (Value *V = simplifyICmpWithBinOp(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3531 if (Value *V = simplifyICmpWithMinMax(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3580 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3586 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3601 unsigned MaxRecurse) { in SimplifyFCmpInst() argument
3727 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyFCmpInst()
3733 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyFCmpInst()
3747 unsigned MaxRecurse) { in SimplifyWithOpReplaced() argument
3774 if (MaxRecurse) { in SimplifyWithOpReplaced()
3777 MaxRecurse - 1); in SimplifyWithOpReplaced()
3780 MaxRecurse - 1); in SimplifyWithOpReplaced()
3786 if (MaxRecurse) { in SimplifyWithOpReplaced()
3789 MaxRecurse - 1); in SimplifyWithOpReplaced()
3792 MaxRecurse - 1); in SimplifyWithOpReplaced()
3798 if (MaxRecurse) { in SimplifyWithOpReplaced()
3803 MaxRecurse - 1); in SimplifyWithOpReplaced()
3893 unsigned MaxRecurse) { in simplifySelectWithICmpCond() argument
3939 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3941 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3944 if (SimplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3946 SimplifyWithOpReplaced(TrueVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3950 if (SimplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3952 SimplifyWithOpReplaced(TrueVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3955 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3957 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
3996 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifySelectInst() argument
4026 simplifySelectWithICmpCond(Cond, TrueVal, FalseVal, Q, MaxRecurse)) in SimplifySelectInst()
4327 Type *Ty, const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyCastInst() argument
4370 unsigned MaxRecurse) { in foldIdentityShuffles() argument
4371 if (!MaxRecurse--) in foldIdentityShuffles()
4393 SourceShuf->getMaskValue(RootElt), RootVec, MaxRecurse); in foldIdentityShuffles()
4418 unsigned MaxRecurse) { in SimplifyShuffleVectorInst() argument
4483 foldIdentityShuffles(i, Op0, Op1, Indices[i], RootVec, MaxRecurse); in SimplifyShuffleVectorInst()
4523 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyFAddInst() argument
4564 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyFSubInst() argument
4607 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyFMulInst() argument
4728 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyBinOp() argument
4731 return SimplifyAddInst(LHS, RHS, false, false, Q, MaxRecurse); in SimplifyBinOp()
4733 return SimplifySubInst(LHS, RHS, false, false, Q, MaxRecurse); in SimplifyBinOp()
4735 return SimplifyMulInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4737 return SimplifySDivInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4739 return SimplifyUDivInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4741 return SimplifySRemInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4743 return SimplifyURemInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4745 return SimplifyShlInst(LHS, RHS, false, false, Q, MaxRecurse); in SimplifyBinOp()
4747 return SimplifyLShrInst(LHS, RHS, false, Q, MaxRecurse); in SimplifyBinOp()
4749 return SimplifyAShrInst(LHS, RHS, false, Q, MaxRecurse); in SimplifyBinOp()
4751 return SimplifyAndInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4753 return SimplifyOrInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4755 return SimplifyXorInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
4757 return SimplifyFAddInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
4759 return SimplifyFSubInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
4761 return SimplifyFMulInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
4763 return SimplifyFDivInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
4765 return SimplifyFRemInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
4777 unsigned MaxRecurse) { in SimplifyFPBinOp() argument
4780 return SimplifyFAddInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
4782 return SimplifyFSubInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
4784 return SimplifyFMulInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
4786 return SimplifyFDivInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
4788 return SimplifyBinOp(Opcode, LHS, RHS, Q, MaxRecurse); in SimplifyFPBinOp()
4804 const SimplifyQuery &Q, unsigned MaxRecurse) { in SimplifyCmpInst() argument
4806 return SimplifyICmpInst(Predicate, LHS, RHS, Q, MaxRecurse); in SimplifyCmpInst()
4807 return SimplifyFCmpInst(Predicate, LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyCmpInst()
5143 unsigned MaxRecurse) { in SimplifyCall() argument