38 lines · c
1// RUN: %clang_cc1 %s -flax-vector-conversions=none -ffreestanding -triple=x86_64-unknown-unknown -target-feature +amx-tile \2// RUN: -emit-llvm -o - -Werror -pedantic | FileCheck %s --check-prefixes=CHECK3 4#include <immintrin.h>5 6char buf[1024];7#define STRIDE 328 9void test_tile_loadd(short row, short col) {10 //CHECK-LABEL: @test_tile_loadd11 //CHECK-DAG: call x86_amx @llvm.x86.tileloadd64.internal12 //CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}})13 __tile1024i a = {row, col};14 __tile_loadd(&a, buf, STRIDE);15}16 17void test_tile_stream_loadd(short row, short col) {18 //CHECK-LABEL: @test_tile_stream_loadd19 //CHECK-DAG: call x86_amx @llvm.x86.tileloaddt164.internal20 //CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}})21 __tile1024i a = {row, col};22 __tile_stream_loadd(&a, buf, STRIDE);23}24 25void test_tile_stored(__tile1024i c) {26 //CHECK-LABEL: @test_tile_stored27 //CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}})28 //CHECK-DAG: call void @llvm.x86.tilestored64.internal29 __tile_stored(buf, STRIDE, c);30}31 32void test_tile_zero(__tile1024i c) {33 //CHECK-LABEL: @test_tile_zero34 //CHECK-DAG: call x86_amx @llvm.x86.tilezero.internal35 //CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}})36 __tile_zero(&c);37}38