1*1b63f47eSFeng Zou // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +amx-fp8 \ 2*1b63f47eSFeng Zou // RUN: -emit-llvm -o - -Werror -pedantic | FileCheck %s 3*1b63f47eSFeng Zou #include <immintrin.h> 4*1b63f47eSFeng Zou 5*1b63f47eSFeng Zou void test_tdpbf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { 6*1b63f47eSFeng Zou //CHECK-LABEL: @test_tdpbf8ps 7*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) 8*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.tdpbf8ps.internal 9*1b63f47eSFeng Zou //CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) 10*1b63f47eSFeng Zou __tile_dpbf8ps(&dst, src1, src2); 11*1b63f47eSFeng Zou } 12*1b63f47eSFeng Zou 13*1b63f47eSFeng Zou void test_tdpbhf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { 14*1b63f47eSFeng Zou //CHECK-LABEL: @test_tdpbhf8ps 15*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) 16*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.tdpbhf8ps.internal 17*1b63f47eSFeng Zou //CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) 18*1b63f47eSFeng Zou __tile_dpbhf8ps(&dst, src1, src2); 19*1b63f47eSFeng Zou } 20*1b63f47eSFeng Zou 21*1b63f47eSFeng Zou void test_tdphbf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { 22*1b63f47eSFeng Zou //CHECK-LABEL: @test_tdphbf8ps 23*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) 24*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.tdphbf8ps.internal 25*1b63f47eSFeng Zou //CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) 26*1b63f47eSFeng Zou __tile_dphbf8ps(&dst, src1, src2); 27*1b63f47eSFeng Zou } 28*1b63f47eSFeng Zou 29*1b63f47eSFeng Zou void test_tdphf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { 30*1b63f47eSFeng Zou //CHECK-LABEL: @test_tdphf8ps 31*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) 32*1b63f47eSFeng Zou //CHECK-DAG: call x86_amx @llvm.x86.tdphf8ps.internal 33*1b63f47eSFeng Zou //CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) 34*1b63f47eSFeng Zou __tile_dphf8ps(&dst, src1, src2); 35*1b63f47eSFeng Zou } 36*1b63f47eSFeng Zou 37