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; |