Lines Matching refs:FalseVal

414                                             Value *FalseVal) {  in foldSelectIntoOp()  argument
418 if (TVI->hasOneUse() && !isa<Constant>(FalseVal)) { in foldSelectIntoOp()
421 if ((SFO & 1) && FalseVal == TVI->getOperand(0)) { in foldSelectIntoOp()
423 } else if ((SFO & 2) && FalseVal == TVI->getOperand(1)) { in foldSelectIntoOp()
439 FalseVal, NewSel); in foldSelectIntoOp()
448 if (auto *FVI = dyn_cast<BinaryOperator>(FalseVal)) { in foldSelectIntoOp()
537 Value *FalseVal, in foldSelectICmpAndOr() argument
583 bool OrOnFalseVal = match(FalseVal, m_Or(m_Specific(TrueVal), m_Power2(C2))); in foldSelectICmpAndOr()
585 OrOnTrueVal = match(TrueVal, m_Or(m_Specific(FalseVal), m_Power2(C2))); in foldSelectICmpAndOr()
590 Value *Y = OrOnFalseVal ? TrueVal : FalseVal; in foldSelectICmpAndOr()
600 Value *Or = OrOnFalseVal ? FalseVal : TrueVal; in foldSelectICmpAndOr()
635 const Value *FalseVal, in canonicalizeSaturatedSubtract() argument
644 std::swap(TrueVal, FalseVal); in canonicalizeSaturatedSubtract()
646 if (!match(FalseVal, m_Zero())) in canonicalizeSaturatedSubtract()
691 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal, in foldSelectCttzCtlz() argument
701 Value *Count = FalseVal; in foldSelectCttzCtlz()
748 Value *FalseVal = Sel.getFalseValue(); in adjustMinMax() local
772 if ((CmpLHS == TrueVal && AdjustedRHS == FalseVal) || in adjustMinMax()
773 (CmpLHS == FalseVal && AdjustedRHS == TrueVal)) { in adjustMinMax()
786 if (match(TrueVal, m_SExt(m_Specific(CmpLHS))) && SextRHS == FalseVal) { in adjustMinMax()
789 } else if (match(FalseVal, m_SExt(m_Specific(CmpLHS))) && in adjustMinMax()
791 CmpLHS = FalseVal; in adjustMinMax()
799 if (match(TrueVal, m_ZExt(m_Specific(CmpLHS))) && ZextRHS == FalseVal) { in adjustMinMax()
802 } else if (match(FalseVal, m_ZExt(m_Specific(CmpLHS))) && in adjustMinMax()
804 CmpLHS = FalseVal; in adjustMinMax()
818 std::swap(FalseVal, TrueVal); in adjustMinMax()
823 Sel.setOperand(2, FalseVal); in adjustMinMax()
960 Value *FalseVal = SI.getFalseValue(); in foldSelectInstWithICmp() local
982 } else if (CmpLHS == FalseVal && Pred == ICmpInst::ICMP_NE) { in foldSelectInstWithICmp()
1019 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in foldSelectInstWithICmp()
1022 else if (!TrueWhenUnset && FalseVal == X && in foldSelectInstWithICmp()
1026 else if (TrueWhenUnset && FalseVal == X && in foldSelectInstWithICmp()
1031 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in foldSelectInstWithICmp()
1040 foldSelectICmpAndAnd(SI.getType(), ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1043 if (Value *V = foldSelectICmpAndOr(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1046 if (Value *V = foldSelectCttzCtlz(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1049 if (Value *V = canonicalizeSaturatedSubtract(ICI, TrueVal, FalseVal, Builder)) in foldSelectInstWithICmp()
1215 Value *FalseVal = SI.getFalseValue(); in foldAddSubSelect() local
1217 auto *FI = dyn_cast<Instruction>(FalseVal); in foldAddSubSelect()
1613 Value *FalseVal = SI.getFalseValue(); in visitSelectInst() local
1621 if (isa<UndefValue>(TrueVal) || isa<UndefValue>(FalseVal)) { in visitSelectInst()
1632 if (Value *V = SimplifySelectInst(CondVal, TrueVal, FalseVal, in visitSelectInst()
1649 SI.setOperand(1, FalseVal); in visitSelectInst()
1660 return BinaryOperator::CreateOr(CondVal, FalseVal); in visitSelectInst()
1665 return BinaryOperator::CreateAnd(NotCond, FalseVal); in visitSelectInst()
1667 if (match(FalseVal, m_Zero())) { in visitSelectInst()
1671 if (match(FalseVal, m_One())) { in visitSelectInst()
1680 return BinaryOperator::CreateOr(CondVal, FalseVal); in visitSelectInst()
1681 if (CondVal == FalseVal) in visitSelectInst()
1687 return BinaryOperator::CreateAnd(TrueVal, FalseVal); in visitSelectInst()
1688 if (match(FalseVal, m_Not(m_Specific(CondVal)))) in visitSelectInst()
1689 return BinaryOperator::CreateOr(TrueVal, FalseVal); in visitSelectInst()
1701 if (match(TrueVal, m_One()) && match(FalseVal, m_Zero())) in visitSelectInst()
1705 if (match(TrueVal, m_AllOnes()) && match(FalseVal, m_Zero())) in visitSelectInst()
1709 if (match(TrueVal, m_Zero()) && match(FalseVal, m_One())) { in visitSelectInst()
1715 if (match(TrueVal, m_Zero()) && match(FalseVal, m_AllOnes())) { in visitSelectInst()
1723 if (FCI->getOperand(0) == TrueVal && FCI->getOperand(1) == FalseVal) { in visitSelectInst()
1733 Value *NewCond = Builder.CreateFCmp(InvPred, TrueVal, FalseVal, in visitSelectInst()
1736 return SelectInst::Create(NewCond, FalseVal, TrueVal, in visitSelectInst()
1741 } else if (FCI->getOperand(0) == FalseVal && FCI->getOperand(1) == TrueVal){ in visitSelectInst()
1751 Value *NewCond = Builder.CreateFCmp(InvPred, FalseVal, TrueVal, in visitSelectInst()
1754 return SelectInst::Create(NewCond, FalseVal, TrueVal, in visitSelectInst()
1770 if ((X == FalseVal && Pred == FCmpInst::FCMP_OLE && in visitSelectInst()
1773 match(FalseVal, m_FSub(m_PosZeroFP(), m_Specific(X))))) { in visitSelectInst()
1783 ((X == FalseVal && match(TrueVal, m_FNeg(m_Specific(X))) && in visitSelectInst()
1785 (X == TrueVal && match(FalseVal, m_FNeg(m_Specific(X))) && in visitSelectInst()
1803 auto *FI = dyn_cast<Instruction>(FalseVal); in visitSelectInst()
1813 if (Instruction *FoldI = foldSelectIntoOp(SI, TrueVal, FalseVal)) in visitSelectInst()
1907 canSelectOperandBeMappingIntoPredBlock(FalseVal, SI)) in visitSelectInst()
1923 if (TrueSI->getFalseValue() == FalseVal && TrueSI->hasOneUse()) { in visitSelectInst()
1931 if (SelectInst *FalseSI = dyn_cast<SelectInst>(FalseVal)) { in visitSelectInst()
1987 if (match(FalseVal, m_OneUse(m_BinOp(FalseBO))) && in visitSelectInst()
2008 SI.setOperand(1, FalseVal); in visitSelectInst()
2036 return replaceInstUsesWith(SI, FalseVal); in visitSelectInst()