Lines Matching refs:Overflow

1898 APInt APInt::sadd_ov(const APInt &RHS, bool &Overflow) const {
1900 Overflow = isNonNegative() == RHS.isNonNegative() &&
1905 APInt APInt::uadd_ov(const APInt &RHS, bool &Overflow) const {
1907 Overflow = Res.ult(RHS);
1911 APInt APInt::ssub_ov(const APInt &RHS, bool &Overflow) const {
1913 Overflow = isNonNegative() != RHS.isNonNegative() &&
1918 APInt APInt::usub_ov(const APInt &RHS, bool &Overflow) const {
1920 Overflow = Res.ugt(*this);
1924 APInt APInt::sdiv_ov(const APInt &RHS, bool &Overflow) const {
1926 Overflow = isMinSignedValue() && RHS.isAllOnes();
1930 APInt APInt::smul_ov(const APInt &RHS, bool &Overflow) const {
1934 Overflow = Res.sdiv(RHS) != *this ||
1937 Overflow = false;
1941 APInt APInt::umul_ov(const APInt &RHS, bool &Overflow) const {
1943 Overflow = true;
1948 Overflow = Res.isNegative();
1953 Overflow = true;
1958 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const {
1959 return sshl_ov(ShAmt.getLimitedValue(getBitWidth()), Overflow);
1962 APInt APInt::sshl_ov(unsigned ShAmt, bool &Overflow) const {
1963 Overflow = ShAmt >= getBitWidth();
1964 if (Overflow)
1968 Overflow = ShAmt >= countl_zero();
1970 Overflow = ShAmt >= countl_one();
1975 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const {
1976 return ushl_ov(ShAmt.getLimitedValue(getBitWidth()), Overflow);
1979 APInt APInt::ushl_ov(unsigned ShAmt, bool &Overflow) const {
1980 Overflow = ShAmt >= getBitWidth();
1981 if (Overflow)
1984 Overflow = ShAmt > countl_zero();
1989 APInt APInt::sfloordiv_ov(const APInt &RHS, bool &Overflow) const {
1990 APInt quotient = sdiv_ov(RHS, Overflow);
1997 bool Overflow;
1998 APInt Res = sadd_ov(RHS, Overflow);
1999 if (!Overflow)
2007 bool Overflow;
2008 APInt Res = uadd_ov(RHS, Overflow);
2009 if (!Overflow)
2016 bool Overflow;
2017 APInt Res = ssub_ov(RHS, Overflow);
2018 if (!Overflow)
2026 bool Overflow;
2027 APInt Res = usub_ov(RHS, Overflow);
2028 if (!Overflow)
2035 bool Overflow;
2036 APInt Res = smul_ov(RHS, Overflow);
2037 if (!Overflow)
2048 bool Overflow;
2049 APInt Res = umul_ov(RHS, Overflow);
2050 if (!Overflow)
2061 bool Overflow;
2062 APInt Res = sshl_ov(RHS, Overflow);
2063 if (!Overflow)
2075 bool Overflow;
2076 APInt Res = ushl_ov(RHS, Overflow);
2077 if (!Overflow)