Skip to content

Commit 4d304c8

Browse files
committed
Precommit test
1 parent 1381ad4 commit 4d304c8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc < %s -mattr=+simd128 | FileCheck %s
3+
4+
target triple = "wasm32-unknown-unknown"
5+
define <4 x i32> @dot(<8 x i16> %a, <8 x i16> %b) {
6+
; CHECK-LABEL: dot:
7+
; CHECK: .functype dot (v128, v128) -> (v128)
8+
; CHECK-NEXT: .local v128
9+
; CHECK-NEXT: # %bb.0:
10+
; CHECK-NEXT: local.get 0
11+
; CHECK-NEXT: local.get 1
12+
; CHECK-NEXT: i32x4.extmul_low_i16x8_s
13+
; CHECK-NEXT: local.tee 2
14+
; CHECK-NEXT: local.get 0
15+
; CHECK-NEXT: local.get 1
16+
; CHECK-NEXT: i32x4.extmul_high_i16x8_s
17+
; CHECK-NEXT: local.tee 1
18+
; CHECK-NEXT: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27
19+
; CHECK-NEXT: local.get 2
20+
; CHECK-NEXT: local.get 1
21+
; CHECK-NEXT: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31
22+
; CHECK-NEXT: i32x4.add
23+
; CHECK-NEXT: # fallthrough-return
24+
%sext1 = sext <8 x i16> %a to <8 x i32>
25+
%sext2 = sext <8 x i16> %b to <8 x i32>
26+
%mul = mul nsw <8 x i32> %sext1, %sext2
27+
%shuffle1 = shufflevector <8 x i32> %mul, <8 x i32> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
28+
%shuffle2 = shufflevector <8 x i32> %mul, <8 x i32> poison, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
29+
%res = add <4 x i32> %shuffle1, %shuffle2
30+
ret <4 x i32> %res
31+
}
32+

0 commit comments

Comments
 (0)