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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 1673583002: [wasm] min/max does not return signaling NaNs anymore. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: turned off tests on arm Created 4 years, 10 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
« no previous file with comments | « no previous file | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 8617d52307310e1761130bac0c396b1e7f3e6564..2ebff1f55323fab81f3f4c5c2828e0ddf05f9b7d 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -1035,8 +1035,12 @@ Node* WasmGraphBuilder::BuildF32Min(Node* left, Node* right) {
return left_le_right.Phi(
wasm::kAstF32, left,
- right_lt_left.Phi(wasm::kAstF32, right,
- left_is_not_nan.Phi(wasm::kAstF32, right, left)));
+ right_lt_left.Phi(
+ wasm::kAstF32, right,
+ left_is_not_nan.Phi(
+ wasm::kAstF32,
+ Binop(wasm::kExprF32Mul, right, Float32Constant(1.0)),
+ Binop(wasm::kExprF32Mul, left, Float32Constant(1.0)))));
}
@@ -1052,8 +1056,12 @@ Node* WasmGraphBuilder::BuildF32Max(Node* left, Node* right) {
return left_ge_right.Phi(
wasm::kAstF32, left,
- right_gt_left.Phi(wasm::kAstF32, right,
- left_is_not_nan.Phi(wasm::kAstF32, right, left)));
+ right_gt_left.Phi(
+ wasm::kAstF32, right,
+ left_is_not_nan.Phi(
+ wasm::kAstF32,
+ Binop(wasm::kExprF32Mul, right, Float32Constant(1.0)),
+ Binop(wasm::kExprF32Mul, left, Float32Constant(1.0)))));
}
@@ -1069,8 +1077,12 @@ Node* WasmGraphBuilder::BuildF64Min(Node* left, Node* right) {
return left_le_right.Phi(
wasm::kAstF64, left,
- right_lt_left.Phi(wasm::kAstF64, right,
- left_is_not_nan.Phi(wasm::kAstF64, right, left)));
+ right_lt_left.Phi(
+ wasm::kAstF64, right,
+ left_is_not_nan.Phi(
+ wasm::kAstF64,
+ Binop(wasm::kExprF64Mul, right, Float64Constant(1.0)),
+ Binop(wasm::kExprF64Mul, left, Float64Constant(1.0)))));
}
@@ -1086,8 +1098,12 @@ Node* WasmGraphBuilder::BuildF64Max(Node* left, Node* right) {
return left_ge_right.Phi(
wasm::kAstF64, left,
- right_gt_left.Phi(wasm::kAstF64, right,
- left_is_not_nan.Phi(wasm::kAstF64, right, left)));
+ right_gt_left.Phi(
+ wasm::kAstF64, right,
+ left_is_not_nan.Phi(
+ wasm::kAstF64,
+ Binop(wasm::kExprF64Mul, right, Float64Constant(1.0)),
+ Binop(wasm::kExprF64Mul, left, Float64Constant(1.0)))));
}
« no previous file with comments | « no previous file | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698