Home | History | Annotate | Download | only in Analysis

Lines Matching refs:CI2

1934     ConstantInt *CI2;
1935 if (match(LHS, m_URem(m_Value(), m_ConstantInt(CI2)))) {
1936 // 'urem x, CI2' produces [0, CI2).
1937 Upper = CI2->getValue();
1938 } else if (match(LHS, m_SRem(m_Value(), m_ConstantInt(CI2)))) {
1939 // 'srem x, CI2' produces (-|CI2|, |CI2|).
1940 Upper = CI2->getValue().abs();
1942 } else if (match(LHS, m_UDiv(m_ConstantInt(CI2), m_Value()))) {
1943 // 'udiv CI2, x' produces [0, CI2].
1944 Upper = CI2->getValue() + 1;
1945 } else if (match(LHS, m_UDiv(m_Value(), m_ConstantInt(CI2)))) {
1946 // 'udiv x, CI2' produces [0, UINT_MAX / CI2].
1948 if (!CI2->isZero())
1949 Upper = NegOne.udiv(CI2->getValue()) + 1;
1950 } else if (match(LHS, m_SDiv(m_ConstantInt(CI2), m_Value()))) {
1951 if (CI2->isMinSignedValue()) {
1953 Lower = CI2->getValue();
1956 // 'sdiv CI2, x' produces [-|CI2|, |CI2|].
1957 Upper = CI2->getValue().abs() + 1;
1960 } else if (match(LHS, m_SDiv(m_Value(), m_ConstantInt(CI2)))) {
1961 // 'sdiv x, CI2' produces [INT_MIN / CI2, INT_MAX / CI2].
1964 APInt Val = CI2->getValue().abs();
1969 } else if (match(LHS, m_LShr(m_Value(), m_ConstantInt(CI2)))) {
1970 // 'lshr x, CI2' produces [0, UINT_MAX >> CI2].
1972 if (CI2->getValue().ult(Width))
1973 Upper = NegOne.lshr(CI2->getValue()) + 1;
1974 } else if (match(LHS, m_LShr(m_ConstantInt(CI2), m_Value()))) {
1975 // 'lshr CI2, x' produces [CI2 >> (Width-1), CI2].
1977 if (!CI2->isZero() && cast<BinaryOperator>(LHS)->isExact())
1978 ShiftAmount = CI2->getValue().countTrailingZeros();
1979 Lower = CI2->getValue().lshr(ShiftAmount);
1980 Upper = CI2->getValue() + 1;
1981 } else if (match(LHS, m_AShr(m_Value(), m_ConstantInt(CI2)))) {
1982 // 'ashr x, CI2' produces [INT_MIN >> CI2, INT_MAX >> CI2].
1985 if (CI2->getValue().ult(Width)) {
1986 Lower = IntMin.ashr(CI2->getValue());
1987 Upper = IntMax.ashr(CI2->getValue()) + 1;
1989 } else if (match(LHS, m_AShr(m_ConstantInt(CI2), m_Value()))) {
1991 if (!CI2->isZero() && cast<BinaryOperator>(LHS)->isExact())
1992 ShiftAmount = CI2->getValue().countTrailingZeros();
1993 if (CI2->isNegative()) {
1994 // 'ashr CI2, x' produces [CI2, CI2 >> (Width-1)]
1995 Lower = CI2->getValue();
1996 Upper = CI2->getValue().ashr(ShiftAmount) + 1;
1998 // 'ashr CI2, x' produces [CI2 >> (Width-1), CI2]
1999 Lower = CI2->getValue().ashr(ShiftAmount);
2000 Upper = CI2->getValue() + 1;
2002 } else if (match(LHS, m_Or(m_Value(), m_ConstantInt(CI2)))) {
2003 // 'or x, CI2' produces [CI2, UINT_MAX].
2004 Lower = CI2->getValue();
2005 } else if (match(LHS, m_And(m_Value(), m_ConstantInt(CI2)))) {
2006 // 'and x, CI2' produces [0, CI2].
2007 Upper = CI2->getValue() + 1;