Lines Matching refs:ICI
692 static Value *canonicalizeSaturatedSubtract(const ICmpInst *ICI, in canonicalizeSaturatedSubtract() argument
696 ICmpInst::Predicate Pred = ICI->getPredicate(); in canonicalizeSaturatedSubtract()
708 Value *A = ICI->getOperand(0); in canonicalizeSaturatedSubtract()
709 Value *B = ICI->getOperand(1); in canonicalizeSaturatedSubtract()
736 if (IsNegative && !TrueVal->hasOneUse() && !ICI->hasOneUse()) in canonicalizeSaturatedSubtract()
825 static Instruction *foldSelectCtlzToCttz(ICmpInst *ICI, Value *TrueVal, in foldSelectCtlzToCttz() argument
829 if (!ICI->isEquality() || !match(ICI->getOperand(1), m_Zero())) in foldSelectCtlzToCttz()
832 if (ICI->getPredicate() == ICmpInst::ICMP_NE) in foldSelectCtlzToCttz()
842 Value *X = ICI->getOperand(0); in foldSelectCtlzToCttz()
864 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal, in foldSelectCttzCtlz() argument
866 ICmpInst::Predicate Pred = ICI->getPredicate(); in foldSelectCttzCtlz()
867 Value *CmpLHS = ICI->getOperand(0); in foldSelectCttzCtlz()
868 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz()
871 if (!ICI->isEquality() || !match(CmpRHS, m_Zero())) in foldSelectCttzCtlz()
1450 ICmpInst *ICI) { in foldSelectInstWithICmp() argument
1451 if (Instruction *NewSel = foldSelectValueEquivalence(SI, *ICI)) in foldSelectInstWithICmp()
1454 if (Instruction *NewSel = canonicalizeMinMaxWithConstant(SI, *ICI, *this)) in foldSelectInstWithICmp()
1457 if (Instruction *NewAbs = canonicalizeAbsNabs(SI, *ICI, *this)) in foldSelectInstWithICmp()
1460 if (Instruction *NewAbs = canonicalizeClampLike(SI, *ICI, Builder)) in foldSelectInstWithICmp()
1464 tryToReuseConstantFromSelectInComparison(SI, *ICI, *this)) in foldSelectInstWithICmp()
1467 bool Changed = adjustMinMax(SI, *ICI); in foldSelectInstWithICmp()
1469 if (Value *V = foldSelectICmpAnd(SI, ICI, Builder)) in foldSelectInstWithICmp()
1475 ICmpInst::Predicate Pred = ICI->getPredicate(); in foldSelectInstWithICmp()
1476 Value *CmpLHS = ICI->getOperand(0); in foldSelectInstWithICmp()
1477 Value *CmpRHS = ICI->getOperand(1); in foldSelectInstWithICmp()
1541 foldSelectICmpAndAnd(SI.getType(), ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1544 if (Instruction *V = foldSelectCtlzToCttz(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1547 if (Value *V = foldSelectICmpAndOr(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1550 if (Value *V = foldSelectICmpLshrAshr(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1553 if (Value *V = foldSelectCttzCtlz(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1556 if (Value *V = canonicalizeSaturatedSubtract(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1559 if (Value *V = canonicalizeSaturatedAdd(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
2769 if (ICmpInst *ICI = dyn_cast<ICmpInst>(CondVal)) in visitSelectInst() local
2770 if (Instruction *Result = foldSelectInstWithICmp(SI, ICI)) in visitSelectInst()