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-machine-operator-reducer.cc

Issue 2647353007: [wasm] Fix constant folding with signalling NaN. (Closed)
Patch Set: Remove unused variable Created 3 years, 11 months 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
Index: test/cctest/compiler/test-machine-operator-reducer.cc
diff --git a/test/cctest/compiler/test-machine-operator-reducer.cc b/test/cctest/compiler/test-machine-operator-reducer.cc
index cf3da887ba54a56b4a2590753fe16d977f8971ee..15bd72c4d4692bbcae89d65b7e0cad075a25d447 100644
--- a/test/cctest/compiler/test-machine-operator-reducer.cc
+++ b/test/cctest/compiler/test-machine-operator-reducer.cc
@@ -850,12 +850,12 @@ TEST(ReduceFloat32Sub) {
}
Node* x = R.Parameter();
- Node* zero = R.Constant<float>(0.0);
Node* nan = R.Constant<float>(std::numeric_limits<float>::quiet_NaN());
- R.CheckBinop(x, x, zero); // x - 0 => x
- R.CheckBinop(nan, nan, x); // nan - x => nan
- R.CheckBinop(nan, x, nan); // x - nan => nan
+ // nan - x => nan
+ R.CheckFoldBinop(std::numeric_limits<float>::quiet_NaN(), nan, x);
+ // x - nan => nan
+ R.CheckFoldBinop(std::numeric_limits<float>::quiet_NaN(), x, nan);
}
TEST(ReduceFloat64Sub) {
@@ -870,12 +870,12 @@ TEST(ReduceFloat64Sub) {
}
Node* x = R.Parameter();
- Node* zero = R.Constant<double>(0.0);
Node* nan = R.Constant<double>(std::numeric_limits<double>::quiet_NaN());
- R.CheckBinop(x, x, zero); // x - 0 => x
- R.CheckBinop(nan, nan, x); // nan - x => nan
- R.CheckBinop(nan, x, nan); // x - nan => nan
+ // nan - x => nan
+ R.CheckFoldBinop(std::numeric_limits<double>::quiet_NaN(), nan, x);
+ // x - nan => nan
+ R.CheckFoldBinop(std::numeric_limits<double>::quiet_NaN(), x, nan);
}
// TODO(titzer): test MachineOperatorReducer for Word64And

Powered by Google App Engine
This is Rietveld 408576698