/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/Hexagon/ |
D | HexagonGenExtract.cpp | 106 bool Match = match(In, m_And(m_Shl(m_LShr(m_Value(BF), m_ConstantInt(CSR)), in INITIALIZE_PASS_DEPENDENCY() 107 m_ConstantInt(CSL)), in INITIALIZE_PASS_DEPENDENCY() 108 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() 113 Match = match(In, m_And(m_Shl(m_AShr(m_Value(BF), m_ConstantInt(CSR)), in INITIALIZE_PASS_DEPENDENCY() 114 m_ConstantInt(CSL)), in INITIALIZE_PASS_DEPENDENCY() 115 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() 121 Match = match(In, m_And(m_Shl(m_Value(BF), m_ConstantInt(CSL)), in INITIALIZE_PASS_DEPENDENCY() 122 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() 130 Match = match(In, m_And(m_LShr(m_Value(BF), m_ConstantInt(CSR)), in INITIALIZE_PASS_DEPENDENCY() 131 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() [all …]
|
/external/llvm/lib/Target/Hexagon/ |
D | HexagonGenExtract.cpp | 94 bool Match = match(In, m_And(m_Shl(m_LShr(m_Value(BF), m_ConstantInt(CSR)), in INITIALIZE_PASS_DEPENDENCY() 95 m_ConstantInt(CSL)), in INITIALIZE_PASS_DEPENDENCY() 96 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() 101 Match = match(In, m_And(m_Shl(m_AShr(m_Value(BF), m_ConstantInt(CSR)), in INITIALIZE_PASS_DEPENDENCY() 102 m_ConstantInt(CSL)), in INITIALIZE_PASS_DEPENDENCY() 103 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() 109 Match = match(In, m_And(m_Shl(m_Value(BF), m_ConstantInt(CSL)), in INITIALIZE_PASS_DEPENDENCY() 110 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() 118 Match = match(In, m_And(m_LShr(m_Value(BF), m_ConstantInt(CSR)), in INITIALIZE_PASS_DEPENDENCY() 119 m_ConstantInt(CM))); in INITIALIZE_PASS_DEPENDENCY() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | StraightLineStrengthReduce.cpp | 368 if (match(RHS, m_Mul(m_Value(S), m_ConstantInt(Idx)))) { in allocateCandidatesAndFindBasisForAdd() 371 } else if (match(RHS, m_Shl(m_Value(S), m_ConstantInt(Idx)))) { in allocateCandidatesAndFindBasisForAdd() 386 return (match(A, m_Add(m_Value(B), m_ConstantInt(C))) || in matchesAdd() 387 match(A, m_Add(m_ConstantInt(C), m_Value(B)))); in matchesAdd() 392 return (match(A, m_Or(m_Value(B), m_ConstantInt(C))) || in matchesOr() 393 match(A, m_Or(m_ConstantInt(C), m_Value(B)))); in matchesOr() 468 if (match(ArrayIdx, m_NSWMul(m_Value(LHS), m_ConstantInt(RHS)))) { in factorArrayIndex() 472 } else if (match(ArrayIdx, m_NSWShl(m_Value(LHS), m_ConstantInt(RHS)))) { in factorArrayIndex()
|
D | GuardWidening.cpp | 413 if (match(Cond0, m_ICmp(Pred0, m_Value(LHS), m_ConstantInt(RHS0))) && in widenCondCommon() 414 match(Cond1, m_ICmp(Pred1, m_Specific(LHS), m_ConstantInt(RHS1)))) { in widenCondCommon() 531 if (match(Check.getBase(), m_Add(m_Value(OpLHS), m_ConstantInt(OpRHS)))) { in parseRangeChecks() 537 m_Or(m_Value(OpLHS), m_ConstantInt(OpRHS)))) { in parseRangeChecks()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | StraightLineStrengthReduce.cpp | 404 if (match(RHS, m_Mul(m_Value(S), m_ConstantInt(Idx)))) { in allocateCandidatesAndFindBasisForAdd() 407 } else if (match(RHS, m_Shl(m_Value(S), m_ConstantInt(Idx)))) { in allocateCandidatesAndFindBasisForAdd() 422 return (match(A, m_Add(m_Value(B), m_ConstantInt(C))) || in matchesAdd() 423 match(A, m_Add(m_ConstantInt(C), m_Value(B)))); in matchesAdd() 428 return (match(A, m_Or(m_Value(B), m_ConstantInt(C))) || in matchesOr() 429 match(A, m_Or(m_ConstantInt(C), m_Value(B)))); in matchesOr() 504 if (match(ArrayIdx, m_NSWMul(m_Value(LHS), m_ConstantInt(RHS)))) { in factorArrayIndex() 508 } else if (match(ArrayIdx, m_NSWShl(m_Value(LHS), m_ConstantInt(RHS)))) { in factorArrayIndex()
|
D | GuardWidening.cpp | 470 if (match(Cond0, m_ICmp(Pred0, m_Value(LHS), m_ConstantInt(RHS0))) && in widenCondCommon() 471 match(Cond1, m_ICmp(Pred1, m_Specific(LHS), m_ConstantInt(RHS1)))) { in widenCondCommon() 588 if (match(Check.getBase(), m_Add(m_Value(OpLHS), m_ConstantInt(OpRHS)))) { in parseRangeChecks() 594 m_Or(m_Value(OpLHS), m_ConstantInt(OpRHS)))) { in parseRangeChecks()
|
D | LoopDeletion.cpp | 110 m_Br(m_ConstantInt(Cond), Taken, NotTaken))) in isLoopNeverExecuted()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineAddSub.cpp | 115 if (match(LHS, m_Xor(m_Value(XorLHS), m_ConstantInt(XorRHS)))) { in visitAdd() 237 match(LHS, m_And(m_Value(X), m_ConstantInt(C2))) && in visitAdd() 565 if (match(Op1, m_LShr(m_Value(X), m_ConstantInt(CI))) && in visitSub() 570 if (match(Op1, m_AShr(m_Value(X), m_ConstantInt(CI))) && in visitSub() 588 if (match(Op1, m_Add(m_Value(X), m_ConstantInt(C2)))) in visitSub() 632 if (match(Op1, m_Mul(m_Specific(Op0), m_ConstantInt(CI)))) { in visitSub() 638 if (match(Op1, m_Shl(m_Specific(Op0), m_ConstantInt(CI)))) { in visitSub() 653 if (match(Op1, m_Mul(m_Value(A), m_ConstantInt(CI))) || in visitSub() 654 match(Op1, m_Mul(m_ConstantInt(CI), m_Value(A)))) { in visitSub()
|
D | InstCombineAndOrXor.cpp | 783 match(Val, m_And(m_Specific(V), m_ConstantInt(AndCst)))) { in FoldAndOfICmps() 789 match(Val2, m_And(m_Specific(V), m_ConstantInt(AndCst)))) { in FoldAndOfICmps() 1132 if (match(Op0, m_Trunc(m_And(m_Value(X), m_ConstantInt(YC))))) { in visitAnd() 1511 if (match(Val, m_Add(m_Specific(Val2), m_ConstantInt(AddCst)))) in FoldOrOfICmps() 1740 if (!match(Op, m_And(m_Value(V1), m_ConstantInt(CI2)))) return 0; in FoldOrWithConstants() 1773 if (match(Op0, m_And(m_Value(X), m_ConstantInt(C1))) && in visitOr() 1784 if (match(Op0, m_Xor(m_Value(X), m_ConstantInt(C1))) && in visitOr() 1818 match(Op0, m_Xor(m_Value(A), m_ConstantInt(C1))) && in visitOr() 1827 match(Op1, m_Xor(m_Value(A), m_ConstantInt(C1))) && in visitOr() 1885 if (match(A, m_Or(m_Value(V1), m_ConstantInt(C3))) && in visitOr() [all …]
|
D | InstCombineShifts.cpp | 82 if ((isLeftShift && match(I, m_LShr(m_Value(), m_ConstantInt(CI)))) || in CanEvaluateShifted() 83 (!isLeftShift && match(I, m_Shl(m_Value(), m_ConstantInt(CI))))) { in CanEvaluateShifted() 433 m_ConstantInt(CC))) && in FoldShiftByConstant() 465 m_ConstantInt(CC))) && V2 == Op1 && in FoldShiftByConstant()
|
D | InstCombineCompares.cpp | 1861 match(Op0, m_Add(m_Add(m_Value(A), m_Value(B)), m_ConstantInt(CI2)))) in visitICmpInst() 1961 if (!match(Op0, m_And(m_Value(LHS), m_ConstantInt(LHSC))) || in visitICmpInst() 1998 if (!match(Op0, m_And(m_Value(LHS), m_ConstantInt(LHSC))) || in visitICmpInst() 2483 if (match(B, m_ConstantInt(C1)) && in visitICmpInst() 2484 match(D, m_ConstantInt(C2)) && Op1->hasOneUse()) { in visitICmpInst() 2537 m_ConstantInt(ShAmt))))) && in visitICmpInst() 2538 match(Op1, m_ConstantInt(Cst1)) && in visitICmpInst() 2561 if (match(Op0, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op1 == X) in visitICmpInst() 2565 if (match(Op1, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op0 == X) in visitICmpInst()
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/IR/ |
D | PatternMatch.cpp | 482 match(VI1, m_InsertElement(m_Undef(), m_ConstantInt(), m_ConstantInt()))); in TEST_F() 484 match(VI1, m_InsertElement(m_Undef(), m_ConstantInt(), m_Zero()))); in TEST_F() 489 match(VI2, m_InsertElement(m_Value(), m_Value(), m_ConstantInt()))); in TEST_F() 491 match(VI2, m_InsertElement(m_Value(), m_ConstantInt(), m_Value()))); in TEST_F() 504 EXPECT_FALSE(match(EX1, m_ExtractElement(m_Value(), m_ConstantInt()))); in TEST_F() 505 EXPECT_TRUE(match(EX2, m_ExtractElement(m_Value(), m_ConstantInt()))); in TEST_F() 506 EXPECT_TRUE(match(EX3, m_ExtractElement(m_Constant(), m_ConstantInt()))); in TEST_F()
|
/external/swiftshader/third_party/LLVM/include/llvm/Support/ |
D | PatternMatch.h | 69 inline class_match<ConstantInt> m_ConstantInt() { in m_ConstantInt() function 134 inline constantint_match<Val> m_ConstantInt() { in m_ConstantInt() function 228 inline bind_ty<ConstantInt> m_ConstantInt(ConstantInt *&CI) { return CI; } in m_ConstantInt() function 264 inline bind_const_intval_ty m_ConstantInt(uint64_t &V) { return V; } in m_ConstantInt() function 516 return m_Select(C, m_ConstantInt<L>(), m_ConstantInt<R>()); in m_SelectCst()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAndOrXor.cpp | 925 match(Val, m_And(m_Specific(V), m_ConstantInt(AndCst)))) { in FoldAndOfICmps() 929 match(Val2, m_And(m_Specific(V), m_ConstantInt(AndCst)))) { in FoldAndOfICmps() 1179 if (match(Op0, m_OneUse(m_Xor(m_ZExt(m_Value(A)), m_ConstantInt(C1)))) && in matchDeMorgansLaws() 1417 if (match(Op0, m_Trunc(m_And(m_Value(X), m_ConstantInt(YC))))) { in visitAnd() 1741 if (match(LAdd, m_Add(m_Value(LAddOpnd), m_ConstantInt(LAddCst))) && in FoldOrOfICmps() 1742 match(RAdd, m_Add(m_Value(RAddOpnd), m_ConstantInt(RAddCst))) && in FoldOrOfICmps() 1844 if (match(Val, m_Add(m_Specific(Val2), m_ConstantInt(AddCst)))) in FoldOrOfICmps() 2077 if (!match(Op, m_And(m_Value(V1), m_ConstantInt(CI2)))) return nullptr; in FoldOrWithConstants() 2107 if (!match(Op, m_And(m_Value(V1), m_ConstantInt(CI2)))) in FoldXorWithConstants() 2148 if (match(Op0, m_And(m_Value(X), m_ConstantInt(C1))) && in visitOr() [all …]
|
D | InstCombineShifts.cpp | 129 if ((IsLeftShift && match(I, m_LShr(m_Value(), m_ConstantInt(CI)))) || in CanEvaluateShifted() 130 (!IsLeftShift && match(I, m_Shl(m_Value(), m_ConstantInt(CI))))) { in CanEvaluateShifted() 449 m_ConstantInt(CC)))) { in FoldShiftByConstant() 484 m_ConstantInt(CC))) && V2 == Op1) { in FoldShiftByConstant()
|
D | InstCombineCompares.cpp | 2766 if (match(OtherVal, m_And(m_Value(ValToMask), m_ConstantInt(CI)))) { in ProcessUMulZExtIdiom() 3264 match(Op0, m_Add(m_Add(m_Value(A), m_Value(B)), m_ConstantInt(CI2)))) in visitICmpInst() 3313 if (match(Op0, m_AShr(m_ConstantInt(CI2), m_Value(A))) || in visitICmpInst() 3314 match(Op0, m_LShr(m_ConstantInt(CI2), m_Value(A)))) { in visitICmpInst() 3319 if (match(Op0, m_Shl(m_ConstantInt(CI2), m_Value(A)))) { in visitICmpInst() 3338 if (BI && match(BI, m_Br(m_ICmp(Pred, m_Specific(Op0), m_ConstantInt(CI2)), in visitICmpInst() 3426 if (!match(Op0, m_And(m_Value(LHS), m_ConstantInt(LHSC))) || in visitICmpInst() 3470 if (!match(Op0, m_And(m_Value(LHS), m_ConstantInt(LHSC))) || in visitICmpInst() 4145 if (match(B, m_ConstantInt(C1)) && in visitICmpInst() 4146 match(D, m_ConstantInt(C2)) && Op1->hasOneUse()) { in visitICmpInst() [all …]
|
D | InstCombineCasts.cpp | 450 m_ConstantInt(ShiftVal)))) || in foldVecTruncToExtElt() 525 match(Src, m_LShr(m_ZExt(m_Value(A)), m_ConstantInt(Cst)))) { in visitTrunc() 551 match(Src, m_LShr(m_SExt(m_Value(A)), m_ConstantInt(Cst))) && in visitTrunc() 569 match(Src, m_And(m_Value(A), m_ConstantInt(Cst)))) { in visitTrunc() 1201 if (match(Src, m_AShr(m_Shl(m_Trunc(m_Value(A)), m_ConstantInt(BA)), in visitSExt() 1202 m_ConstantInt(CA))) && in visitSExt()
|
/external/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 1040 if (!isSigned && match(Op0, m_UDiv(m_Value(X), m_ConstantInt(C1))) && in SimplifyDiv() 1041 match(Op1, m_ConstantInt(C2))) { in SimplifyDiv() 1521 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_ConstantInt(CI1)), in SimplifyAndOfICmps() 1522 m_ConstantInt(CI2)))) in SimplifyAndOfICmps() 1693 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_ConstantInt(CI1)), in SimplifyOrOfICmps() 1694 m_ConstantInt(CI2)))) in SimplifyOrOfICmps() 2306 if (match(LHS, m_URem(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 2309 } else if (match(LHS, m_SRem(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 2313 } else if (match(LHS, m_UDiv(m_ConstantInt(CI2), m_Value()))) { in SimplifyICmpInst() 2316 } else if (match(LHS, m_UDiv(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineShifts.cpp | 136 if ((IsLeftShift && match(I, m_LShr(m_Value(), m_ConstantInt(CI)))) || in canEvaluateShifted() 137 (!IsLeftShift && match(I, m_Shl(m_Value(), m_ConstantInt(CI))))) { in canEvaluateShifted() 458 m_ConstantInt(CC)))) { in FoldShiftByConstant() 492 m_ConstantInt(CC))) && V2 == Op1) { in FoldShiftByConstant()
|
D | InstCombineCompares.cpp | 1361 match(X, m_Add(m_Add(m_Value(A), m_Value(B)), m_ConstantInt(CI2)))) in foldICmpWithConstant() 1379 if (BI && match(BI, m_Br(m_ICmp(Pred2, m_Specific(X), m_ConstantInt(CI2)), in foldICmpWithConstant() 2400 if (match(SI->getTrueValue(), m_ConstantInt(Equal)) && in matchThreeWayIntCompare() 2405 m_ConstantInt(Less), m_ConstantInt(Greater))) && in matchThreeWayIntCompare() 3480 if (match(B, m_ConstantInt(C1)) && match(D, m_ConstantInt(C2)) && in foldICmpEquality() 3541 match(Op1, m_And(m_Value(B), m_ConstantInt(Cst1)))) || in foldICmpEquality() 3542 (Op1->hasOneUse() && match(Op0, m_And(m_Value(B), m_ConstantInt(Cst1))) && in foldICmpEquality() 3552 if ((match(Op0, m_OneUse(m_LShr(m_Value(A), m_ConstantInt(Cst1)))) && in foldICmpEquality() 3554 (match(Op0, m_OneUse(m_AShr(m_Value(A), m_ConstantInt(Cst1)))) && in foldICmpEquality() 3568 if (match(Op0, m_OneUse(m_Shl(m_Value(A), m_ConstantInt(Cst1)))) && in foldICmpEquality() [all …]
|
D | InstCombineAndOrXor.cpp | 969 match(LHS0, m_And(m_Specific(V), m_ConstantInt(AndC)))) { in foldAndOfICmps() 973 match(RHS0, m_And(m_Specific(V), m_ConstantInt(AndC)))) { in foldAndOfICmps() 1505 if (match(Op0I, m_c_BinOp(m_ZExt(m_Value(X)), m_ConstantInt(C1)))) { in visitAnd() 1530 if (match(Op0, m_Trunc(m_And(m_Value(X), m_ConstantInt(YC))))) { in visitAnd() 1806 if (match(LAdd, m_Add(m_Value(LAddOpnd), m_ConstantInt(LAddC))) && in foldOrOfICmps() 1807 match(RAdd, m_Add(m_Value(RAddOpnd), m_ConstantInt(RAddC))) && in foldOrOfICmps() 1913 if (match(LHS0, m_Add(m_Specific(RHS0), m_ConstantInt(AddC)))) in foldOrOfICmps() 2091 if (match(A, m_Or(m_Value(V1), m_ConstantInt(C3))) && in visitOr() 2093 match(B, m_Or(m_Specific(V1), m_ConstantInt(C4))) && in visitOr() 2256 match(Op0, m_Or(m_Value(A), m_ConstantInt(C1)))) { in visitOr()
|
D | InstCombineVectorOps.cpp | 672 match(InsElt1->getOperand(2), m_ConstantInt(IdxC1)) && in hoistInsEltConst() 674 match(InsElt2.getOperand(2), m_ConstantInt(IdxC2)) && IdxC1 != IdxC2) { in hoistInsEltConst() 697 !match(InsElt.getOperand(2), m_ConstantInt(InsEltIndex))) in foldConstantInsEltIntoShuffle() 744 if (!match(InsElt.getOperand(2), m_ConstantInt(InsertIdx[0])) || in foldConstantInsEltIntoShuffle() 746 !match(IEI->getOperand(2), m_ConstantInt(InsertIdx[1])) || in foldConstantInsEltIntoShuffle()
|
/external/llvm/include/llvm/IR/ |
D | PatternMatch.h | 75 inline class_match<ConstantInt> m_ConstantInt() { in m_ConstantInt() function 198 template <int64_t Val> inline constantint_match<Val> m_ConstantInt() { in m_ConstantInt() function 305 inline bind_ty<ConstantInt> m_ConstantInt(ConstantInt *&CI) { return CI; } in m_ConstantInt() function 387 inline bind_const_intval_ty m_ConstantInt(uint64_t &V) { return V; } in m_ConstantInt() function 768 return m_Select(C, m_ConstantInt<L>(), m_ConstantInt<R>()); in m_SelectCst()
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | InstructionSimplify.cpp | 637 if (match(Op0, m_Mul(m_Specific(Op1), m_ConstantInt<2>())) || in SimplifySubInst() 1560 if (match(LHS, m_URem(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 1563 } else if (match(LHS, m_SRem(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 1567 } else if (match(LHS, m_UDiv(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 1572 } else if (match(LHS, m_SDiv(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 1581 } else if (match(LHS, m_LShr(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 1586 } else if (match(LHS, m_AShr(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 1594 } else if (match(LHS, m_Or(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst() 1597 } else if (match(LHS, m_And(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/AggressiveInstCombine/ |
D | AggressiveInstCombine.cpp | 106 if (!match(V, m_LShr(m_Value(Candidate), m_ConstantInt(BitIndex)))) in matchAndOrChain()
|