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

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

Issue 2011303002: [arm] [arm64] Add optional operators Float32Neg and Float64Neg. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « src/compiler/verifier.cc ('k') | src/compiler/x64/instruction-selector-x64.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 d8b316d573738af0efb5d1e175395634997cc6da..1da7f47d3741d304ce9ad2ea1f59c526c594ee63 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -645,16 +645,28 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input,
case wasm::kExprF32Abs:
op = m->Float32Abs();
break;
- case wasm::kExprF32Neg:
- return BuildF32Neg(input);
+ case wasm::kExprF32Neg: {
+ if (m->Float32Neg().IsSupported()) {
+ op = m->Float32Neg().op();
+ break;
+ } else {
+ return BuildF32Neg(input);
+ }
+ }
case wasm::kExprF32Sqrt:
op = m->Float32Sqrt();
break;
case wasm::kExprF64Abs:
op = m->Float64Abs();
break;
- case wasm::kExprF64Neg:
- return BuildF64Neg(input);
+ case wasm::kExprF64Neg: {
+ if (m->Float64Neg().IsSupported()) {
+ op = m->Float64Neg().op();
+ break;
+ } else {
+ return BuildF64Neg(input);
+ }
+ }
case wasm::kExprF64Sqrt:
op = m->Float64Sqrt();
break;
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698