168 lines · c
1// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512vnni -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s2// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +avx512vnni -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s3// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512vnni -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s4// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=i386-apple-darwin -target-feature +avx512vnni -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s5 6#include <immintrin.h>7 8__m256i test_mm256_mask_dpbusd_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {9 // CHECK-LABEL: test_mm256_mask_dpbusd_epi3210 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})11 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}12 return _mm256_mask_dpbusd_epi32(__S, __U, __A, __B);13}14 15__m256i test_mm256_maskz_dpbusd_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) {16 // CHECK-LABEL: test_mm256_maskz_dpbusd_epi3217 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})18 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}19 return _mm256_maskz_dpbusd_epi32(__U, __S, __A, __B);20}21 22__m256i test_mm256_dpbusd_epi32(__m256i __S, __m256i __A, __m256i __B) {23 // CHECK-LABEL: test_mm256_dpbusd_epi3224 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})25 return _mm256_dpbusd_epi32(__S, __A, __B);26}27 28__m256i test_mm256_mask_dpbusds_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {29 // CHECK-LABEL: test_mm256_mask_dpbusds_epi3230 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})31 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}32 return _mm256_mask_dpbusds_epi32(__S, __U, __A, __B);33}34 35__m256i test_mm256_maskz_dpbusds_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) {36 // CHECK-LABEL: test_mm256_maskz_dpbusds_epi3237 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})38 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}39 return _mm256_maskz_dpbusds_epi32(__U, __S, __A, __B);40}41 42__m256i test_mm256_dpbusds_epi32(__m256i __S, __m256i __A, __m256i __B) {43 // CHECK-LABEL: test_mm256_dpbusds_epi3244 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})45 return _mm256_dpbusds_epi32(__S, __A, __B);46}47 48__m256i test_mm256_mask_dpwssd_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {49 // CHECK-LABEL: test_mm256_mask_dpwssd_epi3250 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})51 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}52 return _mm256_mask_dpwssd_epi32(__S, __U, __A, __B);53}54 55__m256i test_mm256_maskz_dpwssd_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) {56 // CHECK-LABEL: test_mm256_maskz_dpwssd_epi3257 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})58 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}59 return _mm256_maskz_dpwssd_epi32(__U, __S, __A, __B);60}61 62__m256i test_mm256_dpwssd_epi32(__m256i __S, __m256i __A, __m256i __B) {63 // CHECK-LABEL: test_mm256_dpwssd_epi3264 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})65 return _mm256_dpwssd_epi32(__S, __A, __B);66}67 68__m256i test_mm256_mask_dpwssds_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {69 // CHECK-LABEL: test_mm256_mask_dpwssds_epi3270 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})71 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}72 return _mm256_mask_dpwssds_epi32(__S, __U, __A, __B);73}74 75__m256i test_mm256_maskz_dpwssds_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) {76 // CHECK-LABEL: test_mm256_maskz_dpwssds_epi3277 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})78 // CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}79 return _mm256_maskz_dpwssds_epi32(__U, __S, __A, __B);80}81 82__m256i test_mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B) {83 // CHECK-LABEL: test_mm256_dpwssds_epi3284 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})85 return _mm256_dpwssds_epi32(__S, __A, __B);86}87 88__m128i test_mm_mask_dpbusd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {89 // CHECK-LABEL: test_mm_mask_dpbusd_epi3290 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})91 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}92 return _mm_mask_dpbusd_epi32(__S, __U, __A, __B);93}94 95__m128i test_mm_maskz_dpbusd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {96 // CHECK-LABEL: test_mm_maskz_dpbusd_epi3297 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})98 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}99 return _mm_maskz_dpbusd_epi32(__U, __S, __A, __B);100}101 102__m128i test_mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) {103 // CHECK-LABEL: test_mm_dpbusd_epi32104 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})105 return _mm_dpbusd_epi32(__S, __A, __B);106}107 108__m128i test_mm_mask_dpbusds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {109 // CHECK-LABEL: test_mm_mask_dpbusds_epi32110 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})111 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}112 return _mm_mask_dpbusds_epi32(__S, __U, __A, __B);113}114 115__m128i test_mm_maskz_dpbusds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {116 // CHECK-LABEL: test_mm_maskz_dpbusds_epi32117 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})118 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}119 return _mm_maskz_dpbusds_epi32(__U, __S, __A, __B);120}121 122__m128i test_mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) {123 // CHECK-LABEL: test_mm_dpbusds_epi32124 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})125 return _mm_dpbusds_epi32(__S, __A, __B);126}127 128__m128i test_mm_mask_dpwssd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {129 // CHECK-LABEL: test_mm_mask_dpwssd_epi32130 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})131 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}132 return _mm_mask_dpwssd_epi32(__S, __U, __A, __B);133}134 135__m128i test_mm_maskz_dpwssd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {136 // CHECK-LABEL: test_mm_maskz_dpwssd_epi32137 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})138 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}139 return _mm_maskz_dpwssd_epi32(__U, __S, __A, __B);140}141 142__m128i test_mm_dpwssd_epi32(__m128i __S, __m128i __A, __m128i __B) {143 // CHECK-LABEL: test_mm_dpwssd_epi32144 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})145 return _mm_dpwssd_epi32(__S, __A, __B);146}147 148__m128i test_mm_mask_dpwssds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {149 // CHECK-LABEL: test_mm_mask_dpwssds_epi32150 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})151 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}152 return _mm_mask_dpwssds_epi32(__S, __U, __A, __B);153}154 155__m128i test_mm_maskz_dpwssds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {156 // CHECK-LABEL: test_mm_maskz_dpwssds_epi32157 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})158 // CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}159 return _mm_maskz_dpwssds_epi32(__U, __S, __A, __B);160}161 162__m128i test_mm_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B) {163 // CHECK-LABEL: test_mm_dpwssds_epi32164 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})165 return _mm_dpwssds_epi32(__S, __A, __B);166}167 168