Lines Matching refs:CondVal
733 auto *CondVal = SI.getCondition(); in foldSelectZeroOrMul() local
742 if (!match(CondVal, m_ICmp(Predicate, m_Value(X), m_Zero())) || in foldSelectZeroOrMul()
759 auto *ZeroC = cast<Constant>(cast<Instruction>(CondVal)->getOperand(1)); in foldSelectZeroOrMul()
1764 Value *CondVal = SI.getCondition(); in foldAddSubSelect() local
1814 Value *NewSel = Builder.CreateSelect(CondVal, NewTrueOp, NewFalseOp, in foldAddSubSelect()
1839 Value *CondVal = SI.getCondition(); in foldOverflowingAddSubSelect() local
1844 if (!match(CondVal, m_ExtractValue<1>(m_WithOverflowInst(II))) || in foldOverflowingAddSubSelect()
2016 Value *CondVal = SI.getCondition(); in canonicalizeSelectToShuffle() local
2018 auto *CondValTy = dyn_cast<FixedVectorType>(CondVal->getType()); in canonicalizeSelectToShuffle()
2019 if (!CondValTy || !match(CondVal, m_Constant(CondC))) in canonicalizeSelectToShuffle()
2468 Value *CondVal = SI.getCondition(); in foldAndOrOfSelectUsingImpliedCond() local
2475 Optional<bool> Res = isImpliedCondition(Op, CondVal, DL, IsAnd); in foldAndOrOfSelectUsingImpliedCond()
2511 Value *CondVal = SI.getCondition(); in foldSelectWithFCmpToFabs() local
2521 if (!match(CondVal, m_FCmp(Pred, m_Specific(X), m_AnyZeroFP()))) in foldSelectWithFCmpToFabs()
2639 Value *CondVal = SI.getCondition(); in visitSelectInst() local
2644 if (Value *V = simplifySelectInst(CondVal, TrueVal, FalseVal, in visitSelectInst()
2657 if (SelType->isIntOrIntVectorTy(1) && !isa<Constant>(CondVal) && in visitSelectInst()
2658 TrueVal->getType() == CondVal->getType()) { in visitSelectInst()
2663 if (impliesPoison(FalseVal, CondVal)) { in visitSelectInst()
2665 return BinaryOperator::CreateOr(CondVal, FalseVal); in visitSelectInst()
2668 if (auto *LHS = dyn_cast<FCmpInst>(CondVal)) in visitSelectInst()
2675 if (impliesPoison(TrueVal, CondVal)) { in visitSelectInst()
2677 return BinaryOperator::CreateAnd(CondVal, TrueVal); in visitSelectInst()
2680 if (auto *LHS = dyn_cast<FCmpInst>(CondVal)) in visitSelectInst()
2694 Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName()); in visitSelectInst()
2699 Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName()); in visitSelectInst()
2704 if (CondVal == TrueVal) in visitSelectInst()
2707 if (CondVal == FalseVal) in visitSelectInst()
2711 if (match(TrueVal, m_Not(m_Specific(CondVal)))) in visitSelectInst()
2714 if (match(FalseVal, m_Not(m_Specific(CondVal)))) in visitSelectInst()
2722 (CondVal->hasOneUse() || TrueVal->hasOneUse()) && in visitSelectInst()
2729 (CondVal->hasOneUse() || FalseVal->hasOneUse()) && in visitSelectInst()
2734 if (match(CondVal, m_Select(m_Value(A), m_One(), m_Value(B))) && in visitSelectInst()
2738 if (match(CondVal, m_Select(m_Value(A), m_Value(B), m_Zero())) && in visitSelectInst()
2744 if (match(CondVal, m_c_Or(m_Not(m_Specific(TrueVal)), m_Value(C))) && in visitSelectInst()
2745 CondVal->hasOneUse()) { in visitSelectInst()
2750 if (match(CondVal, m_c_And(m_Not(m_Value(C)), m_Specific(FalseVal))) && in visitSelectInst()
2751 CondVal->hasOneUse()) { in visitSelectInst()
2757 if (Value *S = simplifyWithOpReplaced(TrueVal, CondVal, One, SQ, in visitSelectInst()
2760 if (Value *S = simplifyWithOpReplaced(FalseVal, CondVal, Zero, SQ, in visitSelectInst()
2769 if (isCheckForZeroAndMulWithOverflow(CondVal, Op1, IsAnd, Y)) { in visitSelectInst()
2777 if (auto *I = foldAndOrOfSelectUsingImpliedCond(CondVal, *Op1SI, in visitSelectInst()
2781 if (auto *ICmp0 = dyn_cast<ICmpInst>(CondVal)) in visitSelectInst()
2791 if (match(CondVal, m_Select(m_Value(A), m_One(), m_Value(B))) && in visitSelectInst()
2799 Optional<bool> Res = isImpliedCondition(CondVal, B, DL); in visitSelectInst()
2808 Optional<bool> Res = isImpliedCondition(CondVal, B, DL, false); in visitSelectInst()
2812 if (match(CondVal, m_Select(m_Value(A), m_Value(B), m_Zero())) && in visitSelectInst()
2822 if (match(CondVal, m_Select(m_Value(C1), m_Value(A), m_Zero())) && in visitSelectInst()
2842 CondVal->getType()->isVectorTy() == SelType->isVectorTy()) { in visitSelectInst()
2845 return new ZExtInst(CondVal, SelType); in visitSelectInst()
2849 return new SExtInst(CondVal, SelType); in visitSelectInst()
2853 Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName()); in visitSelectInst()
2859 Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName()); in visitSelectInst()
2864 if (auto *FCmp = dyn_cast<FCmpInst>(CondVal)) { in visitSelectInst()
2894 if (ICmpInst *ICI = dyn_cast<ICmpInst>(CondVal)) in visitSelectInst()
2926 if (isa<VectorType>(CondVal->getType()) && !isa<VectorType>(Idx->getType())) in visitSelectInst()
2934 Builder.CreateSelect(CondVal, NewT, NewF, SI.getName() + ".idx", &SI); in visitSelectInst()
2971 Value *CmpLHS = cast<CmpInst>(CondVal)->getOperand(0); in visitSelectInst()
2972 Value *CmpRHS = cast<CmpInst>(CondVal)->getOperand(1); in visitSelectInst()
3022 if (TrueSI->getCondition()->getType() == CondVal->getType()) { in visitSelectInst()
3024 if (TrueSI->getCondition() == CondVal) { in visitSelectInst()
3034 Value *And = Builder.CreateLogicalAnd(CondVal, TrueSI->getCondition()); in visitSelectInst()
3042 if (FalseSI->getCondition()->getType() == CondVal->getType()) { in visitSelectInst()
3044 if (FalseSI->getCondition() == CondVal) { in visitSelectInst()
3051 Value *Or = Builder.CreateLogicalOr(CondVal, FalseSI->getCondition()); in visitSelectInst()
3079 if (TrueBOSI->getCondition() == CondVal) { in visitSelectInst()
3086 if (TrueBOSI->getCondition() == CondVal) { in visitSelectInst()
3099 if (FalseBOSI->getCondition() == CondVal) { in visitSelectInst()
3106 if (FalseBOSI->getCondition() == CondVal) { in visitSelectInst()
3115 if (match(CondVal, m_Not(m_Value(NotCond))) && in visitSelectInst()
3131 if (!CondVal->getType()->isVectorTy() && !AC.assumptions().empty()) { in visitSelectInst()
3133 computeKnownBits(CondVal, Known, 0, &SI); in visitSelectInst()
3168 (match(TrueVal, m_MaskedLoad(m_Value(), m_Value(), m_Specific(CondVal), in visitSelectInst()
3170 match(TrueVal, m_MaskedGather(m_Value(), m_Value(), m_Specific(CondVal), in visitSelectInst()
3184 (CondVal->getType() == Mask->getType())) { in visitSelectInst()
3190 if (Value *V = simplifyAndInst(CondVal, Mask, SQ.getWithInstruction(&SI))) in visitSelectInst()