mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Fix APInt::operator*= so that it computes the correct result for large integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases). Fixes PR11086.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141441 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -441,4 +441,13 @@ TEST(APIntTest, StringDeath) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
TEST(APIntTest, mul_clear) {
|
||||
APInt ValA(65, -1ULL);
|
||||
APInt ValB(65, 4);
|
||||
APInt ValC(65, 0);
|
||||
ValC = ValA * ValB;
|
||||
ValA *= ValB;
|
||||
EXPECT_EQ(ValA.toString(10, false), ValC.toString(10, false));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user