[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / X86 / amx_errors.c
blob7e326b6f39f2946f9d43a3d5a6c87ccd4187f9d8
1 // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +amx-tile \
2 // RUN: -target-feature +amx-int8 -target-feature +amx-bf16 -target-feature +amx-fp16 -fsyntax-only -verify
4 #include <immintrin.h>
6 void test_amx(void *data) {
7 _tile_zero(16); // expected-error {{argument value 16 is outside the valid range [0, 7]}}
8 _tile_loadd(19, data, 16); // expected-error {{argument value 19 is outside the valid range [0, 7]}}
9 _tile_stream_loadd(23, data, 1); // expected-error {{argument value 23 is outside the valid range [0, 7]}}
10 _tile_stored(88, data, 1); // expected-error {{argument value 88 is outside the valid range [0, 7]}}
11 _tile_dpbssd(16, 2, 3); // expected-error {{argument value 16 is outside the valid range [0, 7]}}
12 _tile_dpbssd(0, 16, 3); // expected-error {{argument value 16 is outside the valid range [0, 7]}}
13 _tile_dpbuud(0, 2, 16); // expected-error {{argument value 16 is outside the valid range [0, 7]}}
14 _tile_dpbsud(1, 1, 3); // expected-error {{tile arguments must refer to different tiles}}
15 _tile_dpbsud(7, 1, 7); // expected-error {{tile arguments must refer to different tiles}}
16 _tile_dpbsud(4, 3, 3); // expected-error {{tile arguments must refer to different tiles}}
17 _tile_dpbf16ps(4, 3, 3); // expected-error {{tile arguments must refer to different tiles}}
18 _tile_dpfp16ps(1, 1, 3); // expected-error {{tile arguments must refer to different tiles}}
19 _tile_dpfp16ps(1, 2, 1); // expected-error {{tile arguments must refer to different tiles}}
20 _tile_dpfp16ps(1, 2, 2); // expected-error {{tile arguments must refer to different tiles}}