xref: /llvm-project/clang/test/CodeGen/X86/amxavx512-builtins.c (revision 48803bc8c7be25745a0e623e6753261c07281b06)
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-512 -emit-llvm -o - -Wall -Werror -pedantic -Wno-gnu-statement-expression | 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