Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / X86 / avx512pf-builtins.c
blob4ca70f5787968b93b04567b36afa6a03bdfaa988
1 // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512pf -emit-llvm -o - -Wall -Werror | FileCheck %s
4 #include <immintrin.h>
6 void test_mm512_mask_prefetch_i32gather_pd(__m256i index, __mmask8 mask, void const *addr) {
7 // CHECK-LABEL: @test_mm512_mask_prefetch_i32gather_pd
8 // CHECK: @llvm.x86.avx512.gatherpf.dpd
9 return _mm512_mask_prefetch_i32gather_pd(index, mask, addr, 2, _MM_HINT_T0);
12 void test_mm512_prefetch_i32gather_pd(__m256i index, void const *addr) {
13 // CHECK-LABEL: @test_mm512_prefetch_i32gather_pd
14 // CHECK: @llvm.x86.avx512.gatherpf.dpd
15 return _mm512_prefetch_i32gather_pd(index, addr, 2, _MM_HINT_T0);
18 void test_mm512_mask_prefetch_i32gather_ps(__m512i index, __mmask16 mask, void const *addr) {
19 // CHECK-LABEL: @test_mm512_mask_prefetch_i32gather_ps
20 // CHECK: @llvm.x86.avx512.gatherpf.dps
21 return _mm512_mask_prefetch_i32gather_ps(index, mask, addr, 2, _MM_HINT_T0);
24 void test_mm512_prefetch_i32gather_ps(__m512i index, void const *addr) {
25 // CHECK-LABEL: @test_mm512_prefetch_i32gather_ps
26 // CHECK: @llvm.x86.avx512.gatherpf.dps
27 return _mm512_prefetch_i32gather_ps(index, addr, 2, _MM_HINT_T0);
30 void test_mm512_mask_prefetch_i64gather_pd(__m512i index, __mmask8 mask, void const *addr) {
31 // CHECK-LABEL: @test_mm512_mask_prefetch_i64gather_pd
32 // CHECK: @llvm.x86.avx512.gatherpf.qpd
33 return _mm512_mask_prefetch_i64gather_pd(index, mask, addr, 2, _MM_HINT_T0);
36 void test_mm512_prefetch_i64gather_pd(__m512i index, void const *addr) {
37 // CHECK-LABEL: @test_mm512_prefetch_i64gather_pd
38 // CHECK: @llvm.x86.avx512.gatherpf.qpd
39 return _mm512_prefetch_i64gather_pd(index, addr, 2, _MM_HINT_T0);
42 void test_mm512_mask_prefetch_i64gather_ps(__m512i index, __mmask8 mask, void const *addr) {
43 // CHECK-LABEL: @test_mm512_mask_prefetch_i64gather_ps
44 // CHECK: @llvm.x86.avx512.gatherpf.qps
45 return _mm512_mask_prefetch_i64gather_ps(index, mask, addr, 2, _MM_HINT_T0);
48 void test_mm512_prefetch_i64gather_ps(__m512i index, void const *addr) {
49 // CHECK-LABEL: @test_mm512_prefetch_i64gather_ps
50 // CHECK: @llvm.x86.avx512.gatherpf.qps
51 return _mm512_prefetch_i64gather_ps(index, addr, 2, _MM_HINT_T0);
54 void test_mm512_prefetch_i32scatter_pd(void *addr, __m256i index) {
55 // CHECK-LABEL: @test_mm512_prefetch_i32scatter_pd
56 // CHECK: @llvm.x86.avx512.scatterpf.dpd.512
57 return _mm512_prefetch_i32scatter_pd(addr, index, 1, _MM_HINT_T1);
60 void test_mm512_mask_prefetch_i32scatter_pd(void *addr, __mmask8 mask, __m256i index) {
61 // CHECK-LABEL: @test_mm512_mask_prefetch_i32scatter_pd
62 // CHECK: @llvm.x86.avx512.scatterpf.dpd.512
63 return _mm512_mask_prefetch_i32scatter_pd(addr, mask, index, 1, _MM_HINT_T1);
66 void test_mm512_prefetch_i32scatter_ps(void *addr, __m512i index) {
67 // CHECK-LABEL: @test_mm512_prefetch_i32scatter_ps
68 // CHECK: @llvm.x86.avx512.scatterpf.dps.512
69 return _mm512_prefetch_i32scatter_ps(addr, index, 1, _MM_HINT_T1);
72 void test_mm512_mask_prefetch_i32scatter_ps(void *addr, __mmask16 mask, __m512i index) {
73 // CHECK-LABEL: @test_mm512_mask_prefetch_i32scatter_ps
74 // CHECK: @llvm.x86.avx512.scatterpf.dps.512
75 return _mm512_mask_prefetch_i32scatter_ps(addr, mask, index, 1, _MM_HINT_T1);
78 void test_mm512_prefetch_i64scatter_pd(void *addr, __m512i index) {
79 // CHECK-LABEL: @test_mm512_prefetch_i64scatter_pd
80 // CHECK: @llvm.x86.avx512.scatterpf.qpd.512
81 return _mm512_prefetch_i64scatter_pd(addr, index, 1, _MM_HINT_T1);
84 void test_mm512_mask_prefetch_i64scatter_pd(void *addr, __mmask16 mask, __m512i index) {
85 // CHECK-LABEL: @test_mm512_mask_prefetch_i64scatter_pd
86 // CHECK: @llvm.x86.avx512.scatterpf.qpd.512
87 return _mm512_mask_prefetch_i64scatter_pd(addr, mask, index, 1, _MM_HINT_T1);
90 void test_mm512_prefetch_i64scatter_ps(void *addr, __m512i index) {
91 // CHECK-LABEL: @test_mm512_prefetch_i64scatter_ps
92 // CHECK: @llvm.x86.avx512.scatterpf.qps.512
93 return _mm512_prefetch_i64scatter_ps(addr, index, 1, _MM_HINT_T1);
96 void test_mm512_mask_prefetch_i64scatter_ps(void *addr, __mmask16 mask, __m512i index) {
97 // CHECK-LABEL: @test_mm512_mask_prefetch_i64scatter_ps
98 // CHECK: @llvm.x86.avx512.scatterpf.qps.512
99 return _mm512_mask_prefetch_i64scatter_ps(addr, mask, index, 1, _MM_HINT_T1);