diff --git a/include/llvm/IR/IntrinsicsWebAssembly.td b/include/llvm/IR/IntrinsicsWebAssembly.td index 68885c7851a..11990554037 100644 --- a/include/llvm/IR/IntrinsicsWebAssembly.td +++ b/include/llvm/IR/IntrinsicsWebAssembly.td @@ -162,23 +162,6 @@ def int_wasm_q15mulr_sat_signed : [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem, IntrSpeculatable]>; -def int_wasm_extmul_low_signed : - Intrinsic<[llvm_anyvector_ty], - [LLVMSubdivide2VectorType<0>, LLVMSubdivide2VectorType<0>], - [IntrNoMem, IntrSpeculatable]>; -def int_wasm_extmul_high_signed : - Intrinsic<[llvm_anyvector_ty], - [LLVMSubdivide2VectorType<0>, LLVMSubdivide2VectorType<0>], - [IntrNoMem, IntrSpeculatable]>; -def int_wasm_extmul_low_unsigned : - Intrinsic<[llvm_anyvector_ty], - [LLVMSubdivide2VectorType<0>, LLVMSubdivide2VectorType<0>], - [IntrNoMem, IntrSpeculatable]>; -def int_wasm_extmul_high_unsigned : - Intrinsic<[llvm_anyvector_ty], - [LLVMSubdivide2VectorType<0>, LLVMSubdivide2VectorType<0>], - [IntrNoMem, IntrSpeculatable]>; - def int_wasm_extadd_pairwise_signed : Intrinsic<[llvm_anyvector_ty], [LLVMSubdivide2VectorType<0>], diff --git a/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td b/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td index f59e186265b..6429b46673a 100644 --- a/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td +++ b/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td @@ -1028,7 +1028,14 @@ defm DOT : SIMD_I<(outs V128:$dst), (ins V128:$lhs, V128:$rhs), (outs), (ins), 186>; // Extending multiplication: extmul_{low,high}_P, extmul_high -multiclass SIMDExtBinary simdop> { +def extend_t : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisVec<1>]>; +def extend_low_s : SDNode<"WebAssemblyISD::EXTEND_LOW_S", extend_t>; +def extend_high_s : SDNode<"WebAssemblyISD::EXTEND_HIGH_S", extend_t>; +def extend_low_u : SDNode<"WebAssemblyISD::EXTEND_LOW_U", extend_t>; +def extend_high_u : SDNode<"WebAssemblyISD::EXTEND_HIGH_U", extend_t>; + +multiclass SIMDExtBinary simdop> { defm _#vec : SIMD_I<(outs V128:$dst), (ins V128:$lhs, V128:$rhs), (outs), (ins), [(set (vec.vt V128:$dst), (node @@ -1037,32 +1044,41 @@ multiclass SIMDExtBinary simdop> vec.prefix#"."#name, simdop>; } -defm EXTMUL_LOW_S : - SIMDExtBinary; -defm EXTMUL_HIGH_S : - SIMDExtBinary; -defm EXTMUL_LOW_U : - SIMDExtBinary; -defm EXTMUL_HIGH_U : - SIMDExtBinary; +class ExtMulPat : + PatFrag<(ops node:$lhs, node:$rhs), + (mul (extend $lhs), (extend $rhs))> {} + +def extmul_low_s : ExtMulPat; +def extmul_high_s : ExtMulPat; +def extmul_low_u : ExtMulPat; +def extmul_high_u : ExtMulPat; defm EXTMUL_LOW_S : - SIMDExtBinary; + SIMDExtBinary; defm EXTMUL_HIGH_S : - SIMDExtBinary; + SIMDExtBinary; defm EXTMUL_LOW_U : - SIMDExtBinary; + SIMDExtBinary; defm EXTMUL_HIGH_U : - SIMDExtBinary; + SIMDExtBinary; defm EXTMUL_LOW_S : - SIMDExtBinary; + SIMDExtBinary; defm EXTMUL_HIGH_S : - SIMDExtBinary; + SIMDExtBinary; defm EXTMUL_LOW_U : - SIMDExtBinary; + SIMDExtBinary; defm EXTMUL_HIGH_U : - SIMDExtBinary; + SIMDExtBinary; + +defm EXTMUL_LOW_S : + SIMDExtBinary; +defm EXTMUL_HIGH_S : + SIMDExtBinary; +defm EXTMUL_LOW_U : + SIMDExtBinary; +defm EXTMUL_HIGH_U : + SIMDExtBinary; //===----------------------------------------------------------------------===// // Floating-point unary arithmetic @@ -1191,12 +1207,6 @@ defm "" : SIMDConvert; defm "" : SIMDConvert; // Extending operations -def extend_t : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisVec<1>]>; -def extend_low_s : SDNode<"WebAssemblyISD::EXTEND_LOW_S", extend_t>; -def extend_high_s : SDNode<"WebAssemblyISD::EXTEND_HIGH_S", extend_t>; -def extend_low_u : SDNode<"WebAssemblyISD::EXTEND_LOW_U", extend_t>; -def extend_high_u : SDNode<"WebAssemblyISD::EXTEND_HIGH_U", extend_t>; - // TODO: refactor this to be uniform for i64x2 if the numbering is not changed. multiclass SIMDExtend baseInst> { defm "" : SIMDConvert @bitselect_v8i16(<8 x i16> %c, <8 x i16> %v1, <8 x i16> %v2) { ret <8 x i16> %a } +; CHECK-LABEL: extmul_low_s_v8i16: +; NO-SIMD128-NOT: i16x8 +; SIMD128-NEXT: .functype extmul_low_s_v8i16 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i16x8.extmul_low_i8x16_s $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <8 x i16> @extmul_low_s_v8i16(<16 x i8> %v1, <16 x i8> %v2) { + %low1 = shufflevector <16 x i8> %v1, <16 x i8> undef, + <8 x i32> + %low2 = shufflevector <16 x i8> %v2, <16 x i8> undef, + <8 x i32> + %extended1 = sext <8 x i8> %low1 to <8 x i16> + %extended2 = sext <8 x i8> %low2 to <8 x i16> + %a = mul <8 x i16> %extended1, %extended2 + ret <8 x i16> %a +} + +; CHECK-LABEL: extmul_high_s_v8i16: +; NO-SIMD128-NOT: i16x8 +; SIMD128-NEXT: .functype extmul_high_s_v8i16 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i16x8.extmul_high_i8x16_s $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <8 x i16> @extmul_high_s_v8i16(<16 x i8> %v1, <16 x i8> %v2) { + %high1 = shufflevector <16 x i8> %v1, <16 x i8> undef, + <8 x i32> + %high2 = shufflevector <16 x i8> %v2, <16 x i8> undef, + <8 x i32> + %extended1 = sext <8 x i8> %high1 to <8 x i16> + %extended2 = sext <8 x i8> %high2 to <8 x i16> + %a = mul <8 x i16> %extended1, %extended2 + ret <8 x i16> %a +} + +; CHECK-LABEL: extmul_low_u_v8i16: +; NO-SIMD128-NOT: i16x8 +; SIMD128-NEXT: .functype extmul_low_u_v8i16 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i16x8.extmul_low_i8x16_u $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <8 x i16> @extmul_low_u_v8i16(<16 x i8> %v1, <16 x i8> %v2) { + %low1 = shufflevector <16 x i8> %v1, <16 x i8> undef, + <8 x i32> + %low2 = shufflevector <16 x i8> %v2, <16 x i8> undef, + <8 x i32> + %extended1 = zext <8 x i8> %low1 to <8 x i16> + %extended2 = zext <8 x i8> %low2 to <8 x i16> + %a = mul <8 x i16> %extended1, %extended2 + ret <8 x i16> %a +} + +; CHECK-LABEL: extmul_high_u_v8i16: +; NO-SIMD128-NOT: i16x8 +; SIMD128-NEXT: .functype extmul_high_u_v8i16 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i16x8.extmul_high_i8x16_u $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <8 x i16> @extmul_high_u_v8i16(<16 x i8> %v1, <16 x i8> %v2) { + %high1 = shufflevector <16 x i8> %v1, <16 x i8> undef, + <8 x i32> + %high2 = shufflevector <16 x i8> %v2, <16 x i8> undef, + <8 x i32> + %extended1 = zext <8 x i8> %high1 to <8 x i16> + %extended2 = zext <8 x i8> %high2 to <8 x i16> + %a = mul <8 x i16> %extended1, %extended2 + ret <8 x i16> %a +} + ; ============================================================================== ; 4 x i32 ; ============================================================================== @@ -934,6 +998,70 @@ define <4 x i32> @bitselect_v4i32(<4 x i32> %c, <4 x i32> %v1, <4 x i32> %v2) { ret <4 x i32> %a } +; CHECK-LABEL: extmul_low_s_v4i32: +; NO-SIMD128-NOT: i32x4 +; SIMD128-NEXT: .functype extmul_low_s_v4i32 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i32x4.extmul_low_i16x8_s $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <4 x i32> @extmul_low_s_v4i32(<8 x i16> %v1, <8 x i16> %v2) { + %low1 = shufflevector <8 x i16> %v1, <8 x i16> undef, + <4 x i32> + %low2 = shufflevector <8 x i16> %v2, <8 x i16> undef, + <4 x i32> + %extended1 = sext <4 x i16> %low1 to <4 x i32> + %extended2 = sext <4 x i16> %low2 to <4 x i32> + %a = mul <4 x i32> %extended1, %extended2 + ret <4 x i32> %a +} + +; CHECK-LABEL: extmul_high_s_v4i32: +; NO-SIMD128-NOT: i32x4 +; SIMD128-NEXT: .functype extmul_high_s_v4i32 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i32x4.extmul_high_i16x8_s $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <4 x i32> @extmul_high_s_v4i32(<8 x i16> %v1, <8 x i16> %v2) { + %high1 = shufflevector <8 x i16> %v1, <8 x i16> undef, + <4 x i32> + %high2 = shufflevector <8 x i16> %v2, <8 x i16> undef, + <4 x i32> + %extended1 = sext <4 x i16> %high1 to <4 x i32> + %extended2 = sext <4 x i16> %high2 to <4 x i32> + %a = mul <4 x i32> %extended1, %extended2 + ret <4 x i32> %a +} + +; CHECK-LABEL: extmul_low_u_v4i32: +; NO-SIMD128-NOT: i32x4 +; SIMD128-NEXT: .functype extmul_low_u_v4i32 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i32x4.extmul_low_i16x8_u $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <4 x i32> @extmul_low_u_v4i32(<8 x i16> %v1, <8 x i16> %v2) { + %low1 = shufflevector <8 x i16> %v1, <8 x i16> undef, + <4 x i32> + %low2 = shufflevector <8 x i16> %v2, <8 x i16> undef, + <4 x i32> + %extended1 = zext <4 x i16> %low1 to <4 x i32> + %extended2 = zext <4 x i16> %low2 to <4 x i32> + %a = mul <4 x i32> %extended1, %extended2 + ret <4 x i32> %a +} + +; CHECK-LABEL: extmul_high_u_v4i32: +; NO-SIMD128-NOT: i32x4 +; SIMD128-NEXT: .functype extmul_high_u_v4i32 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i32x4.extmul_high_i16x8_u $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <4 x i32> @extmul_high_u_v4i32(<8 x i16> %v1, <8 x i16> %v2) { + %high1 = shufflevector <8 x i16> %v1, <8 x i16> undef, + <4 x i32> + %high2 = shufflevector <8 x i16> %v2, <8 x i16> undef, + <4 x i32> + %extended1 = zext <4 x i16> %high1 to <4 x i32> + %extended2 = zext <4 x i16> %high2 to <4 x i32> + %a = mul <4 x i32> %extended1, %extended2 + ret <4 x i32> %a +} + ; ============================================================================== ; 2 x i64 ; ============================================================================== @@ -1262,6 +1390,62 @@ define <2 x i64> @bitselect_v2i64(<2 x i64> %c, <2 x i64> %v1, <2 x i64> %v2) { ret <2 x i64> %a } +; CHECK-LABEL: extmul_low_s_v2i64: +; NO-SIMD128-NOT: i64x2 +; SIMD128-NEXT: .functype extmul_low_s_v2i64 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i64x2.extmul_low_i32x4_s $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <2 x i64> @extmul_low_s_v2i64(<4 x i32> %v1, <4 x i32> %v2) { + %low1 = shufflevector <4 x i32> %v1, <4 x i32> undef, <2 x i32> + %low2 = shufflevector <4 x i32> %v2, <4 x i32> undef, <2 x i32> + %extended1 = sext <2 x i32> %low1 to <2 x i64> + %extended2 = sext <2 x i32> %low2 to <2 x i64> + %a = mul <2 x i64> %extended1, %extended2 + ret <2 x i64> %a +} + +; CHECK-LABEL: extmul_high_s_v2i64: +; NO-SIMD128-NOT: i64x2 +; SIMD128-NEXT: .functype extmul_high_s_v2i64 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i64x2.extmul_high_i32x4_s $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <2 x i64> @extmul_high_s_v2i64(<4 x i32> %v1, <4 x i32> %v2) { + %high1 = shufflevector <4 x i32> %v1, <4 x i32> undef, <2 x i32> + %high2 = shufflevector <4 x i32> %v2, <4 x i32> undef, <2 x i32> + %extended1 = sext <2 x i32> %high1 to <2 x i64> + %extended2 = sext <2 x i32> %high2 to <2 x i64> + %a = mul <2 x i64> %extended1, %extended2 + ret <2 x i64> %a +} + +; CHECK-LABEL: extmul_low_u_v2i64: +; NO-SIMD128-NOT: i64x2 +; SIMD128-NEXT: .functype extmul_low_u_v2i64 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i64x2.extmul_low_i32x4_u $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <2 x i64> @extmul_low_u_v2i64(<4 x i32> %v1, <4 x i32> %v2) { + %low1 = shufflevector <4 x i32> %v1, <4 x i32> undef, <2 x i32> + %low2 = shufflevector <4 x i32> %v2, <4 x i32> undef, <2 x i32> + %extended1 = zext <2 x i32> %low1 to <2 x i64> + %extended2 = zext <2 x i32> %low2 to <2 x i64> + %a = mul <2 x i64> %extended1, %extended2 + ret <2 x i64> %a +} + +; CHECK-LABEL: extmul_high_u_v2i64: +; NO-SIMD128-NOT: i64x2 +; SIMD128-NEXT: .functype extmul_high_u_v2i64 (v128, v128) -> (v128){{$}} +; SIMD128-SLOW-NEXT: i64x2.extmul_high_i32x4_u $push[[R:[0-9]+]]=, $0, $1{{$}} +; SIMD128-SLOW-NEXT: return $pop[[R]]{{$}} +define <2 x i64> @extmul_high_u_v2i64(<4 x i32> %v1, <4 x i32> %v2) { + %high1 = shufflevector <4 x i32> %v1, <4 x i32> undef, <2 x i32> + %high2 = shufflevector <4 x i32> %v2, <4 x i32> undef, <2 x i32> + %extended1 = zext <2 x i32> %high1 to <2 x i64> + %extended2 = zext <2 x i32> %high2 to <2 x i64> + %a = mul <2 x i64> %extended1, %extended2 + ret <2 x i64> %a +} + ; ============================================================================== ; 4 x float ; ============================================================================== diff --git a/test/CodeGen/WebAssembly/simd-intrinsics.ll b/test/CodeGen/WebAssembly/simd-intrinsics.ll index aaa1c4d5086..f7cc9302003 100644 --- a/test/CodeGen/WebAssembly/simd-intrinsics.ll +++ b/test/CodeGen/WebAssembly/simd-intrinsics.ll @@ -248,54 +248,6 @@ define <8 x i16> @q15mulr_sat_s_v8i16(<8 x i16> %x, <8 x i16> %y) { ret <8 x i16> %a } -; CHECK-LABEL: extmul_low_s_v8i16: -; CHECK-NEXT: .functype extmul_low_s_v8i16 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i16x8.extmul_low_i8x16_s $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <8 x i16> @llvm.wasm.extmul.low.signed.v8i16(<16 x i8>, <16 x i8>) -define <8 x i16> @extmul_low_s_v8i16(<16 x i8> %x, <16 x i8> %y) { - %a = call <8 x i16> @llvm.wasm.extmul.low.signed.v8i16( - <16 x i8> %x, <16 x i8> %y - ) - ret <8 x i16> %a -} - -; CHECK-LABEL: extmul_high_s_v8i16: -; CHECK-NEXT: .functype extmul_high_s_v8i16 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i16x8.extmul_high_i8x16_s $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <8 x i16> @llvm.wasm.extmul.high.signed.v8i16(<16 x i8>, <16 x i8>) -define <8 x i16> @extmul_high_s_v8i16(<16 x i8> %x, <16 x i8> %y) { - %a = call <8 x i16> @llvm.wasm.extmul.high.signed.v8i16( - <16 x i8> %x, <16 x i8> %y - ) - ret <8 x i16> %a -} - -; CHECK-LABEL: extmul_low_u_v8i16: -; CHECK-NEXT: .functype extmul_low_u_v8i16 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i16x8.extmul_low_i8x16_u $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <8 x i16> @llvm.wasm.extmul.low.unsigned.v8i16(<16 x i8>, <16 x i8>) -define <8 x i16> @extmul_low_u_v8i16(<16 x i8> %x, <16 x i8> %y) { - %a = call <8 x i16> @llvm.wasm.extmul.low.unsigned.v8i16( - <16 x i8> %x, <16 x i8> %y - ) - ret <8 x i16> %a -} - -; CHECK-LABEL: extmul_high_u_v8i16: -; CHECK-NEXT: .functype extmul_high_u_v8i16 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i16x8.extmul_high_i8x16_u $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <8 x i16> @llvm.wasm.extmul.high.unsigned.v8i16(<16 x i8>, <16 x i8>) -define <8 x i16> @extmul_high_u_v8i16(<16 x i8> %x, <16 x i8> %y) { - %a = call <8 x i16> @llvm.wasm.extmul.high.unsigned.v8i16( - <16 x i8> %x, <16 x i8> %y - ) - ret <8 x i16> %a -} - ; CHECK-LABEL: extadd_pairwise_s_v8i16: ; CHECK-NEXT: .functype extadd_pairwise_s_v8i16 (v128) -> (v128){{$}} ; CHECK-NEXT: i16x8.extadd_pairwise_i8x16_s $push[[R:[0-9]+]]=, $0{{$}} @@ -395,55 +347,6 @@ define <4 x i32> @dot(<8 x i16> %x, <8 x i16> %y) { ret <4 x i32> %a } - -; CHECK-LABEL: extmul_low_s_v4i32: -; CHECK-NEXT: .functype extmul_low_s_v4i32 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i32x4.extmul_low_i16x8_s $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <4 x i32> @llvm.wasm.extmul.low.signed.v4i32(<8 x i16>, <8 x i16>) -define <4 x i32> @extmul_low_s_v4i32(<8 x i16> %x, <8 x i16> %y) { - %a = call <4 x i32> @llvm.wasm.extmul.low.signed.v4i32( - <8 x i16> %x, <8 x i16> %y - ) - ret <4 x i32> %a -} - -; CHECK-LABEL: extmul_high_s_v4i32: -; CHECK-NEXT: .functype extmul_high_s_v4i32 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i32x4.extmul_high_i16x8_s $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <4 x i32> @llvm.wasm.extmul.high.signed.v4i32(<8 x i16>, <8 x i16>) -define <4 x i32> @extmul_high_s_v4i32(<8 x i16> %x, <8 x i16> %y) { - %a = call <4 x i32> @llvm.wasm.extmul.high.signed.v4i32( - <8 x i16> %x, <8 x i16> %y - ) - ret <4 x i32> %a -} - -; CHECK-LABEL: extmul_low_u_v4i32: -; CHECK-NEXT: .functype extmul_low_u_v4i32 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i32x4.extmul_low_i16x8_u $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <4 x i32> @llvm.wasm.extmul.low.unsigned.v4i32(<8 x i16>, <8 x i16>) -define <4 x i32> @extmul_low_u_v4i32(<8 x i16> %x, <8 x i16> %y) { - %a = call <4 x i32> @llvm.wasm.extmul.low.unsigned.v4i32( - <8 x i16> %x, <8 x i16> %y - ) - ret <4 x i32> %a -} - -; CHECK-LABEL: extmul_high_u_v4i32: -; CHECK-NEXT: .functype extmul_high_u_v4i32 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i32x4.extmul_high_i16x8_u $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <4 x i32> @llvm.wasm.extmul.high.unsigned.v4i32(<8 x i16>, <8 x i16>) -define <4 x i32> @extmul_high_u_v4i32(<8 x i16> %x, <8 x i16> %y) { - %a = call <4 x i32> @llvm.wasm.extmul.high.unsigned.v4i32( - <8 x i16> %x, <8 x i16> %y - ) - ret <4 x i32> %a -} - ; CHECK-LABEL: extadd_pairwise_s_v4i32: ; CHECK-NEXT: .functype extadd_pairwise_s_v4i32 (v128) -> (v128){{$}} ; CHECK-NEXT: i32x4.extadd_pairwise_i16x8_s $push[[R:[0-9]+]]=, $0{{$}} @@ -580,54 +483,6 @@ define <4 x i32> @trunc_sat_zero_u_v4i32_2(<2 x double> %x) { ; ============================================================================== ; 2 x i64 ; ============================================================================== -; CHECK-LABEL: extmul_low_s_v2i64: -; CHECK-NEXT: .functype extmul_low_s_v2i64 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i64x2.extmul_low_i32x4_s $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <2 x i64> @llvm.wasm.extmul.low.signed.v2i64(<4 x i32>, <4 x i32>) -define <2 x i64> @extmul_low_s_v2i64(<4 x i32> %x, <4 x i32> %y) { - %a = call <2 x i64> @llvm.wasm.extmul.low.signed.v2i64( - <4 x i32> %x, <4 x i32> %y - ) - ret <2 x i64> %a -} - -; CHECK-LABEL: extmul_high_s_v2i64: -; CHECK-NEXT: .functype extmul_high_s_v2i64 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i64x2.extmul_high_i32x4_s $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <2 x i64> @llvm.wasm.extmul.high.signed.v2i64(<4 x i32>, <4 x i32>) -define <2 x i64> @extmul_high_s_v2i64(<4 x i32> %x, <4 x i32> %y) { - %a = call <2 x i64> @llvm.wasm.extmul.high.signed.v2i64( - <4 x i32> %x, <4 x i32> %y - ) - ret <2 x i64> %a -} - -; CHECK-LABEL: extmul_low_u_v2i64: -; CHECK-NEXT: .functype extmul_low_u_v2i64 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i64x2.extmul_low_i32x4_u $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <2 x i64> @llvm.wasm.extmul.low.unsigned.v2i64(<4 x i32>, <4 x i32>) -define <2 x i64> @extmul_low_u_v2i64(<4 x i32> %x, <4 x i32> %y) { - %a = call <2 x i64> @llvm.wasm.extmul.low.unsigned.v2i64( - <4 x i32> %x, <4 x i32> %y - ) - ret <2 x i64> %a -} - -; CHECK-LABEL: extmul_high_u_v2i64: -; CHECK-NEXT: .functype extmul_high_u_v2i64 (v128, v128) -> (v128){{$}} -; CHECK-NEXT: i64x2.extmul_high_i32x4_u $push[[R:[0-9]+]]=, $0, $1{{$}} -; CHECK-NEXT: return $pop[[R]]{{$}} -declare <2 x i64> @llvm.wasm.extmul.high.unsigned.v2i64(<4 x i32>, <4 x i32>) -define <2 x i64> @extmul_high_u_v2i64(<4 x i32> %x, <4 x i32> %y) { - %a = call <2 x i64> @llvm.wasm.extmul.high.unsigned.v2i64( - <4 x i32> %x, <4 x i32> %y - ) - ret <2 x i64> %a -} - ; CHECK-LABEL: any_v2i64: ; CHECK-NEXT: .functype any_v2i64 (v128) -> (i32){{$}} ; CHECK-NEXT: v128.any_true $push[[R:[0-9]+]]=, $0{{$}}