134 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVXVNNI3; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512vnni,+avx512vl,+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVX512VNNI4; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVXVNNI5; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vnni,+avx512vl,+avxvnni --show-mc-encoding | FileCheck %s --check-prefixes=AVX512VNNI6 7declare <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32>, <32 x i8>, <32 x i8>)8 9define <8 x i32>@test_int_x86_avx_vpdpbusd_256(<8 x i32> %x0, <32 x i8> %x1, <32 x i8> %x2) {10; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusd_256:11; AVXVNNI: # %bb.0:12; AVXVNNI-NEXT: {vex} vpdpbusd %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x50,0xc2]13; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]14;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, <32 x i8> %x1, <32 x i8> %x2)20 ret <8 x i32> %res21}22 23declare <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32>, <16 x i8>, <16 x i8>)24 25define <4 x i32>@test_int_x86_avx_vpdpbusd_128(<4 x i32> %x0, <16 x i8> %x1, <16 x i8> %x2) {26; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusd_128:27; AVXVNNI: # %bb.0:28; AVXVNNI-NEXT: {vex} vpdpbusd %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x50,0xc2]29; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]30;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, <16 x i8> %x1, <16 x i8> %x2)36 ret <4 x i32> %res37}38 39declare <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32>, <32 x i8>, <32 x i8>)40 41define <8 x i32>@test_int_x86_avx_vpdpbusds_256(<8 x i32> %x0, <32 x i8> %x1, <32 x i8> %x2) {42; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusds_256:43; AVXVNNI: # %bb.0:44; AVXVNNI-NEXT: {vex} vpdpbusds %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x51,0xc2]45; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]46;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, <32 x i8> %x1, <32 x i8> %x2)52 ret <8 x i32> %res53}54 55declare <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32>, <16 x i8>, <16 x i8>)56 57define <4 x i32>@test_int_x86_avx_vpdpbusds_128(<4 x i32> %x0, <16 x i8> %x1, <16 x i8> %x2) {58; AVXVNNI-LABEL: test_int_x86_avx_vpdpbusds_128:59; AVXVNNI: # %bb.0:60; AVXVNNI-NEXT: {vex} vpdpbusds %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x51,0xc2]61; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]62;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, <16 x i8> %x1, <16 x i8> %x2)68 ret <4 x i32> %res69}70 71declare <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32>, <8 x i32>, <8 x i32>)72 73define <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:75; AVXVNNI: # %bb.0:76; AVXVNNI-NEXT: {vex} vpdpwssd %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x52,0xc2]77; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]78;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)84 ret <8 x i32> %res85}86 87declare <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32>, <4 x i32>, <4 x i32>)88 89define <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:91; AVXVNNI: # %bb.0:92; AVXVNNI-NEXT: {vex} vpdpwssd %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x52,0xc2]93; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]94;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)100 ret <4 x i32> %res101}102 103declare <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32>, <8 x i32>, <8 x i32>)104 105define <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:107; AVXVNNI: # %bb.0:108; AVXVNNI-NEXT: {vex} vpdpwssds %ymm2, %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x75,0x53,0xc2]109; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]110;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)116 ret <8 x i32> %res117}118 119declare <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32>, <4 x i32>, <4 x i32>)120 121define <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:123; AVXVNNI: # %bb.0:124; AVXVNNI-NEXT: {vex} vpdpwssds %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0x53,0xc2]125; AVXVNNI-NEXT: ret{{[l|q]}} # encoding: [0xc3]126;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)132 ret <4 x i32> %res133}134