@@ -102,6 +102,8 @@ const WasmIntrinsic intrinsic_defs[] = {
102
102
{" saturating_narrow_i16x16_to_u8x16" , UInt (8 , 16 ), " saturating_narrow" , {Int (16 , 16 )}, Target::WasmSimd128},
103
103
{" saturating_narrow_i32x8_to_i16x8" , Int (16 , 8 ), " saturating_narrow" , {Int (32 , 8 )}, Target::WasmSimd128},
104
104
{" saturating_narrow_i32x8_to_u16x8" , UInt (16 , 8 ), " saturating_narrow" , {Int (32 , 8 )}, Target::WasmSimd128},
105
+
106
+ {" llvm.wasm.dot" , Int (32 , 4 ), " dot_product" , {Int (16 , 8 ), Int (16 , 8 )}, Target::WasmSimd128},
105
107
#endif
106
108
};
107
109
// clang-format on
@@ -185,6 +187,8 @@ void CodeGen_WebAssembly::codegen_vector_reduce(const VectorReduce *op, const Ex
185
187
{VectorReduce::Add, 2 , i32 (wild_i16x_), " pairwise_widening_add" , Target::WasmSimd128},
186
188
{VectorReduce::Add, 2 , u32 (wild_u16x_), " pairwise_widening_add" , Target::WasmSimd128},
187
189
{VectorReduce::Add, 2 , i32 (wild_u16x_), " pairwise_widening_add" , Target::WasmSimd128},
190
+
191
+ {VectorReduce::Add, 2 , i32 (widening_mul (wild_i16x_, wild_i16x_)), " dot_product" , Target::WasmSimd128},
188
192
};
189
193
// clang-format on
190
194
0 commit comments