1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVXVNNI
3 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512vnni,+avx512vl,+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVX512VNNI
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVXVNNI
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vnni,+avx512vl,+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVX512VNNI
7 declare <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32>, <8 x i32>, <8 x i32>)
9 define <8 x i32>@test_int_x86_avx_vpdpbusd_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2) {
10 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusd_256:
12 ; AVXVNNI-NEXT: {vex} vpdpbusd %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x50,0xc2]
13 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
15 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpbusd_256:
16 ; AVX512VNNI: # %bb.0:
17 ; AVX512VNNI-NEXT: {vex} vpdpbusd %ymm2, %ymm1, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x75,0x50,0xc2]
18 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
19 %res = call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2)
23 declare <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32>, <4 x i32>, <4 x i32>)
25 define <4 x i32>@test_int_x86_avx_vpdpbusd_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2) {
26 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusd_128:
28 ; AVXVNNI-NEXT: {vex} vpdpbusd %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x50,0xc2]
29 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
31 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpbusd_128:
32 ; AVX512VNNI: # %bb.0:
33 ; AVX512VNNI-NEXT: {vex} vpdpbusd %xmm2, %xmm1, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x71,0x50,0xc2]
34 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
35 %res = call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2)
39 declare <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32>, <8 x i32>, <8 x i32>)
41 define <8 x i32>@test_int_x86_avx_vpdpbusds_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2) {
42 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusds_256:
44 ; AVXVNNI-NEXT: {vex} vpdpbusds %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x51,0xc2]
45 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
47 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpbusds_256:
48 ; AVX512VNNI: # %bb.0:
49 ; AVX512VNNI-NEXT: {vex} vpdpbusds %ymm2, %ymm1, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x75,0x51,0xc2]
50 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
51 %res = call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2)
55 declare <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32>, <4 x i32>, <4 x i32>)
57 define <4 x i32>@test_int_x86_avx_vpdpbusds_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2) {
58 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusds_128:
60 ; AVXVNNI-NEXT: {vex} vpdpbusds %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x51,0xc2]
61 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
63 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpbusds_128:
64 ; AVX512VNNI: # %bb.0:
65 ; AVX512VNNI-NEXT: {vex} vpdpbusds %xmm2, %xmm1, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x71,0x51,0xc2]
66 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
67 %res = call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2)
71 declare <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32>, <8 x i32>, <8 x i32>)
73 define <8 x i32>@test_int_x86_avx_vpdpwssd_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2) {
74 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpwssd_256:
76 ; AVXVNNI-NEXT: {vex} vpdpwssd %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x52,0xc2]
77 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
79 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpwssd_256:
80 ; AVX512VNNI: # %bb.0:
81 ; AVX512VNNI-NEXT: {vex} vpdpwssd %ymm2, %ymm1, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x75,0x52,0xc2]
82 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
83 %res = call <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2)
87 declare <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32>, <4 x i32>, <4 x i32>)
89 define <4 x i32>@test_int_x86_avx_vpdpwssd_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2) {
90 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpwssd_128:
92 ; AVXVNNI-NEXT: {vex} vpdpwssd %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x52,0xc2]
93 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
95 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpwssd_128:
96 ; AVX512VNNI: # %bb.0:
97 ; AVX512VNNI-NEXT: {vex} vpdpwssd %xmm2, %xmm1, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x71,0x52,0xc2]
98 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
99 %res = call <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2)
103 declare <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32>, <8 x i32>, <8 x i32>)
105 define <8 x i32>@test_int_x86_avx_vpdpwssds_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2) {
106 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpwssds_256:
108 ; AVXVNNI-NEXT: {vex} vpdpwssds %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x53,0xc2]
109 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
111 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpwssds_256:
112 ; AVX512VNNI: # %bb.0:
113 ; AVX512VNNI-NEXT: {vex} vpdpwssds %ymm2, %ymm1, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x75,0x53,0xc2]
114 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
115 %res = call <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2)
119 declare <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32>, <4 x i32>, <4 x i32>)
121 define <4 x i32>@test_int_x86_avx_vpdpwssds_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2) {
122 ; AVXVNNI-LABEL: test_int_x86_avx_vpdpwssds_128:
124 ; AVXVNNI-NEXT: {vex} vpdpwssds %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x53,0xc2]
125 ; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
127 ; AVX512VNNI-LABEL: test_int_x86_avx_vpdpwssds_128:
128 ; AVX512VNNI: # %bb.0:
129 ; AVX512VNNI-NEXT: {vex} vpdpwssds %xmm2, %xmm1, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x71,0x53,0xc2]
130 ; AVX512VNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]
131 %res = call <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2)