| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSelect.cpp | 137 if (!match(Cmp->getOperand(1), m_Zero())) in foldSelectICmpAnd() 617 if (!match(CmpRHS, m_Zero())) in foldSelectICmpAndOr() 786 if (match(TrueVal, m_Zero())) { in canonicalizeSaturatedSubtract() 790 if (!match(FalseVal, m_Zero())) in canonicalizeSaturatedSubtract() 1638 match(CmpRHS, m_Zero())) { in foldSelectInstWithICmp() 1919 match(TrueVal, m_Zero())) in foldOverflowingAddSubSelect() 2674 if (match(FalseVal, m_Zero())) { in visitSelectInst() 2792 match(FalseVal, m_Zero())) { in visitSelectInst() 2798 match(FalseVal, m_Zero())) { in visitSelectInst() 3167 if (match(FalseVal, m_Zero()) && in visitSelectInst() [all …]
|
| H A D | InstCombineMulDivRem.cpp | 686 if (match(SI->getTrueValue(), m_Zero())) in simplifyDivRemOfSelectWithZeroOp() 689 else if (match(SI->getFalseValue(), m_Zero())) in simplifyDivRemOfSelectWithZeroOp() 1163 match(Op0, m_NSWSub(m_Zero(), m_Value(X)))) { in visitSDiv() 1173 if (match(&I, m_SDiv(m_OneUse(m_NSWSub(m_Zero(), m_Value(X))), m_Value(Y)))) in visitSDiv() 1571 if (match(&I, m_SRem(m_OneUse(m_NSWSub(m_Zero(), m_Value(X))), m_Value(Y)))) in visitSRem()
|
| H A D | InstCombineAndOrXor.cpp | 729 if (!match(LHS->getOperand(1), m_Zero()) || in foldAndOrOfICmpsOfAndWithPow2() 730 !match(RHS->getOperand(1), m_Zero())) in foldAndOrOfICmpsOfAndWithPow2() 833 if (match(ICmp, m_ICmp(Pred, m_And(m_Value(X), m_APInt(Mask)), m_Zero())) && in foldSignedTruncationCheck() 942 if (!match(ZeroICmp, m_ICmp(EqPred, m_Value(ZeroCmpOp), m_Zero())) || in foldUnsignedUnderflowCheck() 2368 if (!((match(EltC1, m_Zero()) && match(EltC2, m_AllOnes())) || in areInverseVectorBitmasks() 2369 (match(EltC2, m_Zero()) && match(EltC1, m_AllOnes())))) in areInverseVectorBitmasks() 2494 if (LPred != ICmpInst::ICMP_EQ || !match(LHS->getOperand(1), m_Zero()) || in foldAndOrOfICmpEqZeroAndICmp()
|
| H A D | InstCombineCompares.cpp | 1333 m_CombineAnd(m_Zero(), m_Value(Zero))))) in foldIRemByPowerOfTwoToBitTest() 1378 if (!match(Cmp.getOperand(1), m_Zero())) in foldICmpWithZero() 2991 match(Op1, m_Zero())) in foldICmpBitCast() 3008 if (Cmp.isEquality() && match(Op1, m_Zero())) in foldICmpBitCast() 3811 if (!I.isEquality() || !match(I.getOperand(1), m_Zero()) || in foldShiftIntoShiftInAnotherHandOfAndInICmp() 5000 return match(RHS, m_Zero()); in isNeutralValue() 5868 if (match(B, m_Zero())) { in canonicalizeICmpBool() 6064 match(I.getOperand(1), m_Zero()) && in foldICmpInvariantGroup() 6099 m_Zero()))) in foldReductionIdiom() 6143 if (I.getPredicate() == ICmpInst::ICMP_NE && match(Op1, m_Zero())) { in visitICmpInst() [all …]
|
| H A D | InstCombineAddSub.cpp | 1209 if (!match(Zero, m_Zero())) in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract() 1398 if (match(FV, m_Zero()) && match(TV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd() 1402 if (match(TV, m_Zero()) && match(FV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd()
|
| H A D | InstCombineCalls.cpp | 521 if (match(Op1, m_Zero())) in foldCttzCtlz() 2220 if (match(IIOperand, m_ICmp(Pred, m_Instruction(LHS), m_Zero())) && in visitCallInst() 2238 match(IIOperand, m_Cmp(Pred, m_Value(A), m_Zero())) && in visitCallInst() 2260 m_Zero())) && in visitCallInst()
|
| H A D | InstructionCombining.cpp | 1430 if (match(Val, m_Zero()) || Scale == 1) { in Descale() 1606 if (match(Op, m_Zero())) { in Descale() 2320 if (!isa<Constant>(*I) || !match(I->get(), m_Zero())) { in visitGetElementPtrInst() 2994 m_Zero()), in tryToMoveFreeBeforeNullTest()
|
| /llvm-project-15.0.7/llvm/unittests/IR/ |
| H A D | PatternMatch.cpp | 484 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() 490 EXPECT_TRUE(m_c_Add(m_One(), m_Zero()).match(X)); in TEST_F() 491 EXPECT_TRUE(m_c_Add(m_Zero(), m_One()).match(X)); in TEST_F() 1076 EXPECT_FALSE(match(ScalarUndef, m_Zero())); in TEST_F() 1077 EXPECT_FALSE(match(VectorUndef, m_Zero())); in TEST_F() 1078 EXPECT_TRUE(match(ScalarZero, m_Zero())); in TEST_F() 1079 EXPECT_TRUE(match(VectorZero, m_Zero())); in TEST_F() 1080 EXPECT_TRUE(match(VectorZeroUndef, m_Zero())); in TEST_F() 1749 EXPECT_TRUE(match(X, m_Zero())); in TEST_F() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | InstructionSimplify.cpp | 644 if (match(Op1, m_Zero())) in simplifyAddInst() 762 if (match(Op1, m_Zero())) in simplifySubInst() 770 if (match(Op0, m_Zero())) { in simplifySubInst() 964 if (match(Op1, m_Zero())) in simplifyDivRem() 992 if (match(Op0, m_Zero())) in simplifyDivRem() 1286 if (match(Op0, m_Zero())) in simplifyShift() 2062 if (match(Op1, m_Zero())) in simplifyAndInst() 2494 if (match(Op1, m_Zero())) in simplifyXorInst() 2906 if (!match(RHS, m_Zero())) in simplifyICmpWithZero() 5874 if (match(Op0, m_Zero()) || match(Op1, m_Zero())) in simplifyBinaryIntrinsic() [all …]
|
| H A D | OverflowInstAnalysis.cpp | 28 if (!match(Op0, m_ICmp(Pred, m_Value(X), m_Zero()))) in isCheckForZeroAndMulWithOverflow()
|
| H A D | VectorUtils.cpp | 158 while (LastOperand > 1 && match(Gep->getOperand(LastOperand), m_Zero())) { in getGEPInductionOperand()
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstSimplify/ |
| H A D | shr-scalar-vector-consistency.ll | 5 ; If m_Zero() is able to match a vector undef, but not a scalar undef,
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/IR/ |
| H A D | ArithmeticOps.cpp | 195 if (matchPattern(getRhs(), m_Zero())) in fold() 227 if (matchPattern(getRhs(), m_Zero())) in fold() 248 if (matchPattern(getRhs(), m_Zero())) in fold() 494 if (matchPattern(getRhs(), m_Zero())) in fold() 511 if (matchPattern(getRhs(), m_Zero())) in fold() 528 if (matchPattern(getRhs(), m_Zero())) in fold() 1320 if (matchPattern(getRhs(), m_Zero())) { in fold() 1783 matchPattern(op.getFalseValue(), m_Zero())) { in matchAndRewrite() 1790 if (matchPattern(op.getTrueValue(), m_Zero()) && in matchAndRewrite() 1823 if (matchPattern(condition, m_Zero())) in fold() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/ |
| H A D | SPIRVCanonicalization.cpp | 158 if (matchPattern(operand2(), m_Zero())) in fold() 177 if (matchPattern(operand2(), m_Zero())) in fold()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | LowerConstantIntrinsics.cpp | 73 if (match(BI->getOperand(0), m_Zero())) { in replaceConditionalBranchesOnConstant()
|
| H A D | ConstraintElimination.cpp | 291 if (match(Op1, m_Zero())) { in getConstraint() 299 if (!match(Op1, m_Zero())) in getConstraint()
|
| H A D | LoopIdiomRecognize.cpp | 2317 return ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero()) && in detectShiftUntilBitTestIdiom() 2326 return ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero()) && in detectShiftUntilBitTestIdiom() 2652 m_ICmp(Pred, m_Instruction(ValShifted), m_Zero())) || in detectShiftUntilZeroIdiom()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SparseTensor/Transforms/ |
| H A D | SparseTensorRewriting.cpp | 47 return matchPattern(val, m_Zero()) || matchPattern(val, m_AnyZeroFloat()) || in isEmptyInit()
|
| /llvm-project-15.0.7/mlir/include/mlir/IR/ |
| H A D | Matchers.h | 310 inline detail::constant_int_predicate_matcher m_Zero() { in m_Zero() function
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | ConstantFold.cpp | 931 if (match(C2, m_CombineOr(m_Undef(), m_Zero()))) in ConstantFoldBinaryInstruction() 942 if (match(C2, m_CombineOr(m_Undef(), m_Zero()))) in ConstantFoldBinaryInstruction() 955 if (match(C2, m_Zero())) in ConstantFoldBinaryInstruction() 964 if (match(C2, m_Zero())) in ConstantFoldBinaryInstruction() 974 if (match(C2, m_Zero())) in ConstantFoldBinaryInstruction()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SCF/Transforms/ |
| H A D | TileUsingInterface.cpp | 122 if (matchPattern(tileSizeVals[loopRange.index()], m_Zero())) { in generateTileLoopNest()
|
| /llvm-project-15.0.7/llvm/lib/Target/Hexagon/ |
| H A D | HexagonLoopIdiomRecognition.cpp | 726 if (match(C, m_Zero())) in matchLeftShift() 763 } else if (match(ShouldSameV, m_Zero())) { in matchLeftShift() 817 if (match(CondV, m_ICmp(P, m_Value(C), m_Zero())) || in matchRightShift() 818 match(CondV, m_ICmp(P, m_Zero(), m_Value(C)))) { in matchRightShift()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/ControlFlow/IR/ |
| H A D | ControlFlowOps.cpp | 219 if (matchPattern(condbr.getCondition(), m_Zero())) { in matchAndRewrite()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUInstCombineIntrinsic.cpp | 799 if (match(Src1, PatternMatch::m_Zero()) && in instCombineIntrinsic()
|
| /llvm-project-15.0.7/llvm/lib/Target/ARM/ |
| H A D | MVEGatherScatterLowering.cpp | 435 if (!isa<UndefValue>(PassThru) && !match(PassThru, m_Zero())) { in lowerGather()
|