Leverage v128.const WAsm SIMD instruction
Warning: this change makes XNNPACK binaries for WebAssembly SIMD incompatible with Chrome versions earlier than 87
PiperOrigin-RevId: 394121736
diff --git a/src/f32-gemm/wasmsimd-s4.c.in b/src/f32-gemm/wasmsimd-s4.c.in
index 717da8d..94e4502 100644
--- a/src/f32-gemm/wasmsimd-s4.c.in
+++ b/src/f32-gemm/wasmsimd-s4.c.in
@@ -140,7 +140,7 @@
$for M in range(MR):
vacc${M}x${ABC[N:N+4]} = wasm_f32x4_min(vacc${M}x${ABC[N:N+4]}, vmax);
$elif ACTIVATION == "RELU":
- const v128_t vzero = wasm_f64x2_splat(0.0);
+ const v128_t vzero = wasm_i32x4_const_splat(0);
$for N in range(0, NR, 4):
$for M in range(MR):
vacc${M}x${ABC[N:N+4]} = wasm_i32x4_max(vacc${M}x${ABC[N:N+4]}, vzero);