| 1 |
// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown \ |
| 2 |
// RUN: -target-feature +amx-movrs -target-feature +avx512f \ |
| 3 |
// RUN: -emit-llvm -o - -Wall -Werror -pedantic \ |
| 4 |
// RUN: -Wno-gnu-statement-expression| FileCheck %s |
| 5 |
|
| 6 |
#include <immintrin.h> |
| 7 |
#include <stddef.h> |
| 8 |
|
| 9 |
#define STRIDE 32 |
| 10 |
|
| 11 |
char buf[1024]; |
| 12 |
|
| 13 |
void test_tile_loadd(short row, short col) { |
| 14 |
// CHECK-LABEL: define dso_local void @test_tile_loadd( |
| 15 |
// CHECK: call x86_amx @llvm.x86.tileloaddrs64.internal(i16 %{{.*}}, i16 %{{.*}}, ptr %{{.*}}, i64 %{{.*}}) |
| 16 |
// CHECK-NEXT: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx %{{.*}}) |
| 17 |
_tile_loaddrs_internal(row, col, buf, STRIDE); |
| 18 |
} |
| 19 |
|
| 20 |
void test_tile_loaddt1(short row, short col) { |
| 21 |
// CHECK-LABEL: define dso_local void @test_tile_loaddt1( |
| 22 |
// CHECK: call x86_amx @llvm.x86.tileloaddrst164.internal(i16 %{{.*}}, i16 %{{.*}}, ptr %{{.*}}, i64 %{{.*}}) |
| 23 |
// CHECK-NEXT: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx %{{.*}}) |
| 24 |
_tile_loaddrst1_internal(row, col, buf, STRIDE); |
| 25 |
} |