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

Unified Diff: test/cctest/wasm/test-run-wasm.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 | « test/cctest/compiler/value-helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index ddd6b1cc8800cfe5baaa824f6e000b546a7394ec..1a67a7ea928bd8be0c9d1e4a75d83450235489f8 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -3378,7 +3378,8 @@ TEST(Run_Wasm_I64SConvertF32) {
BUILD(r, WASM_I64_SCONVERT_F32(WASM_GET_LOCAL(0)));
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), r.Call(*i));
} else {
CHECK_TRAP64(r.Call(*i));
@@ -3392,7 +3393,8 @@ TEST(Run_Wasm_I64SConvertF64) {
BUILD(r, WASM_I64_SCONVERT_F64(WASM_GET_LOCAL(0)));
FOR_FLOAT64_INPUTS(i) {
- if (*i < 9223372036854775808.0 && *i > -9223372036854775809.0) {
+ if (*i < static_cast<double>(INT64_MAX) &&
+ *i >= static_cast<double>(INT64_MIN)) {
CHECK_EQ(static_cast<int64_t>(*i), r.Call(*i));
} else {
CHECK_TRAP64(r.Call(*i));
« no previous file with comments | « test/cctest/compiler/value-helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698