Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clang/include/clang/Basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ clang_tablegen(arm_mve_builtin_aliases.inc -gen-arm-mve-builtin-aliases
clang_tablegen(arm_sve_builtins.inc -gen-arm-sve-builtins
SOURCE arm_sve.td
TARGET ClangARMSveBuiltins)
clang_tablegen(arm_sve_builtins.json -gen-arm-sve-builtins-json
SOURCE arm_sve.td
TARGET ClangARMSveBuiltinsJSON)
clang_tablegen(arm_sve_builtin_cg.inc -gen-arm-sve-builtin-codegen
SOURCE arm_sve.td
TARGET ClangARMSveBuiltinCG)
Expand All @@ -174,6 +177,9 @@ clang_tablegen(arm_sve_streaming_attrs.inc -gen-arm-sve-streaming-attrs
clang_tablegen(arm_sme_builtins.inc -gen-arm-sme-builtins
SOURCE arm_sme.td
TARGET ClangARMSmeBuiltins)
clang_tablegen(arm_sme_builtins.json -gen-arm-sme-builtins-json
SOURCE arm_sme.td
TARGET ClangARMSmeBuiltinsJSON)
clang_tablegen(arm_sme_builtin_cg.inc -gen-arm-sme-builtin-codegen
SOURCE arm_sme.td
TARGET ClangARMSmeBuiltinCG)
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Sema/SemaARM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,8 @@ static bool checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall,
bool SatisfiesSME = Builtin::evaluateRequiredTargetFeatures(
StreamingBuiltinGuard, CallerFeatures);

if ((SatisfiesSVE && SatisfiesSME) ||
(SatisfiesSVE && FnType == SemaARM::ArmStreamingCompatible))
if (SatisfiesSVE && SatisfiesSME)
// Function type is irrelevant for streaming-agnostic builtins.
return false;
else if (SatisfiesSVE)
BuiltinType = SemaARM::ArmNonStreaming;
Expand Down
11 changes: 5 additions & 6 deletions clang/test/CodeGen/AArch64/sve2-intrinsics/acle_sve2_rax1.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +sme2 -target-feature +sme2p1 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sme2p1 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +sme2p1 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK

// REQUIRES: aarch64-registered-target

Expand Down
48 changes: 48 additions & 0 deletions clang/test/Sema/AArch64/arm_sme_streaming_compatible_sme.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// NOTE: File has been autogenerated by utils/aarch64_builtins_test_generator.py
// RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-none-linux-gnu -target-feature +sme -verify
// expected-no-diagnostics

// REQUIRES: aarch64-registered-target

#include <arm_sme.h>

// Properties: guard="" streaming_guard="sme" flags="streaming-compatible,requires-za"

void test(void) __arm_inout("za"){
int64_t int64_t_val;
uint32_t uint32_t_val;
void * void_ptr_val;

svldr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val);
svldr_za(uint32_t_val, void_ptr_val);
svstr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val);
svstr_za(uint32_t_val, void_ptr_val);
svzero_mask_za(2);
svzero_za();
}

void test_streaming(void) __arm_streaming __arm_inout("za"){
int64_t int64_t_val;
uint32_t uint32_t_val;
void * void_ptr_val;

svldr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val);
svldr_za(uint32_t_val, void_ptr_val);
svstr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val);
svstr_za(uint32_t_val, void_ptr_val);
svzero_mask_za(2);
svzero_za();
}

void test_streaming_compatible(void) __arm_streaming_compatible __arm_inout("za"){
int64_t int64_t_val;
uint32_t uint32_t_val;
void * void_ptr_val;

svldr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val);
svldr_za(uint32_t_val, void_ptr_val);
svstr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val);
svstr_za(uint32_t_val, void_ptr_val);
svzero_mask_za(2);
svzero_za();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// NOTE: File has been autogenerated by utils/aarch64_builtins_test_generator.py
// RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -verify
// expected-no-diagnostics

// REQUIRES: aarch64-registered-target

#include <arm_sme.h>

// Properties: guard="" streaming_guard="sme,sme2" flags="streaming-compatible,requires-zt"

void test(void) __arm_inout("zt0"){
void * void_ptr_val;

svldr_zt(0, void_ptr_val);
svstr_zt(0, void_ptr_val);
svzero_zt(0);
}

void test_streaming(void) __arm_streaming __arm_inout("zt0"){
void * void_ptr_val;

svldr_zt(0, void_ptr_val);
svstr_zt(0, void_ptr_val);
svzero_zt(0);
}

void test_streaming_compatible(void) __arm_streaming_compatible __arm_inout("zt0"){
void * void_ptr_val;

svldr_zt(0, void_ptr_val);
svstr_zt(0, void_ptr_val);
svzero_zt(0);
}
Loading