Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 1526293002: [turbofan] Fixed a bug in TryTruncateFloatXXToInt64 with INT64_MIN. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use constants with comments instead of type casts Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-machops.cc
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
index 2e2587d40f4c05b3ac391ce55e2f782edba3f4ba..2c093f987c049571bfef06a60b592e5731780ff3 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -5465,7 +5465,8 @@ TEST(RunTryTruncateFloat32ToInt64WithoutCheck) {
FOR_INT64_INPUTS(i) {
float input = static_cast<float>(*i);
- if (input < 9223372036854775808.0 && input > -9223372036854775809.0) {
+ if (input < static_cast<float>(INT64_MAX) &&
+ input >= static_cast<float>(INT64_MIN)) {
CHECK_EQ(static_cast<int64_t>(input), m.Call(input));
}
}
@@ -5482,7 +5483,8 @@ TEST(RunTryTruncateFloat32ToInt64WithCheck) {
m.Return(val);
FOR_FLOAT32_INPUTS(i) {
- if (*i < 9223372036854775808.0 && *i > -9223372036854775809.0) {
+ if (*i < static_cast<float>(INT64_MAX) &&
+ *i >= static_cast<float>(INT64_MIN)) {
CHECK_EQ(static_cast<int64_t>(*i), m.Call(*i));
CHECK_NE(0, success);
} else {
@@ -5514,7 +5516,8 @@ TEST(RunTryTruncateFloat64ToInt64WithCheck) {
m.Return(val);
FOR_FLOAT64_INPUTS(i) {
- if (*i < 9223372036854775808.0 && *i > -9223372036854775809.0) {
+ if (*i < static_cast<double>(INT64_MAX) &&
+ *i >= static_cast<double>(INT64_MIN)) {
// Conversions within this range should succeed.
CHECK_EQ(static_cast<int64_t>(*i), m.Call(*i));
CHECK_NE(0, success);
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698