1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,CHECK-C
4 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,CHECK-CXX
5 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -O1 -Werror -o /dev/null %s
9 // CHECK-C-LABEL: @test_svstr_vnum_za(
10 // CHECK-CXX-LABEL: @_Z18test_svstr_vnum_zajPv(
12 // CHECK-NEXT: tail call void @llvm.aarch64.sme.str(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]], i32 0)
13 // CHECK-NEXT: ret void
15 void test_svstr_vnum_za(uint32_t slice_base
, void *ptr
) __arm_in("za") {
16 svstr_vnum_za(slice_base
, ptr
, 0);
19 // CHECK-C-LABEL: @test_svstr_vnum_za_1(
20 // CHECK-CXX-LABEL: @_Z20test_svstr_vnum_za_1jPv(
22 // CHECK-NEXT: tail call void @llvm.aarch64.sme.str(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]], i32 15)
23 // CHECK-NEXT: ret void
25 void test_svstr_vnum_za_1(uint32_t slice_base
, void *ptr
) __arm_in("za") {
26 svstr_vnum_za(slice_base
, ptr
, 15);
29 // CHECK-C-LABEL: @test_svstr_za(
30 // CHECK-CXX-LABEL: @_Z13test_svstr_zajPv(
32 // CHECK-NEXT: tail call void @llvm.aarch64.sme.str(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]], i32 0)
33 // CHECK-NEXT: ret void
35 void test_svstr_za(uint32_t slice_base
, void *ptr
) __arm_in("za") {
36 svstr_za(slice_base
, ptr
);
39 // CHECK-C-LABEL: @test_svstr_vnum_za_var(
40 // CHECK-CXX-LABEL: @_Z22test_svstr_vnum_za_varjPvl(
42 // CHECK-NEXT: [[TMP0:%.*]] = trunc i64 [[VNUM:%.*]] to i32
43 // CHECK-NEXT: tail call void @llvm.aarch64.sme.str(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]], i32 [[TMP0:%.*]])
44 // CHECK-NEXT: ret void
46 void test_svstr_vnum_za_var(uint32_t slice_base
, void *ptr
, int64_t vnum
) __arm_in("za") {
47 svstr_vnum_za(slice_base
, ptr
, vnum
);
50 // CHECK-C-LABEL: @test_svstr_vnum_za_2(
51 // CHECK-CXX-LABEL: @_Z20test_svstr_vnum_za_2jPv(
53 // CHECK-NEXT: tail call void @llvm.aarch64.sme.str(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]], i32 16)
54 // CHECK-NEXT: ret void
56 void test_svstr_vnum_za_2(uint32_t slice_base
, void *ptr
) __arm_in("za") {
57 svstr_vnum_za(slice_base
, ptr
, 16);