/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() 1180 match(Op1, m_OneUse(m_Xor(m_ZExt(m_Value(B)), m_Specific(C1))))) { in matchDeMorgansLaws() 1481 if (match(Op0, m_Or(m_Not(m_Specific(Op1)), m_Value(A))) || in visitAnd() 1482 match(Op0, m_Or(m_Value(A), m_Not(m_Specific(Op1))))) in visitAnd() 1484 if (match(Op1, m_Or(m_Not(m_Specific(Op0)), m_Value(A))) || in visitAnd() 1485 match(Op1, m_Or(m_Value(A), m_Not(m_Specific(Op0))))) in visitAnd() 1490 if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A)))) in visitAnd() 1496 if (match(Op1, m_Xor(m_Specific(B), m_Specific(A)))) in visitAnd() 1502 match(Op1, m_Xor(m_Not(m_Specific(A)), m_Specific(B)))) in visitAnd() [all …]
|
D | InstCombineAddSub.cpp | 1197 if (match(FV, m_Zero()) && match(TV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd() 1201 if (match(TV, m_Zero()) && match(FV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd() 1246 (match(LHS, m_And(m_Specific(A), m_Specific(B))) || in visitAdd() 1247 match(LHS, m_And(m_Specific(B), m_Specific(A))))) in visitAdd() 1251 (match(RHS, m_And(m_Specific(A), m_Specific(B))) || in visitAdd() 1252 match(RHS, m_And(m_Specific(B), m_Specific(A))))) in visitAdd() 1260 (match(LHS, m_And(m_Specific(A), m_Specific(B))) || in visitAdd() 1261 match(LHS, m_And(m_Specific(B), m_Specific(A))))) { in visitAdd() 1269 (match(RHS, m_And(m_Specific(A), m_Specific(B))) || in visitAdd() 1270 match(RHS, m_And(m_Specific(B), m_Specific(A))))) { in visitAdd() [all …]
|
D | InstCombineSelect.cpp | 329 bool OrOnFalseVal = match(FalseVal, m_Or(m_Specific(TrueVal), m_Power2(C2))); in foldSelectICmpAndOr() 331 OrOnTrueVal = match(TrueVal, m_Or(m_Specific(FalseVal), m_Power2(C2))); in foldSelectICmpAndOr() 399 if (match(Count, m_Intrinsic<Intrinsic::cttz>(m_Specific(CmpLHS))) || in foldSelectCttzCtlz() 400 match(Count, m_Intrinsic<Intrinsic::ctlz>(m_Specific(CmpLHS)))) { in foldSelectCttzCtlz() 463 if (match(TrueVal, m_SExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp() 467 } else if (match(FalseVal, m_SExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp() 477 if (match(TrueVal, m_ZExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp() 481 } else if (match(FalseVal, m_ZExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp() 583 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in visitSelectInstWithICmp() 587 match(TrueVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C) in visitSelectInstWithICmp() [all …]
|
D | InstCombineShifts.cpp | 429 m_Specific(Op1)))) { in FoldShiftByConstant() 448 m_And(m_OneUse(m_Shr(m_Value(V1), m_Specific(Op1))), in FoldShiftByConstant() 465 m_Specific(Op1)))) { in FoldShiftByConstant() 801 if (match(Op0, m_Shl(m_Value(X), m_Specific(Op1)))) { in visitAShr()
|
D | InstCombineMulDivRem.cpp | 924 if ((isSigned && match(Z, m_SRem(m_Specific(X), m_Specific(Op1)))) || in commonIDivTransforms() 925 (!isSigned && match(Z, m_URem(m_Specific(X), m_Specific(Op1))))) in commonIDivTransforms()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 98 if (!match(Cond, m_c_BinOp(m_c_ICmp(Pred1, m_Specific(TrueVal), in foldSelectWithBinaryOp() 99 m_Specific(FalseVal)), in foldSelectWithBinaryOp() 593 if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0))) || in SimplifyAddInst() 594 match(Op0, m_Sub(m_Value(Y), m_Specific(Op1)))) in SimplifyAddInst() 599 if (match(Op0, m_Not(m_Specific(Op1))) || in SimplifyAddInst() 600 match(Op1, m_Not(m_Specific(Op0)))) in SimplifyAddInst() 864 if (match(Op0, m_Exact(m_IDiv(m_Value(X), m_Specific(Op1)))) || // (X / Y) * Y in SimplifyMulInst() 865 match(Op1, m_Exact(m_IDiv(m_Value(X), m_Specific(Op0))))) // Y * (X / Y) in SimplifyMulInst() 1035 if (match(Op0, m_c_Mul(m_Value(X), m_Specific(Op1)))) { in simplifyDiv() 1042 if ((IsSigned && match(X, m_SDiv(m_Value(), m_Specific(Op1)))) || in simplifyDiv() [all …]
|
D | ValueTracking.cpp | 196 match(RHS, m_c_And(m_Specific(M), m_Value()))) in haveNoCommonBitsSet() 199 match(LHS, m_c_And(m_Specific(M), m_Value()))) in haveNoCommonBitsSet() 600 if (match(Arg, m_Not(m_Specific(V))) && in computeKnownBitsFromAssume() 612 auto m_V = m_CombineOr(m_Specific(V), in computeKnownBitsFromAssume() 613 m_CombineOr(m_PtrToInt(m_Specific(V)), in computeKnownBitsFromAssume() 614 m_BitCast(m_Specific(V)))); in computeKnownBitsFromAssume() 1716 if (match(X, m_Neg(m_Specific(Y))) || match(Y, m_Neg(m_Specific(X)))) in isKnownToBeAPowerOfTwo() 1726 if (match(X, m_And(m_Specific(Y), m_Value())) || in isKnownToBeAPowerOfTwo() 1727 match(X, m_And(m_Value(), m_Specific(Y)))) in isKnownToBeAPowerOfTwo() 1730 if (match(Y, m_And(m_Specific(X), m_Value())) || in isKnownToBeAPowerOfTwo() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/ |
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() 1319 match(Op1, m_Not(m_c_Or(m_Specific(A), m_Specific(B))))) in foldOrToXor() 1327 match(Op1, m_c_And(m_Not(m_Specific(A)), m_Specific(B)))) in foldOrToXor() 1369 if (!match(Op0, m_OneUse(m_Add(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1370 !match(Op0, m_OneUse(m_Mul(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1371 !match(Op0, m_OneUse(m_LShr(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1372 !match(Op0, m_OneUse(m_Shl(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1373 !match(Op0, m_OneUse(m_Sub(m_Constant(C), m_Specific(Op1))))) in narrowMaskedBinOp() 1555 if (match(Op1, m_OneUse(m_c_Xor(m_Specific(Op0), m_Value(B))))) in visitAnd() [all …]
|
D | InstCombineSelect.cpp | 79 if (BO && match(BO, m_c_BinOp(m_Specific(X), m_Value(Z))) && in foldSelectBinOpIdentity() 471 if (!match(Cmp->getOperand(0), m_c_And(m_Specific(X), m_Value(Y)))) in foldSelectICmpAndAnd() 544 bool OrOnFalseVal = match(FalseVal, m_Or(m_Specific(TrueVal), m_Power2(C2))); in foldSelectICmpAndOr() 546 OrOnTrueVal = match(TrueVal, m_Or(m_Specific(FalseVal), m_Power2(C2))); in foldSelectICmpAndOr() 623 if (match(TrueVal, m_Sub(m_Specific(B), m_Specific(A)))) in canonicalizeSaturatedSubtract() 625 else if (!match(TrueVal, m_Sub(m_Specific(A), m_Specific(B)))) in canonicalizeSaturatedSubtract() 681 if (match(Count, m_Intrinsic<Intrinsic::cttz>(m_Specific(CmpLHS))) || in foldSelectCttzCtlz() 682 match(Count, m_Intrinsic<Intrinsic::ctlz>(m_Specific(CmpLHS)))) { in foldSelectCttzCtlz() 740 if (match(TrueVal, m_SExt(m_Specific(CmpLHS))) && SextRHS == FalseVal) { in adjustMinMax() 743 } else if (match(FalseVal, m_SExt(m_Specific(CmpLHS))) && in adjustMinMax() [all …]
|
D | InstCombineMulDivRem.cpp | 517 if (match(Op0, m_OneUse(m_c_FMul(m_Specific(Op1), m_Value(Y)))) && in visitFMul() 522 if (match(Op1, m_OneUse(m_c_FMul(m_Specific(Op0), m_Value(Y)))) && in visitFMul() 764 if ((IsSigned && match(Z, m_SRem(m_Specific(X), m_Specific(Op1)))) || in commonIDivTransforms() 765 (!IsSigned && match(Z, m_URem(m_Specific(X), m_Specific(Op1))))) in commonIDivTransforms() 770 if (IsSigned && match(Op0, m_NSWShl(m_Specific(Op1), m_Value(Y)))) in commonIDivTransforms() 772 if (!IsSigned && match(Op0, m_NUWShl(m_Specific(Op1), m_Value(Y)))) in commonIDivTransforms() 776 if (match(Op1, m_c_Mul(m_Specific(Op0), m_Value(Y)))) { in commonIDivTransforms() 983 if (match(Op1, m_NUWMul(m_Specific(A), m_Value(X))) || in visitUDiv() 984 match(Op1, m_NUWMul(m_Value(X), m_Specific(A)))) in visitUDiv() 986 if (match(Op1, m_NUWMul(m_Specific(B), m_Value(X))) || in visitUDiv() [all …]
|
D | InstCombineShifts.cpp | 438 m_Specific(Op1)))) { in FoldShiftByConstant() 457 m_And(m_OneUse(m_Shr(m_Value(V1), m_Specific(Op1))), in FoldShiftByConstant() 473 m_Specific(Op1)))) { in FoldShiftByConstant() 620 if (match(Op0, m_Shr(m_Value(X), m_Specific(Op1)))) { in visitShl() 673 if (match(Op0, m_OneUse(m_Shr(m_Value(X), m_Specific(Op1))))) { in visitShl() 814 if (match(Op0, m_OneUse(m_Shl(m_Value(X), m_Specific(Op1))))) { in visitLShr() 845 if (match(Op0, m_Shl(m_ZExt(m_Value(X)), m_Specific(Op1))) && in visitAShr()
|
D | InstCombineAddSub.cpp | 1278 if (match(FV, m_Zero()) && match(TV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd() 1282 if (match(TV, m_Zero()) && match(FV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd() 1712 if (match(Op1, m_c_Add(m_Specific(Op0), m_Value(Y)))) in visitSub() 1716 if (match(Op0, m_Sub(m_Specific(Op1), m_Value(Y)))) in visitSub() 1724 match(Op0, m_c_Or(m_Specific(A), m_Specific(B)))) in visitSub() 1731 if (match(Op0, m_OneUse(m_c_Or(m_Value(Y), m_Specific(Op1))))) in visitSub() 1746 if (match(Op1, m_c_And(m_Value(Y), m_Specific(Op0)))) in visitSub() 1811 match(Op0, m_OneUse(m_c_Xor(m_Specific(A), m_Specific(Op1))))) { in visitSub()
|
D | InstCombineCompares.cpp | 1379 if (BI && match(BI, m_Br(m_ICmp(Pred2, m_Specific(X), m_ConstantInt(CI2)), in foldICmpWithConstant() 1645 match(LShr, m_LShr(m_Specific(A), m_Value(B)))) { in foldICmpAndConstConst() 2404 m_Select(m_ICmp(PredB, m_Specific(LHS), m_Specific(RHS)), in matchThreeWayIntCompare() 3359 auto LSubOne = m_Add(m_Specific(Op1), m_AllOnes()); in foldICmpBinOp() 3384 if (match(X, m_c_SMin(m_Specific(Op0), m_Value())) || in foldICmpWithMinMax() 3385 match(X, m_c_SMax(m_Specific(Op0), m_Value())) || in foldICmpWithMinMax() 3386 match(X, m_c_UMin(m_Specific(Op0), m_Value())) || in foldICmpWithMinMax() 3387 match(X, m_c_UMax(m_Specific(Op0), m_Value()))) { in foldICmpWithMinMax() 3393 if (match(Op0, m_c_SMin(m_Specific(X), m_Value(Y)))) { in foldICmpWithMinMax() 3410 if (match(Op0, m_c_SMax(m_Specific(X), m_Value(Y)))) { in foldICmpWithMinMax() [all …]
|
D | InstCombineLoadStoreAlloca.cpp | 586 return (match(L1, m_Load(m_Specific(LHS))) && in isMinMaxWithLoads() 587 match(L2, m_Load(m_Specific(RHS)))) || in isMinMaxWithLoads() 588 (match(L1, m_Load(m_Specific(RHS))) && in isMinMaxWithLoads() 589 match(L2, m_Load(m_Specific(LHS)))); in isMinMaxWithLoads()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/ |
D | AMDGPULowerKernelAttributes.cpp | 192 auto SubExpr = m_Sub(m_Specific(GridSize), in processUse() 193 m_Mul(GroupIDIntrin, m_Specific(ZextGroupSize))); in processUse() 197 m_Select(m_ICmp(Pred, SubExpr, m_Specific(ZextGroupSize)), in processUse() 199 m_Specific(ZextGroupSize))) && in processUse()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
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() 1205 if (match(Op0, m_Or(m_Not(m_Specific(Op1)), m_Value(A))) || in visitAnd() 1206 match(Op0, m_Or(m_Value(A), m_Not(m_Specific(Op1))))) in visitAnd() 1208 if (match(Op1, m_Or(m_Not(m_Specific(Op0)), m_Value(A))) || in visitAnd() 1209 match(Op1, m_Or(m_Value(A), m_Not(m_Specific(Op0))))) in visitAnd() 1445 if (match(D, m_Not(m_SExt(m_Specific(Cond))))) in MatchSelectFromAndOr() 1447 if (match(D, m_SExt(m_Not(m_Specific(Cond))))) in MatchSelectFromAndOr() 1451 if (match(B, m_Not(m_SExt(m_Specific(Cond))))) in MatchSelectFromAndOr() 1453 if (match(B, m_SExt(m_Not(m_Specific(Cond))))) in MatchSelectFromAndOr() [all …]
|
D | InstCombineAddSub.cpp | 277 if (match(FV, m_Zero()) && match(TV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd() 281 if (match(TV, m_Zero()) && match(FV, m_Sub(m_Value(N), m_Specific(A)))) in visitAdd() 595 if (match(Op1, m_Add(m_Specific(Op0), m_Value(Y))) || in visitSub() 596 match(Op1, m_Add(m_Value(Y), m_Specific(Op0)))) in visitSub() 600 if (match(Op0, m_Sub(m_Specific(Op1), m_Value(Y)))) in visitSub() 616 if (match(Op1, m_And(m_Value(Y), m_Specific(Op0))) || in visitSub() 617 match(Op1, m_And(m_Specific(Op0), m_Value(Y)))) 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()
|
D | InstCombineMulDivRem.cpp | 414 if ((isSigned && match(Z, m_SRem(m_Specific(X), m_Specific(Op1)))) || in commonIDivTransforms() 415 (!isSigned && match(Z, m_URem(m_Specific(X), m_Specific(Op1))))) in commonIDivTransforms()
|
D | InstCombineShifts.cpp | 417 m_Specific(Op1)))) { in FoldShiftByConstant() 432 m_And(m_Shr(m_Value(V1), m_Specific(Op1)), in FoldShiftByConstant() 450 m_Specific(Op1)))) { in FoldShiftByConstant() 723 if (match(Op0, m_Shl(m_Value(X), m_Specific(Op1)))) { in visitAShr()
|
D | InstCombineSelect.cpp | 399 if (match(TrueVal, m_SExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp() 403 } else if (match(FalseVal, m_SExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp() 413 if (match(TrueVal, m_ZExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp() 417 } else if (match(FalseVal, m_ZExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp()
|
/external/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 551 if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0))) || in SimplifyAddInst() 552 match(Op0, m_Sub(m_Value(Y), m_Specific(Op1)))) in SimplifyAddInst() 556 if (match(Op0, m_Not(m_Specific(Op1))) || in SimplifyAddInst() 557 match(Op1, m_Not(m_Specific(Op0)))) in SimplifyAddInst() 810 if (match(Op1, m_FSub(m_AnyZero(), m_Specific(Op0)))) in SimplifyFAddInst() 812 else if (match(Op0, m_FSub(m_AnyZero(), m_Specific(Op1)))) in SimplifyFAddInst() 909 if (match(Op0, m_Exact(m_IDiv(m_Value(X), m_Specific(Op1)))) || // (X / Y) * Y in SimplifyMulInst() 910 match(Op1, m_Exact(m_IDiv(m_Value(X), m_Specific(Op0))))) // Y * (X / Y) in SimplifyMulInst() 1034 if ((isSigned && match(Op0, m_SRem(m_Value(), m_Specific(Op1)))) || in SimplifyDiv() 1035 (!isSigned && match(Op0, m_URem(m_Value(), m_Specific(Op1))))) in SimplifyDiv() [all …]
|
D | ValueTracking.cpp | 559 auto m_V = m_CombineOr(m_Specific(V), in computeKnownBitsFromAssume() 560 m_CombineOr(m_PtrToInt(m_Specific(V)), in computeKnownBitsFromAssume() 561 m_BitCast(m_Specific(V)))); in computeKnownBitsFromAssume() 897 if (match(I->getOperand(0), m_Add(m_Specific(I->getOperand(1)), in computeKnownBitsFromOperator() 899 match(I->getOperand(1), m_Add(m_Specific(I->getOperand(0)), in computeKnownBitsFromOperator() 1539 if (match(X, m_Neg(m_Specific(Y))) || match(Y, m_Neg(m_Specific(X)))) in isKnownToBeAPowerOfTwo() 1549 if (match(X, m_And(m_Specific(Y), m_Value())) || in isKnownToBeAPowerOfTwo() 1550 match(X, m_And(m_Value(), m_Specific(Y)))) in isKnownToBeAPowerOfTwo() 1553 if (match(Y, m_And(m_Specific(X), m_Value())) || in isKnownToBeAPowerOfTwo() 1554 match(Y, m_And(m_Value(), m_Specific(X)))) in isKnownToBeAPowerOfTwo() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | InstructionSimplify.cpp | 568 if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0))) || in SimplifyAddInst() 569 match(Op0, m_Sub(m_Value(Y), m_Specific(Op1)))) in SimplifyAddInst() 573 if (match(Op0, m_Not(m_Specific(Op1))) || in SimplifyAddInst() 574 match(Op1, m_Not(m_Specific(Op0)))) in SimplifyAddInst() 637 if (match(Op0, m_Mul(m_Specific(Op1), m_ConstantInt<2>())) || in SimplifySubInst() 638 match(Op0, m_Shl(m_Specific(Op1), m_One()))) in SimplifySubInst() 857 if ((isSigned && match(Op0, m_SRem(m_Value(), m_Specific(Op1)))) || in SimplifyDiv() 858 (!isSigned && match(Op0, m_URem(m_Value(), m_Specific(Op1))))) in SimplifyDiv() 1086 if (match(Op0, m_Shr(m_Value(X), m_Specific(Op1))) && in SimplifyShlInst() 1111 if (match(Op0, m_Shl(m_Value(X), m_Specific(Op1))) && in SimplifyLShrInst() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/Hexagon/ |
D | HexagonLoopIdiomRecognition.cpp | 694 if (match(A, m_Shl(m_One(), m_Specific(CIV)))) { in matchLeftShift() 697 } else if (match(B, m_Shl(m_One(), m_Specific(CIV)))) { in matchLeftShift() 756 if (!match(U, m_Xor(m_Specific(SelI), m_Value(R))) && in matchLeftShift() 757 !match(U, m_Xor(m_Value(R), m_Specific(SelI)))) in matchLeftShift() 768 if (!match(T, m_Shl(m_Value(Q), m_Specific(CIV))) && in matchLeftShift() 769 !match(T, m_Shl(m_ZExt(m_Value(Q)), m_ZExt(m_Specific(CIV))))) in matchLeftShift() 831 if (!match(FalseV, m_Xor(m_Specific(TrueV), m_Value(Q))) && in matchRightShift() 832 !match(FalseV, m_Xor(m_Value(Q), m_Specific(TrueV)))) in matchRightShift() 842 if (!match(TrueV, m_Xor(m_Specific(FalseV), m_Value(Q))) && in matchRightShift() 843 !match(TrueV, m_Xor(m_Value(Q), m_Specific(FalseV)))) in matchRightShift()
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/IR/ |
D | PatternMatch.cpp | 409 EXPECT_TRUE(m_Load(m_Specific(Alloca)).match(LoadInst)); in TEST_F() 421 EXPECT_TRUE(m_Store(m_SpecificInt(42), m_Specific(Alloca)) in TEST_F() 423 EXPECT_FALSE(m_Store(m_SpecificInt(42), m_Specific(FourtyTwo)) in TEST_F() 425 EXPECT_FALSE(m_Store(m_SpecificInt(43), m_Specific(Alloca)) in TEST_F()
|