Lines Matching refs:MaxRecurse
140 unsigned MaxRecurse) { in ExpandBinOp() argument
143 if (!MaxRecurse--) in ExpandBinOp()
152 if (Value *L = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse)) in ExpandBinOp()
153 if (Value *R = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) { in ExpandBinOp()
162 if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) { in ExpandBinOp()
175 if (Value *L = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse)) in ExpandBinOp()
176 if (Value *R = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse)) { in ExpandBinOp()
185 if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) { in ExpandBinOp()
198 const Query &Q, unsigned MaxRecurse) { in SimplifyAssociativeBinOp() argument
203 if (!MaxRecurse--) in SimplifyAssociativeBinOp()
216 if (Value *V = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
221 if (Value *W = SimplifyBinOp(Opcode, A, V, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
235 if (Value *V = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
240 if (Value *W = SimplifyBinOp(Opcode, V, C, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
258 if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
263 if (Value *W = SimplifyBinOp(Opcode, V, B, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
277 if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
282 if (Value *W = SimplifyBinOp(Opcode, B, V, Q, MaxRecurse)) { in SimplifyAssociativeBinOp()
297 const Query &Q, unsigned MaxRecurse) { in ThreadBinOpOverSelect() argument
299 if (!MaxRecurse--) in ThreadBinOpOverSelect()
314 TV = SimplifyBinOp(Opcode, SI->getTrueValue(), RHS, Q, MaxRecurse); in ThreadBinOpOverSelect()
315 FV = SimplifyBinOp(Opcode, SI->getFalseValue(), RHS, Q, MaxRecurse); in ThreadBinOpOverSelect()
317 TV = SimplifyBinOp(Opcode, LHS, SI->getTrueValue(), Q, MaxRecurse); in ThreadBinOpOverSelect()
318 FV = SimplifyBinOp(Opcode, LHS, SI->getFalseValue(), Q, MaxRecurse); in ThreadBinOpOverSelect()
370 unsigned MaxRecurse) { in ThreadCmpOverSelect() argument
372 if (!MaxRecurse--) in ThreadCmpOverSelect()
388 Value *TCmp = SimplifyCmpInst(Pred, TV, RHS, Q, MaxRecurse); in ThreadCmpOverSelect()
402 Value *FCmp = SimplifyCmpInst(Pred, FV, RHS, Q, MaxRecurse); in ThreadCmpOverSelect()
428 if (Value *V = SimplifyAndInst(Cond, TCmp, Q, MaxRecurse)) in ThreadCmpOverSelect()
433 if (Value *V = SimplifyOrInst(Cond, FCmp, Q, MaxRecurse)) in ThreadCmpOverSelect()
440 Q, MaxRecurse)) in ThreadCmpOverSelect()
451 const Query &Q, unsigned MaxRecurse) { in ThreadBinOpOverPHI() argument
453 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()
517 Value *V = SimplifyCmpInst(Pred, Incoming, RHS, Q, MaxRecurse); in ThreadCmpOverPHI()
531 const Query &Q, unsigned MaxRecurse) { in SimplifyAddInst() argument
565 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifyAddInst()
566 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyAddInst()
571 MaxRecurse)) in SimplifyAddInst()
663 const Query &Q, unsigned MaxRecurse) { in SimplifySubInst() argument
691 if (MaxRecurse && match(Op0, m_Add(m_Value(X), m_Value(Y)))) { // (X + Y) - Z in SimplifySubInst()
693 if (Value *V = SimplifyBinOp(Instruction::Sub, Y, Z, Q, MaxRecurse-1)) in SimplifySubInst()
695 if (Value *W = SimplifyBinOp(Instruction::Add, X, V, Q, MaxRecurse-1)) { in SimplifySubInst()
701 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1)) in SimplifySubInst()
703 if (Value *W = SimplifyBinOp(Instruction::Add, Y, V, Q, MaxRecurse-1)) { in SimplifySubInst()
713 if (MaxRecurse && match(Op1, m_Add(m_Value(Y), m_Value(Z)))) { // X - (Y + Z) in SimplifySubInst()
715 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1)) in SimplifySubInst()
717 if (Value *W = SimplifyBinOp(Instruction::Sub, V, Z, Q, MaxRecurse-1)) { in SimplifySubInst()
723 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1)) in SimplifySubInst()
725 if (Value *W = SimplifyBinOp(Instruction::Sub, V, Y, Q, MaxRecurse-1)) { in SimplifySubInst()
735 if (MaxRecurse && match(Op1, m_Sub(m_Value(X), m_Value(Y)))) // Z - (X - Y) in SimplifySubInst()
737 if (Value *V = SimplifyBinOp(Instruction::Sub, Z, X, Q, MaxRecurse-1)) in SimplifySubInst()
739 if (Value *W = SimplifyBinOp(Instruction::Add, V, Y, Q, MaxRecurse-1)) { in SimplifySubInst()
746 if (MaxRecurse && match(Op0, m_Trunc(m_Value(X))) && in SimplifySubInst()
750 if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1)) in SimplifySubInst()
752 if (Value *W = SimplifyTruncInst(V, Op0->getType(), Q, MaxRecurse-1)) in SimplifySubInst()
763 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifySubInst()
764 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifySubInst()
790 const Query &Q, unsigned MaxRecurse) { in SimplifyFAddInst() argument
832 const Query &Q, unsigned MaxRecurse) { in SimplifyFSubInst() argument
870 unsigned MaxRecurse) { in SimplifyFMulInst() argument
896 unsigned MaxRecurse) { in SimplifyMulInst() argument
927 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifyMulInst()
928 if (Value *V = SimplifyAndInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyMulInst()
933 MaxRecurse)) in SimplifyMulInst()
938 Q, MaxRecurse)) in SimplifyMulInst()
945 MaxRecurse)) in SimplifyMulInst()
952 MaxRecurse)) in SimplifyMulInst()
996 const Query &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()
1082 unsigned MaxRecurse) { in SimplifySDivInst() argument
1083 if (Value *V = SimplifyDiv(Instruction::SDiv, Op0, Op1, Q, MaxRecurse)) in SimplifySDivInst()
1100 unsigned MaxRecurse) { in SimplifyUDivInst() argument
1101 if (Value *V = SimplifyDiv(Instruction::UDiv, Op0, Op1, Q, MaxRecurse)) in SimplifyUDivInst()
1146 const Query &Q, unsigned MaxRecurse) { in SimplifyRem() argument
1192 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRem()
1198 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRem()
1207 unsigned MaxRecurse) { in SimplifySRemInst() argument
1208 if (Value *V = SimplifyRem(Instruction::SRem, Op0, Op1, Q, MaxRecurse)) in SimplifySRemInst()
1225 unsigned MaxRecurse) { in SimplifyURemInst() argument
1226 if (Value *V = SimplifyRem(Instruction::URem, Op0, Op1, Q, MaxRecurse)) in SimplifyURemInst()
1298 const Query &Q, unsigned MaxRecurse) { in SimplifyShift() argument
1321 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1327 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1337 unsigned MaxRecurse) { in SimplifyRightShift() argument
1338 if (Value *V = SimplifyShift(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRightShift()
1367 const Query &Q, unsigned MaxRecurse) { in SimplifyShlInst() argument
1368 if (Value *V = SimplifyShift(Instruction::Shl, Op0, Op1, Q, MaxRecurse)) in SimplifyShlInst()
1394 const Query &Q, unsigned MaxRecurse) { in SimplifyLShrInst() argument
1396 MaxRecurse)) in SimplifyLShrInst()
1419 const Query &Q, unsigned MaxRecurse) { in SimplifyAShrInst() argument
1421 MaxRecurse)) in SimplifyAShrInst()
1546 unsigned MaxRecurse) { in SimplifyAndInst() argument
1612 MaxRecurse)) in SimplifyAndInst()
1617 Q, MaxRecurse)) in SimplifyAndInst()
1622 Q, MaxRecurse)) in SimplifyAndInst()
1629 MaxRecurse)) in SimplifyAndInst()
1636 MaxRecurse)) in SimplifyAndInst()
1705 unsigned MaxRecurse) { in SimplifyOrInst() argument
1770 MaxRecurse)) in SimplifyOrInst()
1775 MaxRecurse)) in SimplifyOrInst()
1782 MaxRecurse)) in SimplifyOrInst()
1824 if (Value *V = ThreadBinOpOverPHI(Instruction::Or, Op0, Op1, Q, MaxRecurse)) in SimplifyOrInst()
1841 unsigned MaxRecurse) { in SimplifyXorInst() argument
1872 MaxRecurse)) in SimplifyXorInst()
2120 const Query &Q, unsigned MaxRecurse) { in SimplifyICmpInst() argument
2368 if (MaxRecurse && isa<PtrToIntInst>(LI) && in SimplifyICmpInst()
2374 Q, MaxRecurse-1)) in SimplifyICmpInst()
2380 Q, MaxRecurse-1)) in SimplifyICmpInst()
2389 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst()
2393 MaxRecurse-1)) in SimplifyICmpInst()
2406 if (RExt == CI && MaxRecurse) in SimplifyICmpInst()
2408 SrcOp, Trunc, Q, MaxRecurse-1)) in SimplifyICmpInst()
2449 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst()
2452 Q, MaxRecurse-1)) in SimplifyICmpInst()
2465 if (RExt == CI && MaxRecurse) in SimplifyICmpInst()
2466 if (Value *V = SimplifyICmpInst(Pred, SrcOp, Trunc, Q, MaxRecurse-1)) in SimplifyICmpInst()
2497 if (MaxRecurse) in SimplifyICmpInst()
2500 Q, MaxRecurse-1)) in SimplifyICmpInst()
2506 if (MaxRecurse) in SimplifyICmpInst()
2509 Q, MaxRecurse-1)) in SimplifyICmpInst()
2521 if (MaxRecurse && (LBO || RBO)) { in SimplifyICmpInst()
2543 Q, MaxRecurse-1)) in SimplifyICmpInst()
2550 C == LHS ? D : C, Q, MaxRecurse-1)) in SimplifyICmpInst()
2576 if (Value *V = SimplifyICmpInst(Pred, Y, Z, Q, MaxRecurse-1)) in SimplifyICmpInst()
2743 if (MaxRecurse && LBO && RBO && LBO->getOpcode() == RBO->getOpcode() && in SimplifyICmpInst()
2757 RBO->getOperand(0), Q, MaxRecurse-1)) in SimplifyICmpInst()
2768 RBO->getOperand(0), Q, MaxRecurse-1)) in SimplifyICmpInst()
2821 if (MaxRecurse) in SimplifyICmpInst()
2822 if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
2835 if (MaxRecurse) in SimplifyICmpInst()
2836 if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
2891 if (MaxRecurse) in SimplifyICmpInst()
2892 if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
2905 if (MaxRecurse) in SimplifyICmpInst()
2906 if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse-1)) in SimplifyICmpInst()
3012 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3018 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyICmpInst()
3036 const Query &Q, unsigned MaxRecurse) { in SimplifyFCmpInst() argument
3128 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyFCmpInst()
3134 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse)) in SimplifyFCmpInst()
3153 unsigned MaxRecurse) { in SimplifySelectInst() argument
3428 const Query &Q, unsigned MaxRecurse) { in SimplifyBinOp() argument
3432 Q, MaxRecurse); in SimplifyBinOp()
3434 return SimplifyFAddInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3438 Q, MaxRecurse); in SimplifyBinOp()
3440 return SimplifyFSubInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3442 case Instruction::Mul: return SimplifyMulInst (LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3444 return SimplifyFMulInst (LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3445 case Instruction::SDiv: return SimplifySDivInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3446 case Instruction::UDiv: return SimplifyUDivInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3448 return SimplifyFDivInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3449 case Instruction::SRem: return SimplifySRemInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3450 case Instruction::URem: return SimplifyURemInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3452 return SimplifyFRemInst(LHS, RHS, FastMathFlags(), Q, MaxRecurse); in SimplifyBinOp()
3455 Q, MaxRecurse); in SimplifyBinOp()
3457 return SimplifyLShrInst(LHS, RHS, /*isExact*/false, Q, MaxRecurse); in SimplifyBinOp()
3459 return SimplifyAShrInst(LHS, RHS, /*isExact*/false, Q, MaxRecurse); in SimplifyBinOp()
3460 case Instruction::And: return SimplifyAndInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3461 case Instruction::Or: return SimplifyOrInst (LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3462 case Instruction::Xor: return SimplifyXorInst(LHS, RHS, Q, MaxRecurse); in SimplifyBinOp()
3473 if (Value *V = SimplifyAssociativeBinOp(Opcode, LHS, RHS, Q, MaxRecurse)) in SimplifyBinOp()
3479 if (Value *V = ThreadBinOpOverSelect(Opcode, LHS, RHS, Q, MaxRecurse)) in SimplifyBinOp()
3485 if (Value *V = ThreadBinOpOverPHI(Opcode, LHS, RHS, Q, MaxRecurse)) in SimplifyBinOp()
3498 unsigned MaxRecurse) { in SimplifyFPBinOp() argument
3501 return SimplifyFAddInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
3503 return SimplifyFSubInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
3505 return SimplifyFMulInst(LHS, RHS, FMF, Q, MaxRecurse); in SimplifyFPBinOp()
3507 return SimplifyBinOp(Opcode, LHS, RHS, Q, MaxRecurse); in SimplifyFPBinOp()
3531 const Query &Q, unsigned MaxRecurse) { in SimplifyCmpInst() argument
3533 return SimplifyICmpInst(Predicate, LHS, RHS, Q, MaxRecurse); in SimplifyCmpInst()
3534 return SimplifyFCmpInst(Predicate, LHS, RHS, Q, MaxRecurse); in SimplifyCmpInst()
3563 const Query &Q, unsigned MaxRecurse) { in SimplifyIntrinsic() argument
3579 const Query &Q, unsigned MaxRecurse) { in SimplifyCall() argument
3595 SimplifyIntrinsic((Intrinsic::ID) IID, ArgBegin, ArgEnd, Q, MaxRecurse)) in SimplifyCall()