| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSelect.cpp | 1343 if (!match(Sel1, m_Select(m_Value(Cmp1), m_Value(ReplacementLow), in canonicalizeClampLike() 1474 match(&Sel, m_Select(m_Value(), m_Value(SelVal0), m_Value(SelVal1))); in tryToReuseConstantFromSelectInComparison() 1548 if (match(&SI, m_Select(m_Specific(ICI), m_APInt(C), m_BinOp(BO)))) in foldSelectInstWithICmpConst() 1857 if (!match(Limit, m_Select(m_ICmp(Pred, m_Value(Op), m_APInt(C)), in foldOverflowingAddSubSelect() 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() 2791 if (match(CondVal, m_Select(m_Value(A), m_One(), m_Value(B))) && in visitSelectInst() 2797 if (match(TrueVal, m_Select(m_Value(A), m_One(), m_Value(B))) && in visitSelectInst() 2807 match(FalseVal, m_Select(m_Value(A), m_Value(B), m_Zero()))) { in visitSelectInst() 2812 if (match(CondVal, m_Select(m_Value(A), m_Value(B), m_Zero())) && in visitSelectInst() [all …]
|
| H A D | InstCombineMulDivRem.cpp | 104 if (match(&I, m_c_Mul(m_OneUse(m_Select(m_Value(Cond), m_One(), m_AllOnes())), in foldMulSelectToNegate() 112 if (match(&I, m_c_Mul(m_OneUse(m_Select(m_Value(Cond), m_AllOnes(), m_One())), in foldMulSelectToNegate() 121 if (match(&I, m_c_FMul(m_OneUse(m_Select(m_Value(Cond), m_SpecificFP(1.0), in foldMulSelectToNegate() 131 if (match(&I, m_c_FMul(m_OneUse(m_Select(m_Value(Cond), m_SpecificFP(-1.0), in foldMulSelectToNegate() 801 match(Op1, m_Select(m_Value(), m_ImmConstant(), m_ImmConstant()))) { in commonIDivTransforms() 1463 match(Op1, m_Select(m_Value(), m_ImmConstant(), m_ImmConstant()))) { in commonIRemTransforms()
|
| H A D | InstCombineAddSub.cpp | 1199 if (!match(Select, m_Select(m_ICmp(Pred, m_Specific(X), m_APInt(Thr)), in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract() 1872 m_Select(m_Value(), m_Specific(Op1), m_Specific(&I))) || in visitSub() 1873 match(UI, m_Select(m_Value(), m_Specific(&I), m_Specific(Op1))); in visitSub() 2084 if (!match(Select, m_OneUse(m_Select(m_Value(Cond), m_Value(TrueVal), in visitSub() 2319 if (match(Op, m_OneUse(m_Select(m_Value(Cond), m_Value(X), m_Value(Y))))) { in visitFNeg()
|
| H A D | InstCombineShifts.cpp | 794 if (match(Op0, m_Select(m_Value(Cond), m_OneUse(m_BinOp(TBO)), in FoldShiftByConstant() 811 if (match(Op0, m_Select(m_Value(Cond), m_Value(TrueVal), in FoldShiftByConstant()
|
| H A D | InstCombineCasts.cpp | 1886 if (match(Op, m_Select(m_Value(Cond), m_FPExt(m_Value(X)), m_Value(Y))) && in visitFPTrunc() 1893 if (match(Op, m_Select(m_Value(Cond), m_Value(Y), m_FPExt(m_Value(X)))) && in visitFPTrunc() 2468 m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal))))) in foldBitCastSelect()
|
| H A D | InstructionCombining.cpp | 863 bool LHSIsSelect = match(LHS, m_Select(m_Value(A), m_Value(B), m_Value(C))); in SimplifySelectsFeedingBinaryOp() 864 bool RHSIsSelect = match(RHS, m_Select(m_Value(D), m_Value(E), m_Value(F))); in SimplifySelectsFeedingBinaryOp() 1957 m_Select(m_Value(Cond), m_Constant(TrueC), m_Constant(FalseC)))) in foldSelectGEP() 3952 else if (match(U, m_Select(m_Specific(&I), m_Constant(), m_Value()))) in visitFreeze()
|
| H A D | InstCombineCalls.cpp | 1264 if (match(IIOperand, m_Select(m_Value(), m_Value(X), m_Neg(m_Deferred(X))))) in visitCallInst() 1266 if (match(IIOperand, m_Select(m_Value(), m_Neg(m_Value(X)), m_Deferred(X)))) in visitCallInst() 1928 m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal)))) { in visitCallInst()
|
| H A D | InstCombineLoadStoreAlloca.cpp | 550 if (!match(V, m_Select(m_Cmp(Pred, m_Instruction(L1), m_Instruction(L2)), in isMinMaxWithLoads()
|
| H A D | InstCombineAndOrXor.cpp | 3023 match(Op0, m_Select(m_Value(X), m_Value(A), m_Value(B))) && in visitOr() 3024 match(Op1, m_Select(m_Value(Y), m_Value(C), m_Value(D))) && X == Y) { in visitOr()
|
| H A D | InstCombineVectorOps.cpp | 2236 m_OneUse(m_Select(m_Value(Cond), m_Value(X), m_Value(Y))))) in narrowVectorSelect()
|
| H A D | InstCombineCompares.cpp | 2886 if (!match(UnequalVal, m_Select(m_ICmp(PredB, m_Value(LHS2), m_Value(RHS2)), in matchThreeWayIntCompare() 6145 if (match(Op0, m_Select(m_Value(Cond), m_Value(SelectTrue), in visitICmpInst()
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/InstCombine/ |
| H A D | InstCombiner.h | 261 m_Select(PatternMatch::m_Value(), m_Not(PatternMatch::m_Value()), in isFreeToInvert()
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | IVDescriptors.cpp | 643 if (!match(I, m_Select(m_OneUse(m_Cmp(Pred, m_Value(), m_Value())), m_Value(), in isSelectCmpPattern() 685 !match(I, m_Select(m_OneUse(m_Cmp(Pred, m_Value(), m_Value())), m_Value(), in isMinMaxPattern()
|
| H A D | VectorUtils.cpp | 423 if (match(V, m_Select(m_Value(X), m_Value(Y), m_Value(Z)))) in isSplatValue()
|
| H A D | InstructionSimplify.cpp | 2160 if (match(Op1, m_Select(m_Specific(Op0), m_Value(), m_Zero()))) in simplifyAndInst() 2162 else if (match(Op0, m_Select(m_Specific(Op1), m_Value(), m_Zero()))) in simplifyAndInst() 2417 if (match(Op1, m_Select(m_Specific(Op0), m_One(), m_Value()))) in simplifyOrInst() 2419 else if (match(Op0, m_Select(m_Specific(Op1), m_One(), m_Value()))) in simplifyOrInst()
|
| H A D | ValueTracking.cpp | 6468 match(I, m_Select(m_OneUse(m_Value()), m_Value(), m_Value())); in canConvertToMinOrMaxIntrinsic()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | EarlyCSE.cpp | 162 if (!match(V, m_Select(m_Value(Cond), m_Value(A), m_Value(B)))) in matchSelectWithOptionalNotCond()
|
| H A D | SimpleLoopUnswitch.cpp | 123 while (match(Cond, m_Select(m_Value(CondNext), m_One(), m_Zero()))) in skipTrivialSelect()
|
| /llvm-project-15.0.7/llvm/include/llvm/IR/ |
| H A D | PatternMatch.h | 1462 m_Select(const Cond &C, const LHS &L, const RHS &R) { in m_Select() function 1472 return m_Select(C, m_ConstantInt<L>(), m_ConstantInt<R>()); in m_SelectCst()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Vectorize/ |
| H A D | VectorCombine.cpp | 607 if (match(U, m_Select(m_Specific(&I), m_Value(), m_Value()))) in scalarizeBinopOrCmp()
|
| H A D | SLPVectorizer.cpp | 6324 if ((!match(V, m_Select(MatchCmp, m_Value(), m_Value())) && in getEntryCost() 10517 return match(I, m_Select(m_Cmp(), m_Value(), m_Value())) && in isCmpSelMinMax() 11710 bool IsSelect = match(Inst, m_Select(m_Value(), m_Value(), m_Value())); in tryToVectorizeHorReductionOrInstOperands()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | SimplifyCFG.cpp | 3259 m_CombineOr(m_Select(m_Value(), m_ImmConstant(), m_Value()), in FoldTwoEntryPHINode() 3260 m_Select(m_Value(), m_Value(), m_ImmConstant())))); in FoldTwoEntryPHINode()
|
| H A D | SimplifyLibCalls.cpp | 268 if (match(Size, m_Select(m_Value(), m_APInt(X), m_APInt(Y)))) { in annotateNonNullAndDereferenceable()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | CodeGenPrepare.cpp | 6688 m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal))))) in optimizeShiftInst() 6723 m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal))))) in optimizeFunnelShift()
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/ |
| H A D | AArch64TargetTransformInfo.cpp | 2135 if (match(I, m_Select(m_Cmp(CurrentPred, m_Value(), m_Value()), m_Value(), in getCmpSelInstrCost()
|