| 1 | // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512pf -emit-llvm -o - -Wall -Werror | FileCheck %s |
| 2 | |
| 3 | |
| 4 | #include <immintrin.h> |
| 5 | |
| 6 | void test_mm512_mask_prefetch_i32gather_pd(__m256i index, __mmask8 mask, void const *addr, int hint) { |
| 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); |
| 10 | } |
| 11 | |
| 12 | void test_mm512_prefetch_i32gather_pd(__m256i index, void const *addr, int hint) { |
| 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); |
| 16 | } |
| 17 | |
| 18 | void test_mm512_mask_prefetch_i32gather_ps(__m512i index, __mmask16 mask, void const *addr, int hint) { |
| 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); |
| 22 | } |
| 23 | |
| 24 | void test_mm512_prefetch_i32gather_ps(__m512i index, void const *addr, int hint) { |
| 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); |
| 28 | } |
| 29 | |
| 30 | void test_mm512_mask_prefetch_i64gather_pd(__m512i index, __mmask8 mask, void const *addr, int hint) { |
| 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); |
| 34 | } |
| 35 | |
| 36 | void test_mm512_prefetch_i64gather_pd(__m512i index, void const *addr, int hint) { |
| 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); |
| 40 | } |
| 41 | |
| 42 | void test_mm512_mask_prefetch_i64gather_ps(__m512i index, __mmask8 mask, void const *addr, int hint) { |
| 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); |
| 46 | } |
| 47 | |
| 48 | void test_mm512_prefetch_i64gather_ps(__m512i index, void const *addr, int hint) { |
| 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); |
| 52 | } |
| 53 | |
| 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); |
| 58 | } |
| 59 | |
| 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); |
| 64 | } |
| 65 | |
| 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); |
| 70 | } |
| 71 | |
| 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); |
| 76 | } |
| 77 | |
| 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); |
| 82 | } |
| 83 | |
| 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); |
| 88 | } |
| 89 | |
| 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); |
| 94 | } |
| 95 | |
| 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); |
| 100 | } |
| 101 | |