Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:Match

551     if (match(L1, m_And(m_Value(L11), m_Value(L12)))) {
552 if (!match(L2, m_And(m_Value(L21), m_Value(L22))))
555 if (!match(L2, m_And(m_Value(L11), m_Value(L12))))
579 } else if (match(R1, m_And(m_Value(R11), m_Value(R12)))) {
592 if (!ok && match(R2, m_And(m_Value(R11), m_Value(R12)))) {
753 if (match(Val2, m_Trunc(m_Value(V))) &&
754 match(Val, m_And(m_Specific(V), m_ConstantInt(AndCst)))) {
757 } else if (match(Val, m_Trunc(m_Value(V))) &&
758 match(Val2, m_And(m_Specific(V), m_ConstantInt(AndCst)))) {
961 // Swap RHS operands to match LHS.
1075 if (Op0I->hasOneUse() && !match(Op0LHS, m_Zero())) {
1108 if (match(Op0, m_Trunc(m_And(m_Value(X), m_ConstantInt(YC))))) {
1142 if (match(Op0, m_Or(m_Value(A), m_Value(B))) &&
1143 match(Op1, m_Not(m_And(m_Value(C), m_Value(D)))) &&
1148 if (match(Op1, m_Or(m_Value(A), m_Value(B))) &&
1149 match(Op0, m_Not(m_And(m_Value(C), m_Value(D)))) &&
1158 match(Op0, m_Xor(m_Value(A), m_Value(B)))) {
1167 match(tmpOp1, m_Xor(m_Value(A), m_Value(B)))) {
1181 if (match(Op0, m_Or(m_Not(m_Specific(Op1)), m_Value(A))) ||
1182 match(Op0, m_Or(m_Value(A), m_Not(m_Specific(Op1)))))
1184 if (match(Op1, m_Or(m_Not(m_Specific(Op0)), m_Value(A))) ||
1185 match(Op1, m_Or(m_Value(A), m_Not(m_Specific(Op0)))))
1251 if (match(Op1, m_SExt(m_Value())) ||
1252 match(Op1, m_Not(m_Value()))) {
1258 if (match(Op0, m_SExt(m_Value(X))) &&
1265 if (match(Op0, m_Not(m_SExt(m_Value(X)))) &&
1286 /// match.
1288 /// This function returns true if the match was unsuccessful and false if so.
1437 // If A is not a select of -1/0, this cannot match.
1439 if (!match(A, m_SExt(m_Value(Cond))) ||
1444 if (match(D, m_Not(m_SExt(m_Specific(Cond)))))
1446 if (match(D, m_SExt(m_Not(m_Specific(Cond)))))
1450 if (match(B, m_Not(m_SExt(m_Specific(Cond)))))
1452 if (match(B, m_SExt(m_Not(m_Specific(Cond)))))
1525 if (match(Val, m_Add(m_Specific(Val2), m_ConstantInt(AddCst))))
1724 // Swap RHS operands to match LHS.
1767 if (!match(Op, m_And(m_Value(V1), m_ConstantInt(CI2)))) return 0;
1800 if (match(Op0, m_And(m_Value(X), m_ConstantInt(C1))) &&
1810 if (match(Op0, m_Xor(m_Value(X), m_ConstantInt(C1))) &&
1833 if (match(Op0, m_Or(m_Value(), m_Value())) ||
1834 match(Op1, m_Or(m_Value(), m_Value())) ||
1835 (match(Op0, m_LogicalShift(m_Value(), m_Value())) &&
1836 match(Op1, m_LogicalShift(m_Value(), m_Value())))) {
1843 match(Op0, m_Xor(m_Value(A), m_ConstantInt(C1))) &&
1852 match(Op1, m_Xor(m_Value(A), m_ConstantInt(C1))) &&
1861 if (match(Op0, m_And(m_Value(A), m_Value(C))) &&
1862 match(Op1, m_And(m_Value(B), m_Value(D)))) {
1872 match(A, m_Add(m_Value(V1), m_Value(V2)))) {
1881 match(B, m_Add(m_Value(V1), m_Value(V2)))) {
1893 if (match(A, m_Or(m_Value(V1), m_Value(V2))) &&
1899 if (match(B, m_Or(m_Value(V1), m_Value(V2))) &&
1908 if (match(A, m_Or(m_Value(V1), m_ConstantInt(C3))) &&
1910 match(B, m_Or(m_Specific(V1), m_ConstantInt(C4))) &&
1923 if (Instruction *Match = MatchSelectFromAndOr(A, B, C, D))
1924 return Match;
1925 if (Instruction *Match = MatchSelectFromAndOr(B, A, D, C))
1926 return Match;
1927 if (Instruction *Match = MatchSelectFromAndOr(C, B, A, D))
1928 return Match;
1929 if (Instruction *Match = MatchSelectFromAndOr(D, A, B, C))
1930 return Match;
1934 if ((match(C, m_Not(m_Specific(D))) &&
1935 match(B, m_Not(m_Specific(A)))))
1938 if ((match(A, m_Not(m_Specific(D))) &&
1939 match(B, m_Not(m_Specific(C)))))
1942 if ((match(C, m_Not(m_Specific(B))) &&
1943 match(D, m_Not(m_Specific(A)))))
1946 if ((match(A, m_Not(m_Specific(B))) &&
1947 match(D, m_Not(m_Specific(C)))))
1951 if (match(A, m_Or(m_Value(V1), m_Specific(B))) ||
1952 match(A, m_Or(m_Specific(B), m_Value(V1)))) {
1957 if (match(B, m_Or(m_Specific(A), m_Value(V1))) ||
1958 match(B, m_Or(m_Value(V1), m_Specific(A)))) {
1988 if (match(Op0, m_Xor(m_Value(), m_Value()))) {
1996 if (match(Op1, m_Xor(m_Value(A), m_Value(B)))) {
2000 if (match(Op0, m_And(m_Specific(A), m_Specific(B))) ||
2001 match(Op0, m_And(m_Specific(B), m_Specific(A))))
2004 if (Op1->hasOneUse() && match(A, m_Not(m_Specific(Op0)))) {
2008 if (Op1->hasOneUse() && match(B, m_Not(m_Specific(Op0)))) {
2016 if (match(Op1, m_Not(m_Value(A))))
2078 if (match(Op0, m_SExt(m_Value(A))) && A->getType()->isIntegerTy(1))
2080 if (match(Op1, m_SExt(m_Value(A))) && A->getType()->isIntegerTy(1))
2089 match(Op0, m_Or(m_Value(A), m_ConstantInt(C1)))) {
2101 match(Op0, m_Select(m_Value(X), m_Value(A), m_Value(B))) &&
2102 match(Op1, m_Select(m_Value(Y), m_Value(C), m_Value(D))) && X == Y) {
2267 if (match(Op1I, m_Or(m_Value(A), m_Value(B)))) {
2276 } else if (match(Op1I, m_And(m_Value(A), m_Value(B))) &&
2292 if (match(Op0I, m_Or(m_Value(A), m_Value(B))) &&
2298 } else if (match(Op0I, m_And(m_Value(A), m_Value(B))) &&
2324 if (match(Op0I, m_And(m_Value(A), m_Value(B))) &&
2325 match(Op1I, m_Or(m_Value(C), m_Value(D)))) {
2330 if (match(Op0I, m_Or(m_Value(A), m_Value(B))) &&
2331 match(Op1I, m_And(m_Value(C), m_Value(D)))) {