Home
last modified time | relevance | path

Searched refs:m_One (Results 1 – 25 of 34) sorted by relevance

12

/llvm-project-15.0.7/llvm/unittests/IR/
H A DPatternMatch.cpp484 EXPECT_TRUE(m_Add(m_One(), m_Zero()).match(X)); in TEST_F()
485 EXPECT_FALSE(m_Add(m_Zero(), m_One()).match(X)); in TEST_F()
504 EXPECT_TRUE(m_One().match(One32)); in TEST_F()
505 EXPECT_FALSE(m_One().match(One64Z)); in TEST_F()
506 EXPECT_FALSE(m_One().match(One64S)); in TEST_F()
508 EXPECT_FALSE(m_ZExt(m_One()).match(One32)); in TEST_F()
509 EXPECT_TRUE(m_ZExt(m_One()).match(One64Z)); in TEST_F()
510 EXPECT_FALSE(m_ZExt(m_One()).match(One64S)); in TEST_F()
512 EXPECT_FALSE(m_SExt(m_One()).match(One32)); in TEST_F()
513 EXPECT_FALSE(m_SExt(m_One()).match(One64Z)); in TEST_F()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/IR/
H A DArithmeticOps.cpp251 if (matchPattern(getRhs(), m_One())) in fold()
266 if (matchPattern(getRhs(), m_One())) in fold()
289 if (matchPattern(getRhs(), m_One())) in fold()
324 if (matchPattern(getRhs(), m_One())) in fold()
350 if (matchPattern(getRhs(), m_One())) in fold()
399 if (matchPattern(getRhs(), m_One())) in fold()
448 if (matchPattern(getRhs(), m_One())) in fold()
471 if (matchPattern(getRhs(), m_One())) in fold()
1782 if (matchPattern(op.getTrueValue(), m_One()) && in matchAndRewrite()
1791 matchPattern(op.getFalseValue(), m_One())) { in matchAndRewrite()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp58 match(One, m_One())) { in simplifyValueKnownNonZero()
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()
311 (match(Op0, m_And(m_Value(), m_One())) && in visitMul()
312 match(Op1, m_And(m_Value(), m_One())))) in visitMul()
321 if (match(Op0, m_Shl(m_One(), m_Value(Y)))) { in visitMul()
324 } else if (match(Op1, m_Shl(m_One(), m_Value(Y)))) { in visitMul()
394 if (match(&I, m_c_BinOp(m_OneUse(m_And(m_Value(X), m_One())), m_Value(Y)))) { in visitMul()
403 m_One()), in visitMul()
876 if (match(Op0, m_One())) { in commonIDivTransforms()
[all …]
H A DInstCombineNegator.cpp178 if (match(Ops[1], m_One())) in visitImpl()
256 m_One()))) { in visitImpl()
399 if (match(Ops[1], m_One())) in visitImpl()
H A DInstCombineSelect.cpp514 if (!match(TVal, m_OneUse(m_And(m_Value(B), m_One())))) in foldSelectICmpAndAnd()
992 !match(II->getArgOperand(1), m_One())) in foldSelectCttzCtlz()
1400 if (!match(Precond1, m_One())) in canonicalizeClampLike()
1405 if (!match(Precond2, m_One())) in canonicalizeClampLike()
2662 if (match(TrueVal, m_One())) { in visitSelectInst()
2765 if (match(FalseVal, m_Zero()) || match(TrueVal, m_One())) { in visitSelectInst()
2806 if (match(TrueVal, m_One()) && in visitSelectInst()
2813 match(TrueVal, m_One())) { in visitSelectInst()
2823 match(TrueVal, m_One()) && in visitSelectInst()
2844 if (match(TrueVal, m_One()) && match(FalseVal, m_Zero())) in visitSelectInst()
[all …]
H A DInstCombineCompares.cpp1759 match(And->getOperand(1), m_One())) in foldICmpAndConstConst()
1827 match(And->getOperand(1), m_One())) { in foldICmpAndConstConst()
2061 if (!match(Shl, m_Shl(m_One(), m_Value(Y)))) in foldICmpShlOne()
2995 if (Pred == ICmpInst::ICMP_SLT && match(Op1, m_One())) in foldICmpBitCast()
3647 m_Add(m_Shl(m_One(), m_Value()), m_AllOnes())), in foldICmpWithLowBitMaskedVal()
4213 if (A && NoOp0WrapProblem && Pred == CmpInst::ICMP_SLE && match(B, m_One())) in foldICmpBinOp()
4217 if (A && NoOp0WrapProblem && Pred == CmpInst::ICMP_SGT && match(B, m_One())) in foldICmpBinOp()
5002 return match(RHS, m_One()); in isNeutralValue()
5877 } else if (match(B, m_One())) { in canonicalizeICmpBool()
5958 m_Add(m_Shl(m_One(), m_Value(Y)), in foldICmpWithHighBitMask()
[all …]
H A DInstCombineAddSub.cpp766 if (match(RHS, m_Add(m_Value(X), m_One()))) in checkForNegativeOperand()
769 if (match(LHS, m_Add(m_Value(X), m_One()))) { in checkForNegativeOperand()
1098 if (!match(&I, m_Add(m_OneUse(m_Shl(m_One(), m_Value(NBits))), m_AllOnes()))) in canonicalizeLowbitMask()
1222 ? !match(SignExtendingValueBaseConstant, m_One()) in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract()
1335 if (match(&I, m_c_BinOp(m_Add(m_Value(A), m_One()), m_Not(m_Value(B)))) || in visitAdd()
1336 match(&I, m_BinOp(m_c_Add(m_Not(m_Value(B)), m_Value(A)), m_One()))) in visitAdd()
H A DInstCombineShifts.cpp212 auto MaskA = m_Add(m_Shl(m_One(), m_Value(MaskShAmt)), m_AllOnes()); in dropRedundantMaskingOfLeftShiftInput()
1050 if (match(Op0, m_One()) && in visitShl()
H A DInstCombineAndOrXor.cpp1766 if (match(Op0, m_OneUse(m_LogicalShift(m_One(), m_Value(X)))) && in visitAnd()
1767 match(Op1, m_One())) { in visitAnd()
1778 m_OneUse(m_Neg(m_And(m_Value(), m_One())))), in visitAnd()
3080 if (match(&I, m_c_Or(m_Add(m_Shl(m_One(), m_Value(X)), m_AllOnes()), in visitOr()
3081 m_Shl(m_One(), m_Deferred(X)))) && in visitOr()
H A DInstCombineCalls.cpp525 assert(match(Op1, m_One()) && "Expected ctlz/cttz operand to be 0 or 1"); in foldCttzCtlz()
549 if (match(Op0, m_OneUse(m_ZExt(m_Value(X)))) && match(Op1, m_One())) { in foldCttzCtlz()
590 if (!match(II.getArgOperand(1), m_One())) in foldCttzCtlz()
1299 if (match(I1, m_One())) { in visitCallInst()
/llvm-project-15.0.7/llvm/lib/Target/ARM/
H A DMVEGatherScatterLowering.cpp463 if (match(Mask, m_One())) in tryCreateMaskedGatherBase()
484 if (match(Mask, m_One())) in tryCreateMaskedGatherBaseWB()
558 if (!match(Mask, m_One())) in tryCreateMaskedGatherOffset()
629 if (match(Mask, m_One())) in tryCreateMaskedScatterBase()
651 if (match(Mask, m_One())) in tryCreateMaskedScatterBaseWB()
710 if (!match(Mask, m_One())) in tryCreateMaskedScatterOffset()
/llvm-project-15.0.7/llvm/lib/Target/RISCV/
H A DRISCVCodeGenPrepare.cpp88 if (match(Src, m_Intrinsic<Intrinsic::abs>(m_Value(), m_One()))) { in optimizeZExt()
/llvm-project-15.0.7/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp711 if (match(A, m_Shl(m_One(), m_Specific(CIV)))) { in matchLeftShift()
714 } else if (match(B, m_Shl(m_One(), m_Specific(CIV)))) { in matchLeftShift()
824 } else if (match(CondV, m_ICmp(P, m_Value(C), m_One())) || in matchRightShift()
825 match(CondV, m_ICmp(P, m_One(), m_Value(C)))) { in matchRightShift()
835 if (!match(C, m_And(m_Value(X), m_One())) && in matchRightShift()
836 !match(C, m_And(m_One(), m_Value(X)))) in matchRightShift()
845 if (!match(TrueV, m_LShr(m_Value(R), m_One()))) in matchRightShift()
856 if (!match(FalseV, m_LShr(m_Value(R), m_One()))) in matchRightShift()
1326 if (!match(&I, m_LShr(m_Value(V), m_One()))) in convertShiftsToLeft()
1416 if (match(&*I, m_LShr(m_Value(V), m_One()))) { in convertShiftsToLeft()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DLowerConstantIntrinsics.cpp76 } else if (match(BI->getOperand(0), m_One())) { in replaceConditionalBranchesOnConstant()
H A DLoopIdiomRecognize.cpp2322 m_LoopInvariant(m_Shl(m_One(), m_Value(BitPos)), in detectShiftUntilBitTestIdiom()
2359 if (!NextX || !match(NextX, m_Shl(m_Specific(CurrX), m_One()))) { in detectShiftUntilBitTestIdiom()
2694 if (!IVNext || !match(IVNext, m_Add(m_Specific(IVPN), m_One()))) { in detectShiftUntilZeroIdiom()
/llvm-project-15.0.7/llvm/lib/Transforms/AggressiveInstCombine/
H A DAggressiveInstCombine.cpp230 if (match(V, m_And(m_Value(Op0), m_One()))) { in matchAndOrChain()
276 else if (match(&I, m_And(m_OneUse(m_Or(m_Value(), m_Value())), m_One()))) in foldAnyOrAllBitsSet()
/llvm-project-15.0.7/mlir/lib/Dialect/Tosa/IR/
H A DTosaCanonicalizations.cpp218 matchPattern(input1, m_One())) { in matchAndRewrite()
234 matchPattern(input2, m_One())) { in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/
H A DSPIRVCanonicalization.cpp180 if (matchPattern(operand2(), m_One())) in fold()
/llvm-project-15.0.7/mlir/include/mlir/IR/
H A DMatchers.h321 inline detail::constant_int_predicate_matcher m_One() { in m_One() function
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DInstructionSimplify.cpp197 if (match(TCmp, m_One()) && impliesPoison(FCmp, Cond)) in handleOtherCmpSelSimplifications()
202 if (match(FCmp, m_One()) && match(TCmp, m_Zero())) in handleOtherCmpSelSimplifications()
900 if (match(Op1, m_One())) in simplifyMulInst()
1006 if (match(Op1, m_One()) || Ty->isIntOrIntVectorTy(1) || in simplifyDivRem()
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()
2849 } else if (match(RHS, m_One())) { in simplifyICmpOfBools()
3309 match(LHS, m_Shl(m_One(), m_Value())) || !C->isZero()) { in simplifyICmpWithBinOp()
4418 if (match(CondC, m_One())) in simplifySelectInst()
4431 if (match(TrueVal, m_One()) && match(FalseVal, m_ZeroInt())) in simplifySelectInst()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DPatternMatch.h517 inline cst_pred_ty<is_one> m_One() { return cst_pred_ty<is_one>(); } in m_One() function
1998 (m_One().match(AddLHS) || m_One().match(AddRHS))) in match()
2003 (m_One().match(AddLHS) || m_One().match(AddRHS))) in match()
/llvm-project-15.0.7/mlir/lib/Dialect/ControlFlow/IR/
H A DControlFlowOps.cpp81 if (matchPattern(op.getArg(), m_One())) { in canonicalize()
/llvm-project-15.0.7/mlir/lib/Dialect/SCF/IR/
H A DSCF.cpp1460 if (!matchPattern(xorStmt.getRhs(), m_One())) in fold()
1839 matchPattern(notv.getRhs(), m_One())) { in matchAndRewrite()
1848 matchPattern(notv.getRhs(), m_One())) { in matchAndRewrite()
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/
H A DAMDGPUInstCombineIntrinsic.cpp774 ((match(Src1, PatternMatch::m_One()) && in instCombineIntrinsic()
/llvm-project-15.0.7/mlir/lib/Dialect/GPU/IR/
H A DGPUDialect.cpp655 if (!matchPattern(size, m_One())) in matchAndRewrite()

12