Debian Codegraph @

clang/test/CodeGen/X86/amxavx512-builtins.c

raw
1 // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +amx-tile -target-feature +amx-avx512 \
2 // RUN: -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror -pedantic -Wno-gnu-statement-expression -flax-vector-conversions=none | FileCheck %s
3
4 #include <immintrin.h>
5 #include <stddef.h>
6
7 __m512 test_tile_cvtrowd2ps(unsigned int A) {
8 // CHECK-LABEL: @test_tile_cvtrowd2ps(
9 // CHECK: call <16 x float> @llvm.x86.tcvtrowd2ps(i8 1, i32 %{{.*}})
10 return _tile_cvtrowd2ps(1, A);
11 }
12
13 __m512bh test_tile_cvtrowps2bf16h(unsigned int A) {
14 // CHECK-LABEL: @test_tile_cvtrowps2bf16h(
15 // CHECK: call <32 x bfloat> @llvm.x86.tcvtrowps2bf16h(i8 1, i32 %{{.*}})
16 return _tile_cvtrowps2bf16h(1, A);
17 }
18
19 __m512bh test_tile_cvtrowps2bf16l(unsigned int A) {
20 // CHECK-LABEL: @test_tile_cvtrowps2bf16l(
21 // CHECK: call <32 x bfloat> @llvm.x86.tcvtrowps2bf16l(i8 1, i32 %{{.*}})
22 return _tile_cvtrowps2bf16l(1, A);
23 }
24
25 __m512h test_tile_cvtrowps2phh(unsigned int A) {
26 // CHECK-LABEL: @test_tile_cvtrowps2phh(
27 // CHECK: call <32 x half> @llvm.x86.tcvtrowps2phh(i8 1, i32 %{{.*}})
28 return _tile_cvtrowps2phh(1, A);
29 }
30
31 __m512h test_tile_cvtrowps2phl(unsigned int A) {
32 // CHECK-LABEL: @test_tile_cvtrowps2phl(
33 // CHECK: call <32 x half> @llvm.x86.tcvtrowps2phl(i8 1, i32 %{{.*}})
34 return _tile_cvtrowps2phl(1, A);
35 }
36
37 __m512i test_tile_movrow(unsigned int A) {
38 // CHECK-LABEL: @test_tile_movrow
39 // CHECK: %1 = call <16 x i32> @llvm.x86.tilemovrow(i8 1, i32 %{{.*}})
40 return _tile_movrow(1, A);
41 }
42
43 __m512 test_tile_cvtrowd2psi(void) {
44 // CHECK-LABEL: @test_tile_cvtrowd2psi(
45 // CHECK: call <16 x float> @llvm.x86.tcvtrowd2psi(i8 1, i32 2)
46 return _tile_cvtrowd2psi(1, 2);
47 }
48
49 __m512bh test_tile_cvtrowps2bf16hi(void) {
50 // CHECK-LABEL: @test_tile_cvtrowps2bf16hi(
51 // CHECK: call <32 x bfloat> @llvm.x86.tcvtrowps2bf16hi(i8 1, i32 2)
52 return _tile_cvtrowps2bf16hi(1, 2);
53 }
54
55 __m512bh test_tile_cvtrowps2bf16li(void) {
56 // CHECK-LABEL: @test_tile_cvtrowps2bf16li(
57 // CHECK: call <32 x bfloat> @llvm.x86.tcvtrowps2bf16li(i8 1, i32 2)
58 return _tile_cvtrowps2bf16li(1, 2);
59 }
60
61 __m512h test_tile_cvtrowps2phhi(void) {
62 // CHECK-LABEL: @test_tile_cvtrowps2phhi(
63 // CHECK: call <32 x half> @llvm.x86.tcvtrowps2phhi(i8 1, i32 2)
64 return _tile_cvtrowps2phhi(1, 2);
65 }
66
67 __m512h test_tile_cvtrowps2phli(void) {
68 // CHECK-LABEL: @test_tile_cvtrowps2phli(
69 // CHECK: call <32 x half> @llvm.x86.tcvtrowps2phli(i8 1, i32 2)
70 return _tile_cvtrowps2phli(1, 2);
71 }
72
73 __m512i test_tile_movrowi(void) {
74 // CHECK-LABEL: @test_tile_movrowi
75 // CHECK: %0 = call <16 x i32> @llvm.x86.tilemovrowi(i8 1, i32 2)
76 return _tile_movrowi(1, 2);
77 }