Home
last modified time | relevance | path

Searched refs:ResultOverflowed (Results 1 – 2 of 2) sorted by relevance

/external/llvm/unittests/Support/
DMathExtrasTest.cpp197 bool ResultOverflowed; in SaturatingAddTestHelper() local
200 EXPECT_EQ(T(3), SaturatingAdd(T(1), T(2), &ResultOverflowed)); in SaturatingAddTestHelper()
201 EXPECT_FALSE(ResultOverflowed); in SaturatingAddTestHelper()
204 EXPECT_EQ(Max, SaturatingAdd(Max, T(1), &ResultOverflowed)); in SaturatingAddTestHelper()
205 EXPECT_TRUE(ResultOverflowed); in SaturatingAddTestHelper()
208 EXPECT_EQ(Max, SaturatingAdd(T(1), T(Max - 1), &ResultOverflowed)); in SaturatingAddTestHelper()
209 EXPECT_FALSE(ResultOverflowed); in SaturatingAddTestHelper()
212 EXPECT_EQ(Max, SaturatingAdd(T(1), Max, &ResultOverflowed)); in SaturatingAddTestHelper()
213 EXPECT_TRUE(ResultOverflowed); in SaturatingAddTestHelper()
216 EXPECT_EQ(Max, SaturatingAdd(Max, Max, &ResultOverflowed)); in SaturatingAddTestHelper()
[all …]
/external/llvm/include/llvm/Support/
DMathExtras.h662 SaturatingAdd(T X, T Y, bool *ResultOverflowed = nullptr) {
664 bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy;
680 SaturatingMultiply(T X, T Y, bool *ResultOverflowed = nullptr) {
682 bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy;
715 return SaturatingAdd(Z, Y, ResultOverflowed);