diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp index d13e28999a05ca6..c608ff40c6d9c3b 100644 --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #define DEBUG_TYPE "bolt" diff --git a/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp b/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp index fafb029e7de1b41..04ca0061435030a 100644 --- a/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp +++ b/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp @@ -9,6 +9,7 @@ #include "RedundantStrcatCallsCheck.h" #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchFinder.h" +#include using namespace clang::ast_matchers; diff --git a/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp index a64c9b2905ca187..01276af6c7d8f19 100644 --- a/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp @@ -12,6 +12,7 @@ #include "clang/Lex/MacroArgs.h" #include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Preprocessor.h" +#include namespace clang::tidy::bugprone { diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp index 5bec7966a9c3a9d..85c80eb482efbf3 100644 --- a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp +++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/clang-tools-extra/clangd/Selection.h b/clang-tools-extra/clangd/Selection.h index f80ee83c4b94c86..cb40c6d403487f4 100644 --- a/clang-tools-extra/clangd/Selection.h +++ b/clang-tools-extra/clangd/Selection.h @@ -45,6 +45,7 @@ #include "clang/AST/PrettyPrinter.h" #include "clang/Tooling/Syntax/Tokens.h" #include "llvm/ADT/SmallVector.h" +#include namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/unittests/ASTTests.cpp b/clang-tools-extra/clangd/unittests/ASTTests.cpp index 3101bf34acd717c..32c8e8a63a215aa 100644 --- a/clang-tools-extra/clangd/unittests/ASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/ASTTests.cpp @@ -80,7 +80,7 @@ TEST(GetDeducedType, KwAutoKwDecltypeExpansion) { namespace std { template - class [[initializer_list]] {}; + class [[initializer_list]] { const _E *a, *b; }; } ^auto i = {1,2}; diff --git a/clang-tools-extra/clangd/unittests/HoverTests.cpp b/clang-tools-extra/clangd/unittests/HoverTests.cpp index d9e97e5215a2612..8d6d4223d72600f 100644 --- a/clang-tools-extra/clangd/unittests/HoverTests.cpp +++ b/clang-tools-extra/clangd/unittests/HoverTests.cpp @@ -2284,7 +2284,7 @@ TEST(Hover, All) { namespace std { template - class initializer_list {}; + class initializer_list { const _E *a, *b; }; } void foo() { ^[[auto]] i = {1,2}; diff --git a/clang-tools-extra/clangd/unittests/InlayHintTests.cpp b/clang-tools-extra/clangd/unittests/InlayHintTests.cpp index 5b1531eb2fa60bc..a5a349e93037ada 100644 --- a/clang-tools-extra/clangd/unittests/InlayHintTests.cpp +++ b/clang-tools-extra/clangd/unittests/InlayHintTests.cpp @@ -945,7 +945,7 @@ TEST(ParameterHints, ConstructorStdInitList) { // Do not show hints for std::initializer_list constructors. assertParameterHints(R"cpp( namespace std { - template class initializer_list {}; + template class initializer_list { const E *a, *b; }; } struct S { S(std::initializer_list param); diff --git a/clang-tools-extra/clangd/unittests/XRefsTests.cpp b/clang-tools-extra/clangd/unittests/XRefsTests.cpp index cbceb9a343f87ca..d393c72974d4470 100644 --- a/clang-tools-extra/clangd/unittests/XRefsTests.cpp +++ b/clang-tools-extra/clangd/unittests/XRefsTests.cpp @@ -771,7 +771,7 @@ TEST(LocateSymbol, All) { namespace std { template - class [[initializer_list]] {}; + class [[initializer_list]] { const _E *a, *b; }; } ^auto i = {1,2}; diff --git a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp index dac3f39e1a65842..282abce3246ca3d 100644 --- a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp +++ b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp @@ -534,7 +534,7 @@ TEST(WalkAST, Enums) { TEST(WalkAST, InitializerList) { testWalk(R"cpp( namespace std { - template struct $implicit^initializer_list {}; + template struct $implicit^initializer_list { const T *a, *b; }; })cpp", R"cpp( const char* s = ""; diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/min-max-use-initializer-list.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/min-max-use-initializer-list.cpp index 1f2dad2b933ca70..c7632fe007a4f43 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/modernize/min-max-use-initializer-list.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/min-max-use-initializer-list.cpp @@ -11,6 +11,7 @@ T max(T a, T b) { namespace std { template< class T > struct initializer_list { + const T *a, *b; initializer_list()=default; initializer_list(T*,int){} const T* begin() const {return nullptr;} diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp index 2004993ebde51fb..150e3ac6494e337 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp @@ -4,10 +4,11 @@ // RUN: true}}" namespace std { -template +template class initializer_list { public: + const E *a, *b; initializer_list() noexcept {} }; diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp index f7b1ad55f5df51e..3f4a14cd9bb644f 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp @@ -8,9 +8,10 @@ // RUN: '::std::make_pair; ::std::make_tuple; ::test::MakeSingle'}}" namespace std { -template +template class initializer_list { public: + const E *a, *b; initializer_list() noexcept {} }; diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp index 35091eb77c4c562..e1e25d76d490986 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp @@ -5,7 +5,7 @@ namespace std { -typedef int size_t; +typedef decltype(sizeof 0) size_t; template class initializer_list { public: @@ -15,6 +15,8 @@ template class initializer_list { using size_type = size_t; using iterator = const E*; using const_iterator = const E*; + iterator p; + size_t sz; initializer_list(); size_t size() const; // number of elements const E* begin() const; // first element diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp index f42f2f37155af93..b50ad4ce258397c 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp @@ -31,7 +31,7 @@ struct SomeClass { namespace std { template -class initializer_list {}; +class initializer_list { const T *a, *b; }; template class vector { diff --git a/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp b/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp index 1d85607e86b7fff..7c2a231101070d7 100644 --- a/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp +++ b/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp @@ -31,6 +31,15 @@ X // CHECK: MacroNameTok: __STDC_UTF_32__ // CHECK-NEXT: MacroDirective: MD_Define // CHECK: - Callback: MacroDefined +// CHECK-NEXT: MacroNameTok: __STDC_EMBED_NOT_FOUND__ +// CHECK-NEXT: MacroDirective: MD_Define +// CHECK: - Callback: MacroDefined +// CHECK-NEXT: MacroNameTok: __STDC_EMBED_FOUND__ +// CHECK-NEXT: MacroDirective: MD_Define +// CHECK: - Callback: MacroDefined +// CHECK-NEXT: MacroNameTok: __STDC_EMBED_EMPTY__ +// CHECK-NEXT: MacroDirective: MD_Define +// CHECK: - Callback: MacroDefined // CHECK: - Callback: MacroDefined // CHECK-NEXT: MacroNameTok: MACRO // CHECK-NEXT: MacroDirective: MD_Define diff --git a/clang/docs/BoundsSafety.rst b/clang/docs/BoundsSafety.rst index f1837675ec9bf88..8fd655663edb00c 100644 --- a/clang/docs/BoundsSafety.rst +++ b/clang/docs/BoundsSafety.rst @@ -8,6 +8,9 @@ Overview ======== +**NOTE:** This is a design document and the feature is not available for users yet. +Please see :doc:`BoundsSafetyImplPlans` for more details. + ``-fbounds-safety`` is a C extension to enforce bounds safety to prevent out-of-bounds (OOB) memory accesses, which remain a major source of security vulnerabilities in C. ``-fbounds-safety`` aims to eliminate this class of bugs @@ -55,9 +58,7 @@ adopt, offering these properties that make it widely adoptable in practice: * It has a relatively low adoption cost. This document discusses the key designs of ``-fbounds-safety``. The document is -subject to be actively updated with a more detailed specification. The -implementation plan can be found in :doc:`BoundsSafetyImplPlans`. - +subject to be actively updated with a more detailed specification. Programming Model ================= diff --git a/clang/docs/BoundsSafetyImplPlans.rst b/clang/docs/BoundsSafetyImplPlans.rst index 4fbf87f96635079..93c2ed7b4340295 100644 --- a/clang/docs/BoundsSafetyImplPlans.rst +++ b/clang/docs/BoundsSafetyImplPlans.rst @@ -5,8 +5,31 @@ Implementation plans for ``-fbounds-safety`` .. contents:: :local: +Gradual updates with experimental flag +====================================== + +The feature will be implemented as a series of smaller PRs and we will guard our +implementation with an experimental flag ``-fexperimental-bounds-safety`` until +the usable model is fully available. Once the model is ready for use, we will +expose the flag ``-fbounds-safety``. + +Possible patch sets +------------------- + +* External bounds annotations and the (late) parsing logic. +* Internal bounds annotations (wide pointers) and their parsing logic. +* Clang code generation for wide pointers with debug information. +* Pointer cast semantics involving bounds annotations (this could be divided + into multiple sub-PRs). +* CFG analysis for pairs of related pointer and count assignments and the likes. +* Bounds check expressions in AST and the Clang code generation (this could also + be divided into multiple sub-PRs). + +Proposed implementation +======================= + External bounds annotations -=========================== +--------------------------- The bounds annotations are C type attributes appertaining to pointer types. If an attribute is added to the position of a declaration attribute, e.g., ``int @@ -14,7 +37,7 @@ an attribute is added to the position of a declaration attribute, e.g., ``int type of the declaration (``int *``). New sugar types -=============== +--------------- An external bounds annotation creates a type sugar of the underlying pointer types. We will introduce a new sugar type, ``DynamicBoundsPointerType`` to @@ -29,7 +52,7 @@ overloading. However, this design requires a separate logic to walk through the entire type hierarchy to check type compatibility of bounds annotations. Late parsing for C -================== +------------------ A bounds annotation such as ``__counted_by(count)`` can be added to type of a struct field declaration where count is another field of the same struct @@ -43,7 +66,7 @@ same logic. This requires introducing late parsing logic for C/C++ type attributes. Internal bounds annotations -=========================== +--------------------------- ``__indexable`` and ``__bidi_indexable`` alter pointer representations to be equivalent to a struct with the pointer and the corresponding bounds fields. @@ -65,7 +88,7 @@ operations returning wide pointers. Alternatively, a new ``TEK`` and an expression emitter dedicated to wide pointers could be introduced. Default bounds annotations -========================== +-------------------------- The model may implicitly add ``__bidi_indexable`` or ``__single`` depending on the context of the declaration that has the pointer type. ``__bidi_indexable`` @@ -79,7 +102,7 @@ This also requires the parser to reset the type of the declaration with the newly created type with the right default attribute. Promotion expression -==================== +-------------------- A new expression will be introduced to represent the conversion from a pointer with an external bounds annotation, such as ``__counted_by``, to @@ -88,7 +111,7 @@ CastExprs because it requires an extra subexpression(s) to provide the bounds information necessary to create a wide pointer. Bounds check expression -======================= +----------------------- Bounds checks are part of semantics defined in the ``-fbounds-safety`` language model. Hence, exposing the bounds checks and other semantic actions in the AST @@ -98,7 +121,7 @@ and has the additional sub-expressions that are necessary to perform the check according to the kind. Paired assignment check -======================= +----------------------- ``-fbounds-safety`` enforces that variables or fields related with the same external bounds annotation (e.g., ``buf`` and ``count`` related with @@ -123,7 +146,7 @@ provides a linear view of statements within each ``CFGBlock`` (Clang ``CFGBlock`` represents a single basic block in a source-level CFG). Bounds check optimizations -========================== +-------------------------- In ``-fbounds-safety``, the Clang frontend emits run-time checks for every memory dereference if the type system or analyses in the frontend couldn’t @@ -229,27 +252,3 @@ solution. ``-fbounds-safety`` is not currently supported in C++, but we believe the general approach would be applicable for future efforts. - -Upstreaming plan -================ - -Gradual updates with experimental flag --------------------------------------- - -The upstreaming will take place as a series of smaller PRs and we will guard our -implementation with an experimental flag ``-fexperimental-bounds-safety`` until -the usable model is fully upstreamed. Once the model is ready for use, we will -expose the flag ``-fbounds-safety``. - -Possible patch sets -------------------- - -* External bounds annotations and the (late) parsing logic. -* Internal bounds annotations (wide pointers) and their parsing logic. -* Clang code generation for wide pointers with debug information. -* Pointer cast semantics involving bounds annotations (this could be divided - into multiple sub-PRs). -* CFG analysis for pairs of related pointer and count assignments and the likes. -* Bounds check expressions in AST and the Clang code generation (this could also - be divided into multiple sub-PRs). - diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index 92e6025c95a8c26..9830b35faae12b5 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -1502,6 +1502,7 @@ Attributes on Structured Bindings __cpp_structured_bindings C+ Designated initializers (N494) C99 C89 Array & element qualification (N2607) C23 C89 Attributes (N2335) C23 C89 +``#embed`` (N3017) C23 C89, C++ ============================================ ================================ ============= ============= Type Trait Primitives @@ -5664,3 +5665,26 @@ Compiling different TUs depending on these flags (including use of ``std::hardware_destructive_interference``) with different compilers, macro definitions, or architecture flags will lead to ODR violations and should be avoided. + +``#embed`` Parameters +===================== + +``clang::offset`` +----------------- +The ``clang::offset`` embed parameter may appear zero or one time in the +embed parameter sequence. Its preprocessor argument clause shall be present and +have the form: + +..code-block: text + + ( constant-expression ) + +and shall be an integer constant expression. The integer constant expression +shall not evaluate to a value less than 0. The token ``defined`` shall not +appear within the constant expression. + +The offset will be used when reading the contents of the embedded resource to +specify the starting offset to begin embedding from. The resources is treated +as being empty if the specified offset is larger than the number of bytes in +the resource. The offset will be applied *before* any ``limit`` parameters are +applied. diff --git a/clang/docs/PointerAuthentication.rst b/clang/docs/PointerAuthentication.rst index 19b3384293aedef..68674f318c84f35 100644 --- a/clang/docs/PointerAuthentication.rst +++ b/clang/docs/PointerAuthentication.rst @@ -328,6 +328,23 @@ be done in a single instruction with an immediate integer. ``pointer`` must have pointer type, and ``integer`` must have integer type. The result has type ``ptrauth_extra_data_t``. +``ptrauth_string_discriminator`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: c + + ptrauth_string_discriminator(string) + +Compute a constant discriminator from the given string. + +``string`` must be a string literal of ``char`` character type. The result has +type ``ptrauth_extra_data_t``. + +The result value is never zero and always within range for both the +``__ptrauth`` qualifier and ``ptrauth_blend_discriminator``. + +This can be used in constant expressions. + ``ptrauth_strip`` ^^^^^^^^^^^^^^^^^ @@ -339,6 +356,25 @@ Given that ``signedPointer`` matches the layout for signed pointers signed with the given key, extract the raw pointer from it. This operation does not trap and cannot fail, even if the pointer is not validly signed. +``ptrauth_sign_constant`` +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: c + + ptrauth_sign_constant(pointer, key, discriminator) + +Return a signed pointer for a constant address in a manner which guarantees +a non-attackable sequence. + +``pointer`` must be a constant expression of pointer type which evaluates to +a non-null pointer. +``key`` must be a constant expression of type ``ptrauth_key``. +``discriminator`` must be a constant expression of pointer or integer type; +if an integer, it will be coerced to ``ptrauth_extra_data_t``. +The result will have the same type as ``pointer``. + +This can be used in constant expressions. + ``ptrauth_sign_unauthenticated`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index d0e5e6765136426..7ac0fa0141b4737 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -95,6 +95,13 @@ ABI Changes in This Version - Fixed Microsoft calling convention when returning classes that have a deleted copy assignment operator. Such a class should be returned indirectly. +- Fixed Microsoft name mangling for auto non-type template arguments of pointer + type for MSVC 1920+. This change resolves incompatibilities with code compiled + by MSVC 1920+ but will introduce incompatibilities with code compiled by + earlier versions of Clang unless such code is built with the compiler option + `-fms-compatibility-version=19.14` to imitate the MSVC 1914 mangling behavior. + + AST Dumping Potentially Breaking Changes ---------------------------------------- @@ -150,6 +157,15 @@ here. Generic improvements to Clang as a whole or to its underlying infrastructure are described first, followed by language-specific sections with improvements to Clang's support for those languages. +- The ``\par`` documentation comment command now supports an optional + argument, which denotes the header of the paragraph started by + an instance of the ``\par`` command comment. The implementation + of the argument handling matches its semantics + `in Doxygen `. + Namely, any text on the same line as the ``\par`` command will become + a header for the paragaph, and if there is no text then the command + will start a new paragraph. + C++ Language Changes -------------------- - C++17 support is now completed, with the enablement of the @@ -271,6 +287,9 @@ Resolutions to C++ Defect Reports - P0522 implementation is enabled by default in all language versions, and provisional wording for CWG2398 is implemented. +- Clang now performs type-only lookup for the name in ``using enum`` declaration. + (`CWG2877: Type-only lookup for using-enum-declarator `_). + - Clang now requires a template argument list after a template keyword. (`CWG96: Syntactic disambiguation using the template keyword `_). @@ -589,6 +608,10 @@ Improvements to Clang's diagnostics - Clang no longer emits a "declared here" note for a builtin function that has no declaration in source. Fixes #GH93369. +- Clang now diagnoses unsupported class declarations for ``std::initializer_list`` when they are + used rather than when they are needed for constant evaluation or when code is generated for them. + The check is now stricter to prevent crashes for some unsupported declarations (Fixes #GH95495). + Improvements to Clang's time-trace ---------------------------------- @@ -889,7 +912,8 @@ Bug Fixes to C++ Support between the addresses of two labels (a GNU extension) to a pointer within a constant expression. (#GH95366). - Fix immediate escalation bugs in the presence of dependent call arguments. (#GH94935) - Clang now diagnoses explicit specializations with storage class specifiers in all contexts. - +- Fix an assertion failure caused by parsing a lambda used as a default argument for the value of a + forward-declared class. (#GH93512). Bug Fixes to AST Handling ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1022,10 +1046,10 @@ AIX Support WebAssembly Support ^^^^^^^^^^^^^^^^^^^ -The -mcpu=generic configuration now enables multivalue feature, which is -standardized and available in all major engines. Enabling multivalue here only -enables the language feature but does not turn on the multivalue ABI (this -enables non-ABI uses of multivalue, like exnref). +The -mcpu=generic configuration now enables multivalue and reference-types. +These proposals are standardized and available in all major engines. Enabling +multivalue here only enables the language feature but does not turn on the +multivalue ABI (this enables non-ABI uses of multivalue, like exnref). AVR Support ^^^^^^^^^^^ diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst index d76ee241da797e2..b8d5f372bdf619d 100644 --- a/clang/docs/analyzer/checkers.rst +++ b/clang/docs/analyzer/checkers.rst @@ -416,6 +416,25 @@ around, such as ``std::string_view``. // note: inner buffer of 'std::string' deallocated by call to destructor } +.. _cplusplus-Move: + +cplusplus.Move (C++) +"""""""""""""""""""" +Method calls on a moved-from object and copying a moved-from object will be reported. + + +.. code-block:: cpp + + struct A { + void foo() {} + }; + + void f() { + A a; + A b = std::move(a); // note: 'a' became 'moved-from' here + a.foo(); // warn: method call on a 'moved-from' object 'a' + } + .. _cplusplus-NewDelete: cplusplus.NewDelete (C++) @@ -2584,25 +2603,6 @@ Check for use of iterators of different containers where iterators of the same c // expected } -.. _alpha-cplusplus-MisusedMovedObject: - -alpha.cplusplus.MisusedMovedObject (C++) -"""""""""""""""""""""""""""""""""""""""" -Method calls on a moved-from object and copying a moved-from object will be reported. - - -.. code-block:: cpp - - struct A { - void foo() {} - }; - - void f() { - A a; - A b = std::move(a); // note: 'a' became 'moved-from' here - a.foo(); // warn: method call on a 'moved-from' object 'a' - } - .. _alpha-cplusplus-SmartPtr: alpha.cplusplus.SmartPtr (C++) diff --git a/clang/include/clang/AST/CommentCommandTraits.h b/clang/include/clang/AST/CommentCommandTraits.h index 0c3254d84eb0004..78c484fff3aedee 100644 --- a/clang/include/clang/AST/CommentCommandTraits.h +++ b/clang/include/clang/AST/CommentCommandTraits.h @@ -88,6 +88,10 @@ struct CommandInfo { LLVM_PREFERRED_TYPE(bool) unsigned IsHeaderfileCommand : 1; + /// True if this is a \\par command. + LLVM_PREFERRED_TYPE(bool) + unsigned IsParCommand : 1; + /// True if we don't want to warn about this command being passed an empty /// paragraph. Meaningful only for block commands. LLVM_PREFERRED_TYPE(bool) diff --git a/clang/include/clang/AST/CommentCommands.td b/clang/include/clang/AST/CommentCommands.td index 06b2fa9b5531c6b..a410cd4039bee1e 100644 --- a/clang/include/clang/AST/CommentCommands.td +++ b/clang/include/clang/AST/CommentCommands.td @@ -18,6 +18,7 @@ class Command { bit IsThrowsCommand = 0; bit IsDeprecatedCommand = 0; bit IsHeaderfileCommand = 0; + bit IsParCommand = 0; bit IsEmptyParagraphAllowed = 0; @@ -156,7 +157,7 @@ def Date : BlockCommand<"date">; def Invariant : BlockCommand<"invariant">; def Li : BlockCommand<"li">; def Note : BlockCommand<"note">; -def Par : BlockCommand<"par">; +def Par : BlockCommand<"par"> { let IsParCommand = 1; let NumArgs = 1; } def Post : BlockCommand<"post">; def Pre : BlockCommand<"pre">; def Remark : BlockCommand<"remark">; diff --git a/clang/include/clang/AST/CommentParser.h b/clang/include/clang/AST/CommentParser.h index a2d0e30835e2c45..289f0b2c066b925 100644 --- a/clang/include/clang/AST/CommentParser.h +++ b/clang/include/clang/AST/CommentParser.h @@ -105,6 +105,9 @@ class Parser { ArrayRef parseThrowCommandArgs(TextTokenRetokenizer &Retokenizer, unsigned NumArgs); + ArrayRef + parseParCommandArgs(TextTokenRetokenizer &Retokenizer, unsigned NumArgs); + BlockCommandComment *parseBlockCommand(); InlineCommandComment *parseInlineCommand(); @@ -123,4 +126,3 @@ class Parser { } // end namespace clang #endif - diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index f2bf667636dc9b5..3bc8cae4d8c86c3 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -4799,6 +4799,164 @@ class SourceLocExpr final : public Expr { friend class ASTStmtReader; }; +/// Stores data related to a single #embed directive. +struct EmbedDataStorage { + StringLiteral *BinaryData; + size_t getDataElementCount() const { return BinaryData->getByteLength(); } +}; + +/// Represents a reference to #emded data. By default, this references the whole +/// range. Otherwise it represents a subrange of data imported by #embed +/// directive. Needed to handle nested initializer lists with #embed directives. +/// Example: +/// struct S { +/// int x, y; +/// }; +/// +/// struct T { +/// int x[2]; +/// struct S s +/// }; +/// +/// struct T t[] = { +/// #embed "data" // data contains 10 elements; +/// }; +/// +/// The resulting semantic form of initializer list will contain (EE stands +/// for EmbedExpr): +/// { {EE(first two data elements), {EE(3rd element), EE(4th element) }}, +/// { {EE(5th and 6th element), {EE(7th element), EE(8th element) }}, +/// { {EE(9th and 10th element), { zeroinitializer }}} +/// +/// EmbedExpr inside of a semantic initializer list and referencing more than +/// one element can only appear for arrays of scalars. +class EmbedExpr final : public Expr { + SourceLocation EmbedKeywordLoc; + IntegerLiteral *FakeChildNode = nullptr; + const ASTContext *Ctx = nullptr; + EmbedDataStorage *Data; + unsigned Begin = 0; + unsigned NumOfElements; + +public: + EmbedExpr(const ASTContext &Ctx, SourceLocation Loc, EmbedDataStorage *Data, + unsigned Begin, unsigned NumOfElements); + explicit EmbedExpr(EmptyShell Empty) : Expr(SourceLocExprClass, Empty) {} + + SourceLocation getLocation() const { return EmbedKeywordLoc; } + SourceLocation getBeginLoc() const { return EmbedKeywordLoc; } + SourceLocation getEndLoc() const { return EmbedKeywordLoc; } + + StringLiteral *getDataStringLiteral() const { return Data->BinaryData; } + EmbedDataStorage *getData() const { return Data; } + + unsigned getStartingElementPos() const { return Begin; } + size_t getDataElementCount() const { return NumOfElements; } + + // Allows accessing every byte of EmbedExpr data and iterating over it. + // An Iterator knows the EmbedExpr that it refers to, and an offset value + // within the data. + // Dereferencing an Iterator results in construction of IntegerLiteral AST + // node filled with byte of data of the corresponding EmbedExpr within offset + // that the Iterator currently has. + template + class ChildElementIter + : public llvm::iterator_facade_base< + ChildElementIter, std::random_access_iterator_tag, + std::conditional_t> { + friend class EmbedExpr; + + EmbedExpr *EExpr = nullptr; + unsigned long long CurOffset = ULLONG_MAX; + using BaseTy = typename ChildElementIter::iterator_facade_base; + + ChildElementIter(EmbedExpr *E) : EExpr(E) { + if (E) + CurOffset = E->getStartingElementPos(); + } + + public: + ChildElementIter() : CurOffset(ULLONG_MAX) {} + typename BaseTy::reference operator*() const { + assert(EExpr && CurOffset != ULLONG_MAX && + "trying to dereference an invalid iterator"); + IntegerLiteral *N = EExpr->FakeChildNode; + StringRef DataRef = EExpr->Data->BinaryData->getBytes(); + N->setValue(*EExpr->Ctx, + llvm::APInt(N->getValue().getBitWidth(), DataRef[CurOffset], + N->getType()->isSignedIntegerType())); + // We want to return a reference to the fake child node in the + // EmbedExpr, not the local variable N. + return const_cast(EExpr->FakeChildNode); + } + typename BaseTy::pointer operator->() const { return **this; } + using BaseTy::operator++; + ChildElementIter &operator++() { + assert(EExpr && "trying to increment an invalid iterator"); + assert(CurOffset != ULLONG_MAX && + "Already at the end of what we can iterate over"); + if (++CurOffset >= + EExpr->getDataElementCount() + EExpr->getStartingElementPos()) { + CurOffset = ULLONG_MAX; + EExpr = nullptr; + } + return *this; + } + bool operator==(ChildElementIter Other) const { + return (EExpr == Other.EExpr && CurOffset == Other.CurOffset); + } + }; // class ChildElementIter + +public: + using fake_child_range = llvm::iterator_range>; + using const_fake_child_range = llvm::iterator_range>; + + fake_child_range underlying_data_elements() { + return fake_child_range(ChildElementIter(this), + ChildElementIter()); + } + + const_fake_child_range underlying_data_elements() const { + return const_fake_child_range( + ChildElementIter(const_cast(this)), + ChildElementIter()); + } + + child_range children() { + return child_range(child_iterator(), child_iterator()); + } + + const_child_range children() const { + return const_child_range(const_child_iterator(), const_child_iterator()); + } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == EmbedExprClass; + } + + ChildElementIter begin() { return ChildElementIter(this); } + + ChildElementIter begin() const { + return ChildElementIter(const_cast(this)); + } + + template + bool doForEachDataElement(Call &&C, unsigned &StartingIndexInArray, + Targs &&...Fargs) const { + for (auto It : underlying_data_elements()) { + if (!std::invoke(std::forward(C), const_cast(It), + StartingIndexInArray, std::forward(Fargs)...)) + return false; + StartingIndexInArray++; + } + return true; + } + +private: + friend class ASTStmtReader; +}; + /// Describes an C or C++ initializer list. /// /// InitListExpr describes an initializer list, which can be used to diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h index aa55e2e7e87188d..2785afd59bf2163 100644 --- a/clang/include/clang/AST/RecursiveASTVisitor.h +++ b/clang/include/clang/AST/RecursiveASTVisitor.h @@ -2864,6 +2864,11 @@ DEF_TRAVERSE_STMT(ShuffleVectorExpr, {}) DEF_TRAVERSE_STMT(ConvertVectorExpr, {}) DEF_TRAVERSE_STMT(StmtExpr, {}) DEF_TRAVERSE_STMT(SourceLocExpr, {}) +DEF_TRAVERSE_STMT(EmbedExpr, { + for (IntegerLiteral *IL : S->underlying_data_elements()) { + TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(IL); + } +}) DEF_TRAVERSE_STMT(UnresolvedLookupExpr, { TRY_TO(TraverseNestedNameSpecifierLoc(S->getQualifierLoc())); diff --git a/clang/include/clang/AST/TextNodeDumper.h b/clang/include/clang/AST/TextNodeDumper.h index abfafcaef271b6c..39dd1f515c9eb38 100644 --- a/clang/include/clang/AST/TextNodeDumper.h +++ b/clang/include/clang/AST/TextNodeDumper.h @@ -409,6 +409,7 @@ class TextNodeDumper void VisitHLSLBufferDecl(const HLSLBufferDecl *D); void VisitOpenACCConstructStmt(const OpenACCConstructStmt *S); void VisitOpenACCLoopConstruct(const OpenACCLoopConstruct *S); + void VisitEmbedExpr(const EmbedExpr *S); }; } // namespace clang diff --git a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h index 763af244547647c..50a70188720613a 100644 --- a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h +++ b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h @@ -178,13 +178,50 @@ template struct DataflowAnalysisState { Environment Env; }; +/// A callback to be called with the state before or after visiting a CFG +/// element. +template +using CFGEltCallback = std::function &)>; + +/// A pair of callbacks to be called with the state before and after visiting a +/// CFG element. +/// Either or both of the callbacks may be null. +template struct CFGEltCallbacks { + CFGEltCallback Before; + CFGEltCallback After; +}; + +/// A callback for performing diagnosis on a CFG element, called with the state +/// before or after visiting that CFG element. Returns a list of diagnostics +/// to emit (if any). +template +using DiagnosisCallback = llvm::function_ref( + const CFGElement &, ASTContext &, + const TransferStateForDiagnostics &)>; + +/// A pair of callbacks for performing diagnosis on a CFG element, called with +/// the state before and after visiting that CFG element. +/// Either or both of the callbacks may be null. +template struct DiagnosisCallbacks { + DiagnosisCallback Before; + DiagnosisCallback After; +}; + +/// Default for the maximum number of SAT solver iterations during analysis. +inline constexpr std::int64_t kDefaultMaxSATIterations = 1'000'000'000; + +/// Default for the maximum number of block visits during analysis. +inline constexpr std::int32_t kDefaultMaxBlockVisits = 20'000; + /// Performs dataflow analysis and returns a mapping from basic block IDs to /// dataflow analysis states that model the respective basic blocks. The /// returned vector, if any, will have the same size as the number of CFG /// blocks, with indices corresponding to basic block IDs. Returns an error if /// the dataflow analysis cannot be performed successfully. Otherwise, calls -/// `PostVisitCFG` on each CFG element with the final analysis results at that -/// program point. +/// `PostAnalysisCallbacks` on each CFG element with the final analysis results +/// before and after that program point. /// /// `MaxBlockVisits` caps the number of block visits during analysis. See /// `runTypeErasedDataflowAnalysis` for a full description. The default value is @@ -194,30 +231,40 @@ template struct DataflowAnalysisState { template llvm::Expected>>> -runDataflowAnalysis( - const AdornedCFG &ACFG, AnalysisT &Analysis, const Environment &InitEnv, - std::function &)> - PostVisitCFG = nullptr, - std::int32_t MaxBlockVisits = 20'000) { - std::function - PostVisitCFGClosure = nullptr; - if (PostVisitCFG) { - PostVisitCFGClosure = [&PostVisitCFG]( - const CFGElement &Element, - const TypeErasedDataflowAnalysisState &State) { - auto *Lattice = - llvm::any_cast(&State.Lattice.Value); - // FIXME: we should not be copying the environment here! - // Ultimately the PostVisitCFG only gets a const reference anyway. - PostVisitCFG(Element, DataflowAnalysisState{ - *Lattice, State.Env.fork()}); - }; +runDataflowAnalysis(const AdornedCFG &ACFG, AnalysisT &Analysis, + const Environment &InitEnv, + CFGEltCallbacks PostAnalysisCallbacks, + std::int32_t MaxBlockVisits = kDefaultMaxBlockVisits) { + CFGEltCallbacksTypeErased TypeErasedCallbacks; + if (PostAnalysisCallbacks.Before) { + TypeErasedCallbacks.Before = + [&PostAnalysisCallbacks](const CFGElement &Element, + const TypeErasedDataflowAnalysisState &State) { + auto *Lattice = + llvm::any_cast(&State.Lattice.Value); + // FIXME: we should not be copying the environment here! + // Ultimately the `CFGEltCallback` only gets a const reference anyway. + PostAnalysisCallbacks.Before( + Element, DataflowAnalysisState{ + *Lattice, State.Env.fork()}); + }; + } + if (PostAnalysisCallbacks.After) { + TypeErasedCallbacks.After = + [&PostAnalysisCallbacks](const CFGElement &Element, + const TypeErasedDataflowAnalysisState &State) { + auto *Lattice = + llvm::any_cast(&State.Lattice.Value); + // FIXME: we should not be copying the environment here! + // Ultimately the `CFGEltCallback` only gets a const reference anyway. + PostAnalysisCallbacks.After( + Element, DataflowAnalysisState{ + *Lattice, State.Env.fork()}); + }; } auto TypeErasedBlockStates = runTypeErasedDataflowAnalysis( - ACFG, Analysis, InitEnv, PostVisitCFGClosure, MaxBlockVisits); + ACFG, Analysis, InitEnv, TypeErasedCallbacks, MaxBlockVisits); if (!TypeErasedBlockStates) return TypeErasedBlockStates.takeError(); @@ -239,6 +286,22 @@ runDataflowAnalysis( return std::move(BlockStates); } +/// Overload that takes only one post-analysis callback, which is run on the +/// state after visiting the `CFGElement`. This is provided for backwards +/// compatibility; new callers should call the overload taking `CFGEltCallbacks` +/// instead. +template +llvm::Expected>>> +runDataflowAnalysis( + const AdornedCFG &ACFG, AnalysisT &Analysis, const Environment &InitEnv, + CFGEltCallback PostAnalysisCallbackAfterElt = nullptr, + std::int32_t MaxBlockVisits = kDefaultMaxBlockVisits) { + return runDataflowAnalysis(ACFG, Analysis, InitEnv, + {nullptr, PostAnalysisCallbackAfterElt}, + MaxBlockVisits); +} + // Create an analysis class that is derived from `DataflowAnalysis`. This is an // SFINAE adapter that allows us to call two different variants of constructor // (either with or without the optional `Environment` parameter). @@ -271,14 +334,11 @@ auto createAnalysis(ASTContext &ASTCtx, Environment &Env) /// `runDataflowAnalysis` for a full description and explanation of the default /// value. template -llvm::Expected> diagnoseFunction( - const FunctionDecl &FuncDecl, ASTContext &ASTCtx, - llvm::function_ref( - const CFGElement &, ASTContext &, - const TransferStateForDiagnostics &)> - Diagnoser, - std::int64_t MaxSATIterations = 1'000'000'000, - std::int32_t MaxBlockVisits = 20'000) { +llvm::Expected> +diagnoseFunction(const FunctionDecl &FuncDecl, ASTContext &ASTCtx, + DiagnosisCallbacks Diagnoser, + std::int64_t MaxSATIterations = kDefaultMaxSATIterations, + std::int32_t MaxBlockVisits = kDefaultMaxBlockVisits) { llvm::Expected Context = AdornedCFG::build(FuncDecl); if (!Context) return Context.takeError(); @@ -288,21 +348,38 @@ llvm::Expected> diagnoseFunction( Environment Env(AnalysisContext, FuncDecl); AnalysisT Analysis = createAnalysis(ASTCtx, Env); llvm::SmallVector Diagnostics; + CFGEltCallbacksTypeErased PostAnalysisCallbacks; + if (Diagnoser.Before) { + PostAnalysisCallbacks.Before = + [&ASTCtx, &Diagnoser, + &Diagnostics](const CFGElement &Elt, + const TypeErasedDataflowAnalysisState &State) mutable { + auto EltDiagnostics = Diagnoser.Before( + Elt, ASTCtx, + TransferStateForDiagnostics( + llvm::any_cast( + State.Lattice.Value), + State.Env)); + llvm::move(EltDiagnostics, std::back_inserter(Diagnostics)); + }; + } + if (Diagnoser.After) { + PostAnalysisCallbacks.After = + [&ASTCtx, &Diagnoser, + &Diagnostics](const CFGElement &Elt, + const TypeErasedDataflowAnalysisState &State) mutable { + auto EltDiagnostics = Diagnoser.After( + Elt, ASTCtx, + TransferStateForDiagnostics( + llvm::any_cast( + State.Lattice.Value), + State.Env)); + llvm::move(EltDiagnostics, std::back_inserter(Diagnostics)); + }; + } if (llvm::Error Err = - runTypeErasedDataflowAnalysis( - *Context, Analysis, Env, - [&ASTCtx, &Diagnoser, &Diagnostics]( - const CFGElement &Elt, - const TypeErasedDataflowAnalysisState &State) mutable { - auto EltDiagnostics = Diagnoser( - Elt, ASTCtx, - TransferStateForDiagnostics( - llvm::any_cast( - State.Lattice.Value), - State.Env)); - llvm::move(EltDiagnostics, std::back_inserter(Diagnostics)); - }, - MaxBlockVisits) + runTypeErasedDataflowAnalysis(*Context, Analysis, Env, + PostAnalysisCallbacks, MaxBlockVisits) .takeError()) return std::move(Err); @@ -313,6 +390,21 @@ llvm::Expected> diagnoseFunction( return Diagnostics; } +/// Overload that takes only one diagnosis callback, which is run on the state +/// after visiting the `CFGElement`. This is provided for backwards +/// compatibility; new callers should call the overload taking +/// `DiagnosisCallbacks` instead. +template +llvm::Expected> +diagnoseFunction(const FunctionDecl &FuncDecl, ASTContext &ASTCtx, + DiagnosisCallback Diagnoser, + std::int64_t MaxSATIterations = kDefaultMaxSATIterations, + std::int32_t MaxBlockVisits = kDefaultMaxBlockVisits) { + DiagnosisCallbacks Callbacks = {nullptr, Diagnoser}; + return diagnoseFunction(FuncDecl, ASTCtx, Callbacks, MaxSATIterations, + MaxBlockVisits); +} + /// Abstract base class for dataflow "models": reusable analysis components that /// model a particular aspect of program semantics in the `Environment`. For /// example, a model may capture a type and its related functions. diff --git a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h index b3722bf3ec80a83..512453e2be67ad1 100644 --- a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h +++ b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h @@ -132,12 +132,25 @@ struct TypeErasedDataflowAnalysisState { } }; +/// A callback to be called with the state before or after visiting a CFG +/// element. +using CFGEltCallbackTypeErased = std::function; + +/// A pair of callbacks to be called with the state before and after visiting a +/// CFG element. +/// Either or both of the callbacks may be null. +struct CFGEltCallbacksTypeErased { + CFGEltCallbackTypeErased Before; + CFGEltCallbackTypeErased After; +}; + /// Performs dataflow analysis and returns a mapping from basic block IDs to /// dataflow analysis states that model the respective basic blocks. Indices of /// the returned vector correspond to basic block IDs. Returns an error if the /// dataflow analysis cannot be performed successfully. Otherwise, calls -/// `PostVisitCFG` on each CFG element with the final analysis results at that -/// program point. +/// `PostAnalysisCallbacks` on each CFG element with the final analysis results +/// before and after that program point. /// /// `MaxBlockVisits` caps the number of block visits during analysis. It doesn't /// distinguish between repeat visits to the same block and visits to distinct @@ -148,9 +161,7 @@ llvm::Expected>> runTypeErasedDataflowAnalysis( const AdornedCFG &ACFG, TypeErasedDataflowAnalysis &Analysis, const Environment &InitEnv, - std::function - PostVisitCFG, + const CFGEltCallbacksTypeErased &PostAnalysisCallbacks, std::int32_t MaxBlockVisits); } // namespace dataflow diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index e801c7fafd89344..c8e2015c8e66ae8 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -287,7 +287,7 @@ class DefaultIntArgument : IntArgument { // possible values, and a list of enumerators to map them to. class EnumArgument values, list enums, bit opt = 0, bit fake = 0, - bit isExternalType = 0> + bit isExternalType = 0, bit isCovered = 1> : Argument { string Type = type; // When true, the argument will be parsed as an unevaluated string literal @@ -296,13 +296,16 @@ class EnumArgument values, list Values = values; list Enums = enums; bit IsExternalType = isExternalType; + // We need to know whether an external enum is fully covered by the options + // in order to decide whether to emit unreachable default labels in a switch. + bit IsCovered = isCovered; } // FIXME: There should be a VariadicArgument type that takes any other type // of argument and generates the appropriate type. class VariadicEnumArgument values, list enums, - bit isExternalType = 0> + bit isExternalType = 0, bit isCovered = 1> : Argument { string Type = type; // When true, the argument will be parsed as an unevaluated string literal @@ -311,6 +314,9 @@ class VariadicEnumArgument Values = values; list Enums = enums; bit IsExternalType = isExternalType; + // We need to know whether an external enum is fully covered by the options + // in order to decide whether to emit unreachable default labels in a switch. + bit IsCovered = isCovered; } // Represents an attribute wrapped by another attribute. @@ -2913,7 +2919,7 @@ def CodeModel : InheritableAttr, TargetSpecificAttr { let Spellings = [GCC<"model">]; let Args = [EnumArgument<"Model", "llvm::CodeModel::Model", /*is_string=*/1, ["normal", "medium", "extreme"], ["Small", "Medium", "Large"], - /*opt=*/0, /*fake=*/0, /*isExternalType=*/1>]; + /*opt=*/0, /*fake=*/0, /*isExternalType=*/1, /*isCovered=*/0>]; let Subjects = SubjectList<[NonTLSGlobalVar], ErrorDiag>; let Documentation = [CodeModelDocs]; } @@ -4472,7 +4478,7 @@ def HLSLShader : InheritableAttr { ["Pixel", "Vertex", "Geometry", "Hull", "Domain", "Compute", "RayGeneration", "Intersection", "AnyHit", "ClosestHit", "Miss", "Callable", "Mesh", "Amplification"], - /*opt=*/0, /*fake=*/0, /*isExternalType=*/1> + /*opt=*/0, /*fake=*/0, /*isExternalType=*/1, /*isCovered=*/0> ]; let Documentation = [HLSLSV_ShaderTypeAttrDocs]; let AdditionalMembers = @@ -4487,30 +4493,31 @@ def HLSLResource : InheritableAttr { let Spellings = []; let Subjects = SubjectList<[Struct]>; let LangOpts = [HLSL]; - let Args = [EnumArgument<"ResourceClass", "llvm::hlsl::ResourceClass", - /*is_string=*/0, - ["SRV", "UAV", "CBuffer", "Sampler"], - ["SRV", "UAV", "CBuffer", "Sampler"], - /*opt=*/0, /*fake=*/0, /*isExternalType=*/1>, - EnumArgument<"ResourceKind", "llvm::hlsl::ResourceKind", - /*is_string=*/0, - ["Texture1D", "Texture2D", "Texture2DMS", - "Texture3D", "TextureCube", "Texture1DArray", - "Texture2DArray", "Texture2DMSArray", - "TextureCubeArray", "TypedBuffer", "RawBuffer", - "StructuredBuffer", "CBuffer", "Sampler", - "TBuffer", "RTAccelerationStructure", - "FeedbackTexture2D", "FeedbackTexture2DArray"], - ["Texture1D", "Texture2D", "Texture2DMS", - "Texture3D", "TextureCube", "Texture1DArray", - "Texture2DArray", "Texture2DMSArray", - "TextureCubeArray", "TypedBuffer", "RawBuffer", - "StructuredBuffer", "CBuffer", "Sampler", - "TBuffer", "RTAccelerationStructure", - "FeedbackTexture2D", "FeedbackTexture2DArray"], - /*opt=*/0, /*fake=*/0, /*isExternalType=*/1>, - DefaultBoolArgument<"isROV", /*default=*/0> - ]; + let Args = [ + EnumArgument<"ResourceClass", "llvm::hlsl::ResourceClass", + /*is_string=*/0, ["SRV", "UAV", "CBuffer", "Sampler"], + ["SRV", "UAV", "CBuffer", "Sampler"], + /*opt=*/0, /*fake=*/0, /*isExternalType=*/1>, + EnumArgument< + "ResourceKind", "llvm::hlsl::ResourceKind", + /*is_string=*/0, + [ + "Texture1D", "Texture2D", "Texture2DMS", "Texture3D", "TextureCube", + "Texture1DArray", "Texture2DArray", "Texture2DMSArray", + "TextureCubeArray", "TypedBuffer", "RawBuffer", "StructuredBuffer", + "CBuffer", "Sampler", "TBuffer", "RTAccelerationStructure", + "FeedbackTexture2D", "FeedbackTexture2DArray" + ], + [ + "Texture1D", "Texture2D", "Texture2DMS", "Texture3D", "TextureCube", + "Texture1DArray", "Texture2DArray", "Texture2DMSArray", + "TextureCubeArray", "TypedBuffer", "RawBuffer", "StructuredBuffer", + "CBuffer", "Sampler", "TBuffer", "RTAccelerationStructure", + "FeedbackTexture2D", "FeedbackTexture2DArray" + ], + /*opt=*/0, /*fake=*/0, /*isExternalType=*/1, /*isCovered=*/0>, + DefaultBoolArgument<"isROV", /*default=*/0> + ]; let Documentation = [InternalOnly]; } diff --git a/clang/include/clang/Basic/Builtins.def b/clang/include/clang/Basic/Builtins.def index f356f881d5ef9bc..d2d500c990b99b8 100644 --- a/clang/include/clang/Basic/Builtins.def +++ b/clang/include/clang/Basic/Builtins.def @@ -33,6 +33,7 @@ // q -> Scalable vector, followed by the number of elements and the base type. // Q -> target builtin type, followed by a character to distinguish the builtin type // Qa -> AArch64 svcount_t builtin type. +// Qb -> AMDGPU __amdgpu_buffer_rsrc_t builtin type. // E -> ext_vector, followed by the number of elements and the base type. // X -> _Complex, followed by the base type. // Y -> ptrdiff_t diff --git a/clang/include/clang/Basic/Builtins.td b/clang/include/clang/Basic/Builtins.td index 7bef5fd7ad40f28..9342b6bc75fc847 100644 --- a/clang/include/clang/Basic/Builtins.td +++ b/clang/include/clang/Basic/Builtins.td @@ -4393,6 +4393,12 @@ def PtrauthSignUnauthenticated : Builtin { let Prototype = "void*(void*,int,void*)"; } +def PtrauthSignConstant : Builtin { + let Spellings = ["__builtin_ptrauth_sign_constant"]; + let Attributes = [CustomTypeChecking, NoThrow, Const, Constexpr]; + let Prototype = "void*(void*,int,void*)"; +} + def PtrauthSignGenericData : Builtin { let Spellings = ["__builtin_ptrauth_sign_generic_data"]; let Attributes = [CustomTypeChecking, NoThrow, Const]; @@ -4411,6 +4417,12 @@ def PtrauthAuth : Builtin { let Prototype = "void*(void*,int,void*)"; } +def PtrauthStringDiscriminator : Builtin { + let Spellings = ["__builtin_ptrauth_string_discriminator"]; + let Attributes = [NoThrow, Const, Constexpr]; + let Prototype = "size_t(char const*)"; +} + // OpenCL v2.0 s6.13.16, s9.17.3.5 - Pipe functions. // We need the generic prototype, since the packet type could be anything. def ReadPipe : OCLPipeLangBuiltin { diff --git a/clang/include/clang/Basic/BuiltinsAMDGPU.def b/clang/include/clang/Basic/BuiltinsAMDGPU.def index 9e6800ea814a0af..a73e63355cfd737 100644 --- a/clang/include/clang/Basic/BuiltinsAMDGPU.def +++ b/clang/include/clang/Basic/BuiltinsAMDGPU.def @@ -148,6 +148,8 @@ BUILTIN(__builtin_amdgcn_qsad_pk_u16_u8, "WUiWUiUiWUi", "nc") BUILTIN(__builtin_amdgcn_mqsad_pk_u16_u8, "WUiWUiUiWUi", "nc") BUILTIN(__builtin_amdgcn_mqsad_u32_u8, "V4UiWUiUiV4Ui", "nc") +BUILTIN(__builtin_amdgcn_make_buffer_rsrc, "Qbv*sii", "nc") + //===----------------------------------------------------------------------===// // Ballot builtins. //===----------------------------------------------------------------------===// diff --git a/clang/include/clang/Basic/CodeGenOptions.h b/clang/include/clang/Basic/CodeGenOptions.h index 00523a84d3895f1..f2a707a8ba8d761 100644 --- a/clang/include/clang/Basic/CodeGenOptions.h +++ b/clang/include/clang/Basic/CodeGenOptions.h @@ -13,6 +13,7 @@ #ifndef LLVM_CLANG_BASIC_CODEGENOPTIONS_H #define LLVM_CLANG_BASIC_CODEGENOPTIONS_H +#include "clang/Basic/PointerAuthOptions.h" #include "clang/Basic/Sanitizers.h" #include "clang/Basic/XRayInstr.h" #include "llvm/ADT/FloatingPointMode.h" @@ -391,6 +392,9 @@ class CodeGenOptions : public CodeGenOptionsBase { std::vector Reciprocals; + /// Configuration for pointer-signing. + PointerAuthOptions PointerAuth; + /// The preferred width for auto-vectorization transforms. This is intended to /// override default transforms based on the width of the architected vector /// registers. diff --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td b/clang/include/clang/Basic/DiagnosticCommonKinds.td index 1e44bc4ad09b6b4..de758cbe679dcff 100644 --- a/clang/include/clang/Basic/DiagnosticCommonKinds.td +++ b/clang/include/clang/Basic/DiagnosticCommonKinds.td @@ -275,6 +275,9 @@ def err_too_large_for_fixed_point : Error< def err_unimplemented_conversion_with_fixed_point_type : Error< "conversion between fixed point and %0 is not yet supported">; +def err_requires_positive_value : Error< + "%select{invalid value '%0'; must be positive|value '%0' is too large}1">; + // SEH def err_seh_expected_handler : Error< "expected '__except' or '__finally' block">; diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td index 25fbfe83fa2bcf9..12d7b8c0205ee98 100644 --- a/clang/include/clang/Basic/DiagnosticLexKinds.td +++ b/clang/include/clang/Basic/DiagnosticLexKinds.td @@ -436,6 +436,14 @@ def warn_cxx23_compat_warning_directive : Warning< def warn_c23_compat_warning_directive : Warning< "#warning is incompatible with C standards before C23">, InGroup, DefaultIgnore; +def ext_pp_embed_directive : ExtWarn< + "#embed is a %select{C23|Clang}0 extension">, + InGroup; +def warn_compat_pp_embed_directive : Warning< + "#embed is incompatible with C standards before C23">, + InGroup, DefaultIgnore; +def err_pp_embed_dup_params : Error< + "cannot specify parameter '%0' twice in the same '#embed' directive">; def ext_pp_extra_tokens_at_eol : ExtWarn< "extra tokens at end of #%0 directive">, InGroup; @@ -505,6 +513,8 @@ def err_pp_invalid_directive : Error< "invalid preprocessing directive%select{|, did you mean '#%1'?}0">; def warn_pp_invalid_directive : Warning< err_pp_invalid_directive.Summary>, InGroup>; +def err_pp_unknown_parameter : Error< + "unknown%select{ | embed}0 preprocessor parameter '%1'">; def err_pp_directive_required : Error< "%0 must be used within a preprocessing directive">; def err_pp_file_not_found : Error<"'%0' file not found">, DefaultFatal; @@ -719,6 +729,8 @@ def err_pp_module_build_missing_end : Error< "no matching '#pragma clang module endbuild' for this '#pragma clang module build'">; def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">; +def err_defined_in_pp_embed : Error< + "'defined' cannot appear within this context">; def err_paste_at_start : Error< "'##' cannot appear at start of macro expansion">; def err_paste_at_end : Error<"'##' cannot appear at end of macro expansion">; diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 14736784cff5fac..25a87078a57093d 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -924,12 +924,21 @@ def err_ptrauth_value_bad_type : Error<"%select{signed value|extra discriminator|blended pointer|blended " "integer}0 must have %select{pointer|integer|pointer or integer}1 " "type; type here is %2">; +def err_ptrauth_bad_constant_pointer : + Error<"argument to ptrauth_sign_constant must refer to a global variable " + "or function">; +def err_ptrauth_bad_constant_discriminator : + Error<"discriminator argument to ptrauth_sign_constant must be a constant " + "integer, the address of the global variable where the result " + "will be stored, or a blend of the two">; def warn_ptrauth_sign_null_pointer : Warning<"signing a null pointer will yield a non-null pointer">, InGroup; def warn_ptrauth_auth_null_pointer : Warning<"authenticating a null pointer will almost certainly trap">, InGroup; +def err_ptrauth_string_not_literal : Error< + "argument must be a string literal%select{| of char type}0">; /// main() // static main() is not an error in C, just in C++. @@ -964,7 +973,7 @@ def err_main_global_variable : def warn_main_redefined : Warning<"variable named 'main' with external linkage " "has undefined behavior">, InGroup
; def ext_main_used : Extension< - "ISO C++ does not allow 'main' to be used by a program">, InGroup
; + "referring to 'main' within an expression is a Clang extension">, InGroup
; /// parser diagnostics def ext_no_declarators : ExtWarn<"declaration does not declare anything">, @@ -1097,8 +1106,6 @@ def note_surrounding_namespace_starts_here : Note< "surrounding namespace with visibility attribute starts here">; def err_pragma_loop_invalid_argument_type : Error< "invalid argument of type %0; expected an integer type">; -def err_pragma_loop_invalid_argument_value : Error< - "%select{invalid value '%0'; must be positive|value '%0' is too large}1">; def err_pragma_loop_compatibility : Error< "%select{incompatible|duplicate}0 directives '%1' and '%2'">; def err_pragma_loop_precedes_nonloop : Error< @@ -12209,6 +12216,9 @@ def err_std_source_location_impl_not_found : Error< def err_std_source_location_impl_malformed : Error< "'std::source_location::__impl' must be standard-layout and have only two 'const char *' fields '_M_file_name' and '_M_function_name', and two integral fields '_M_line' and '_M_column'">; +def err_std_initializer_list_malformed : Error< + "%0 layout not recognized. Must be a non-polymorphic class type with no bases and two fields: a 'const E *' and either another 'const E *' or a 'std::size_t'">; + // HLSL Diagnostics def err_hlsl_attr_unsupported_in_stage : Error<"attribute %0 is unsupported in '%1' shaders, requires %select{|one of the following: }2%3">; def err_hlsl_attr_invalid_type : Error< diff --git a/clang/include/clang/Basic/FileManager.h b/clang/include/clang/Basic/FileManager.h index e1f33d57a898099..527bbef24793ee3 100644 --- a/clang/include/clang/Basic/FileManager.h +++ b/clang/include/clang/Basic/FileManager.h @@ -286,12 +286,15 @@ class FileManager : public RefCountedBase { /// MemoryBuffer if successful, otherwise returning null. llvm::ErrorOr> getBufferForFile(FileEntryRef Entry, bool isVolatile = false, - bool RequiresNullTerminator = true); + bool RequiresNullTerminator = true, + std::optional MaybeLimit = std::nullopt); llvm::ErrorOr> getBufferForFile(StringRef Filename, bool isVolatile = false, - bool RequiresNullTerminator = true) const { - return getBufferForFileImpl(Filename, /*FileSize=*/-1, isVolatile, - RequiresNullTerminator); + bool RequiresNullTerminator = true, + std::optional MaybeLimit = std::nullopt) const { + return getBufferForFileImpl(Filename, + /*FileSize=*/(MaybeLimit ? *MaybeLimit : -1), + isVolatile, RequiresNullTerminator); } private: diff --git a/clang/include/clang/Basic/PointerAuthOptions.h b/clang/include/clang/Basic/PointerAuthOptions.h index e5cdcc31ebfb70d..aaad4a2b2b5ae63 100644 --- a/clang/include/clang/Basic/PointerAuthOptions.h +++ b/clang/include/clang/Basic/PointerAuthOptions.h @@ -14,10 +14,144 @@ #ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H #define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H +#include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" +#include "llvm/ADT/STLForwardCompat.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Target/TargetOptions.h" +#include + namespace clang { constexpr unsigned PointerAuthKeyNone = -1; +class PointerAuthSchema { +public: + enum class Kind : unsigned { + None, + ARM8_3, + }; + + /// Hardware pointer-signing keys in ARM8.3. + /// + /// These values are the same used in ptrauth.h. + enum class ARM8_3Key : unsigned { + ASIA = 0, + ASIB = 1, + ASDA = 2, + ASDB = 3 + }; + + /// Forms of extra discrimination. + enum class Discrimination : unsigned { + /// No additional discrimination. + None, + + /// Discriminate using a constant value. + Constant, + }; + +private: + Kind TheKind : 2; + unsigned IsAddressDiscriminated : 1; + unsigned IsIsaPointer : 1; + unsigned AuthenticatesNullValues : 1; + PointerAuthenticationMode SelectedAuthenticationMode : 2; + Discrimination DiscriminationKind : 2; + unsigned Key : 2; + unsigned ConstantDiscriminator : 16; + +public: + PointerAuthSchema() : TheKind(Kind::None) {} + + PointerAuthSchema( + ARM8_3Key Key, bool IsAddressDiscriminated, + PointerAuthenticationMode AuthenticationMode, + Discrimination OtherDiscrimination, + std::optional ConstantDiscriminatorOrNone = std::nullopt, + bool IsIsaPointer = false, bool AuthenticatesNullValues = false) + : TheKind(Kind::ARM8_3), IsAddressDiscriminated(IsAddressDiscriminated), + IsIsaPointer(IsIsaPointer), + AuthenticatesNullValues(AuthenticatesNullValues), + SelectedAuthenticationMode(AuthenticationMode), + DiscriminationKind(OtherDiscrimination), Key(llvm::to_underlying(Key)) { + assert((getOtherDiscrimination() != Discrimination::Constant || + ConstantDiscriminatorOrNone) && + "constant discrimination requires a constant!"); + if (ConstantDiscriminatorOrNone) + ConstantDiscriminator = *ConstantDiscriminatorOrNone; + } + + PointerAuthSchema( + ARM8_3Key Key, bool IsAddressDiscriminated, + Discrimination OtherDiscrimination, + std::optional ConstantDiscriminatorOrNone = std::nullopt, + bool IsIsaPointer = false, bool AuthenticatesNullValues = false) + : PointerAuthSchema(Key, IsAddressDiscriminated, + PointerAuthenticationMode::SignAndAuth, + OtherDiscrimination, ConstantDiscriminatorOrNone, + IsIsaPointer, AuthenticatesNullValues) {} + + Kind getKind() const { return TheKind; } + + explicit operator bool() const { return isEnabled(); } + + bool isEnabled() const { return getKind() != Kind::None; } + + bool isAddressDiscriminated() const { + assert(getKind() != Kind::None); + return IsAddressDiscriminated; + } + + bool isIsaPointer() const { + assert(getKind() != Kind::None); + return IsIsaPointer; + } + + bool authenticatesNullValues() const { + assert(getKind() != Kind::None); + return AuthenticatesNullValues; + } + + bool hasOtherDiscrimination() const { + return getOtherDiscrimination() != Discrimination::None; + } + + Discrimination getOtherDiscrimination() const { + assert(getKind() != Kind::None); + return DiscriminationKind; + } + + uint16_t getConstantDiscrimination() const { + assert(getOtherDiscrimination() == Discrimination::Constant); + return ConstantDiscriminator; + } + + unsigned getKey() const { + switch (getKind()) { + case Kind::None: + llvm_unreachable("calling getKey() on disabled schema"); + case Kind::ARM8_3: + return llvm::to_underlying(getARM8_3Key()); + } + llvm_unreachable("bad key kind"); + } + + PointerAuthenticationMode getAuthenticationMode() const { + return SelectedAuthenticationMode; + } + + ARM8_3Key getARM8_3Key() const { + assert(getKind() == Kind::ARM8_3); + return ARM8_3Key(Key); + } +}; + +struct PointerAuthOptions { + /// The ABI for C function pointers. + PointerAuthSchema FunctionPointers; +}; + } // end namespace clang #endif diff --git a/clang/include/clang/Basic/StmtNodes.td b/clang/include/clang/Basic/StmtNodes.td index 6ca08abdb14f072..c59a17be7808f1c 100644 --- a/clang/include/clang/Basic/StmtNodes.td +++ b/clang/include/clang/Basic/StmtNodes.td @@ -204,6 +204,7 @@ def OpaqueValueExpr : StmtNode; def TypoExpr : StmtNode; def RecoveryExpr : StmtNode; def BuiltinBitCastExpr : StmtNode; +def EmbedExpr : StmtNode; // Microsoft Extensions. def MSPropertyRefExpr : StmtNode; diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h index 8a6511b9ced832c..9b0ae2102e09885 100644 --- a/clang/include/clang/Basic/TargetInfo.h +++ b/clang/include/clang/Basic/TargetInfo.h @@ -1400,11 +1400,6 @@ class TargetInfo : public TransferrableTargetInfo, return true; } - /// For given feature return dependent ones. - virtual StringRef getFeatureDependencies(StringRef Feature) const { - return StringRef(); - } - struct BranchProtectionInfo { LangOptions::SignReturnAddressScopeKind SignReturnAddr; LangOptions::SignReturnAddressKeyKind SignKey; diff --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def index 9c4b17465e18a17..37d570ca5e75b5e 100644 --- a/clang/include/clang/Basic/TokenKinds.def +++ b/clang/include/clang/Basic/TokenKinds.def @@ -126,6 +126,9 @@ PPKEYWORD(error) // C99 6.10.6 - Pragma Directive. PPKEYWORD(pragma) +// C23 & C++26 #embed +PPKEYWORD(embed) + // GNU Extensions. PPKEYWORD(import) PPKEYWORD(include_next) @@ -999,6 +1002,9 @@ ANNOTATION(header_unit) // Annotation for end of input in clang-repl. ANNOTATION(repl_input_end) +// Annotation for #embed +ANNOTATION(embed) + #undef PRAGMA_ANNOTATION #undef ANNOTATION #undef TESTING_KEYWORD diff --git a/clang/include/clang/Basic/arm_sve.td b/clang/include/clang/Basic/arm_sve.td index f5972b41e7b504b..4a3f92520ba74fa 100644 --- a/clang/include/clang/Basic/arm_sve.td +++ b/clang/include/clang/Basic/arm_sve.td @@ -27,7 +27,7 @@ def SVLD1UH : MInst<"svld1uh_{d}", "dPX", "ilUiUl", [IsLoad, IsZExtRetu def SVLD1SW : MInst<"svld1sw_{d}", "dPU", "lUl", [IsLoad, VerifyRuntimeMode], MemEltTyInt32, "aarch64_sve_ld1">; def SVLD1UW : MInst<"svld1uw_{d}", "dPY", "lUl", [IsLoad, IsZExtReturn, VerifyRuntimeMode], MemEltTyInt32, "aarch64_sve_ld1">; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVLD1_BF : MInst<"svld1[_{2}]", "dPc", "b", [IsLoad, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_ld1">; def SVLD1_VNUM_BF : MInst<"svld1_vnum[_{2}]", "dPcl", "b", [IsLoad, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_ld1">; } @@ -41,6 +41,7 @@ def SVLD1UH_VNUM : MInst<"svld1uh_vnum_{d}", "dPXl", "ilUiUl", [IsLoad, def SVLD1SW_VNUM : MInst<"svld1sw_vnum_{d}", "dPUl", "lUl", [IsLoad, VerifyRuntimeMode], MemEltTyInt32, "aarch64_sve_ld1">; def SVLD1UW_VNUM : MInst<"svld1uw_vnum_{d}", "dPYl", "lUl", [IsLoad, IsZExtReturn, VerifyRuntimeMode], MemEltTyInt32, "aarch64_sve_ld1">; +let TargetGuard = "sve" in { // Load one vector (vector base) def SVLD1_GATHER_BASES_U : MInst<"svld1_gather[_{2}base]_{d}", "dPu", "ilUiUlfd", [IsGatherLoad], MemEltTyDefault, "aarch64_sve_ld1_gather_scalar_offset">; def SVLD1SB_GATHER_BASES_U : MInst<"svld1sb_gather[_{2}base]_{d}", "dPu", "ilUiUl", [IsGatherLoad], MemEltTyInt8, "aarch64_sve_ld1_gather_scalar_offset">; @@ -136,12 +137,14 @@ def SVLDFF1SH_VNUM : MInst<"svldff1sh_vnum_{d}", "dPTl", "ilUiUl", [IsL def SVLDFF1UH_VNUM : MInst<"svldff1uh_vnum_{d}", "dPXl", "ilUiUl", [IsLoad, IsZExtReturn], MemEltTyInt16, "aarch64_sve_ldff1">; def SVLDFF1SW_VNUM : MInst<"svldff1sw_vnum_{d}", "dPUl", "lUl", [IsLoad], MemEltTyInt32, "aarch64_sve_ldff1">; def SVLDFF1UW_VNUM : MInst<"svldff1uw_vnum_{d}", "dPYl", "lUl", [IsLoad, IsZExtReturn], MemEltTyInt32, "aarch64_sve_ldff1">; +} // let TargetGuard = "sve" let TargetGuard = "sve,bf16" in { def SVLDFF1_BF : MInst<"svldff1[_{2}]", "dPc", "b", [IsLoad], MemEltTyDefault, "aarch64_sve_ldff1">; def SVLDFF1_VNUM_BF : MInst<"svldff1_vnum[_{2}]", "dPcl", "b", [IsLoad], MemEltTyDefault, "aarch64_sve_ldff1">; } +let TargetGuard = "sve" in { // First-faulting load one vector (vector base) def SVLDFF1_GATHER_BASES_U : MInst<"svldff1_gather[_{2}base]_{d}", "dPu", "ilUiUlfd", [IsGatherLoad], MemEltTyDefault, "aarch64_sve_ldff1_gather_scalar_offset">; def SVLDFF1SB_GATHER_BASES_U : MInst<"svldff1sb_gather[_{2}base]_{d}", "dPu", "ilUiUl", [IsGatherLoad], MemEltTyInt8, "aarch64_sve_ldff1_gather_scalar_offset">; @@ -236,6 +239,7 @@ def SVLDNF1SH_VNUM : MInst<"svldnf1sh_vnum_{d}", "dPTl", "ilUiUl", [IsL def SVLDNF1UH_VNUM : MInst<"svldnf1uh_vnum_{d}", "dPXl", "ilUiUl", [IsLoad, IsZExtReturn], MemEltTyInt16, "aarch64_sve_ldnf1">; def SVLDNF1SW_VNUM : MInst<"svldnf1sw_vnum_{d}", "dPUl", "lUl", [IsLoad], MemEltTyInt32, "aarch64_sve_ldnf1">; def SVLDNF1UW_VNUM : MInst<"svldnf1uw_vnum_{d}", "dPYl", "lUl", [IsLoad, IsZExtReturn], MemEltTyInt32, "aarch64_sve_ldnf1">; +} // let TargetGuard = "sve" let TargetGuard = "sve,bf16" in { def SVLDNF1_BF : MInst<"svldnf1[_{2}]", "dPc", "b", [IsLoad], MemEltTyDefault, "aarch64_sve_ldnf1">; @@ -248,7 +252,7 @@ def SVLDNT1 : MInst<"svldnt1[_{2}]", "dPc", "csilUcUsUiUlhfd", [IsLoad, VerifyRu // Load one vector, unextended load, non-temporal (scalar base, VL displacement) def SVLDNT1_VNUM : MInst<"svldnt1_vnum[_{2}]", "dPcl", "csilUcUsUiUlhfd", [IsLoad, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_ldnt1">; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVLDNT1_BF : MInst<"svldnt1[_{2}]", "dPc", "b", [IsLoad, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_ldnt1">; def SVLDNT1_VNUM_BF : MInst<"svldnt1_vnum[_{2}]", "dPcl", "b", [IsLoad, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_ldnt1">; } @@ -256,13 +260,13 @@ let TargetGuard = "(sve,bf16)|sme" in { // Load one quadword and replicate (scalar base) def SVLD1RQ : SInst<"svld1rq[_{2}]", "dPc", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_ld1rq", [VerifyRuntimeMode]>; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVLD1RQ_BF : SInst<"svld1rq[_{2}]", "dPc", "b", MergeNone, "aarch64_sve_ld1rq", [VerifyRuntimeMode]>; } multiclass StructLoad { def : SInst; - let TargetGuard = "(sve,bf16)|sme" in { + let TargetGuard = "(sve|sme),bf16" in { def: SInst; } } @@ -286,17 +290,20 @@ let TargetGuard = "sve,f64mm,bf16" in { } let TargetGuard = "sve,bf16" in { + def SVBFMMLA : SInst<"svbfmmla[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfmmla", [IsOverloadNone]>; +} + +let TargetGuard = "(sve|sme),bf16" in { def SVBFDOT : SInst<"svbfdot[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfdot", [IsOverloadNone, VerifyRuntimeMode]>; def SVBFMLALB : SInst<"svbfmlalb[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfmlalb", [IsOverloadNone, VerifyRuntimeMode]>; def SVBFMLALT : SInst<"svbfmlalt[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfmlalt", [IsOverloadNone, VerifyRuntimeMode]>; - def SVBFMMLA : SInst<"svbfmmla[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfmmla", [IsOverloadNone, VerifyRuntimeMode]>; def SVBFDOT_N : SInst<"svbfdot[_n_{0}]", "MMda", "b", MergeNone, "aarch64_sve_bfdot", [IsOverloadNone, VerifyRuntimeMode]>; - def SVBFMLAL_N : SInst<"svbfmlalb[_n_{0}]", "MMda", "b", MergeNone, "aarch64_sve_bfmlalb", [IsOverloadNone, VerifyRuntimeMode]>; + def SVBFMLALB_N : SInst<"svbfmlalb[_n_{0}]", "MMda", "b", MergeNone, "aarch64_sve_bfmlalb", [IsOverloadNone, VerifyRuntimeMode]>; def SVBFMLALT_N : SInst<"svbfmlalt[_n_{0}]", "MMda", "b", MergeNone, "aarch64_sve_bfmlalt", [IsOverloadNone, VerifyRuntimeMode]>; def SVBFDOT_LANE : SInst<"svbfdot_lane[_{0}]", "MMddi", "b", MergeNone, "aarch64_sve_bfdot_lane_v2", [IsOverloadNone, VerifyRuntimeMode], [ImmCheck<3, ImmCheck0_3>]>; def SVBFMLALB_LANE : SInst<"svbfmlalb_lane[_{0}]", "MMddi", "b", MergeNone, "aarch64_sve_bfmlalb_lane_v2", [IsOverloadNone, VerifyRuntimeMode], [ImmCheck<3, ImmCheck0_7>]>; def SVBFMLALT_LANE : SInst<"svbfmlalt_lane[_{0}]", "MMddi", "b", MergeNone, "aarch64_sve_bfmlalt_lane_v2", [IsOverloadNone, VerifyRuntimeMode], [ImmCheck<3, ImmCheck0_7>]>; -} +} // let TargetGuard = "(sve|sme),bf16" let TargetGuard = "sve2p1" in { // Contiguous zero-extending load to quadword (single vector). @@ -351,11 +358,12 @@ def SVST1H_VNUM_U : MInst<"svst1h_vnum[_{d}]", "vPFld", "UiUl", [IsSt def SVST1W_VNUM_S : MInst<"svst1w_vnum[_{d}]", "vPCld", "l", [IsStore, VerifyRuntimeMode], MemEltTyInt32, "aarch64_sve_st1">; def SVST1W_VNUM_U : MInst<"svst1w_vnum[_{d}]", "vPGld", "Ul", [IsStore, VerifyRuntimeMode], MemEltTyInt32, "aarch64_sve_st1">; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVST1_BF : MInst<"svst1[_{d}]", "vPpd", "b", [IsStore, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_st1">; def SVST1_VNUM_BF : MInst<"svst1_vnum[_{d}]", "vPpld", "b", [IsStore, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_st1">; } +let TargetGuard = "sve" in { // Store one vector (vector base) def SVST1_SCATTER_BASES_U : MInst<"svst1_scatter[_{2}base_{d}]", "vPud", "ilUiUlfd", [IsScatterStore], MemEltTyDefault, "aarch64_sve_st1_scatter_scalar_offset">; def SVST1B_SCATTER_BASES_U : MInst<"svst1b_scatter[_{2}base_{d}]", "vPud", "ilUiUl", [IsScatterStore], MemEltTyInt8, "aarch64_sve_st1_scatter_scalar_offset">; @@ -424,10 +432,11 @@ def SVST1H_SCATTER_32B_INDICES_UU : MInst<"svst1h_scatter_[{3}]index[_{d}]", "vP def SVST1_SCATTER_INDEX_S : MInst<"svst1_scatter[_{2}base]_index[_{d}]", "vPuld", "ilUiUlfd", [IsScatterStore], MemEltTyDefault, "aarch64_sve_st1_scatter_scalar_offset">; def SVST1H_SCATTER_INDEX_S : MInst<"svst1h_scatter[_{2}base]_index[_{d}]", "vPuld", "ilUiUl", [IsScatterStore], MemEltTyInt16, "aarch64_sve_st1_scatter_scalar_offset">; def SVST1W_SCATTER_INDEX_S : MInst<"svst1w_scatter[_{2}base]_index[_{d}]", "vPuld", "lUl", [IsScatterStore], MemEltTyInt32, "aarch64_sve_st1_scatter_scalar_offset">; +} // let TargetGuard = "sve" multiclass StructStore { def : SInst; - let TargetGuard = "sve,bf16" in { + let TargetGuard = "(sve|sme),bf16" in { def: SInst; } } @@ -447,7 +456,7 @@ def SVSTNT1 : MInst<"svstnt1[_{d}]", "vPpd", "csilUcUsUiUlhfd", [IsStore, Verify // Store one vector, with no truncation, non-temporal (scalar base, VL displacement) def SVSTNT1_VNUM : MInst<"svstnt1_vnum[_{d}]", "vPpld", "csilUcUsUiUlhfd", [IsStore, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_stnt1">; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVSTNT1_BF : MInst<"svstnt1[_{d}]", "vPpd", "b", [IsStore, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_stnt1">; def SVSTNT1_VNUM_BF : MInst<"svstnt1_vnum[_{d}]", "vPpld", "b", [IsStore, VerifyRuntimeMode], MemEltTyDefault, "aarch64_sve_stnt1">; } @@ -499,6 +508,7 @@ def SVPRFH_VNUM : MInst<"svprfh_vnum", "vPQlJ", "s", [IsPrefetch, VerifyRuntimeM def SVPRFW_VNUM : MInst<"svprfw_vnum", "vPQlJ", "i", [IsPrefetch, VerifyRuntimeMode], MemEltTyInt32, "aarch64_sve_prf">; def SVPRFD_VNUM : MInst<"svprfd_vnum", "vPQlJ", "l", [IsPrefetch, VerifyRuntimeMode], MemEltTyInt64, "aarch64_sve_prf">; +let TargetGuard = "sve" in { // Prefetch (Vector bases) def SVPRFB_GATHER_BASES : MInst<"svprfb_gather[_{2}base]", "vPdJ", "UiUl", [IsGatherPrefetch], MemEltTyInt8, "aarch64_sve_prfb_gather_scalar_offset">; def SVPRFH_GATHER_BASES : MInst<"svprfh_gather[_{2}base]", "vPdJ", "UiUl", [IsGatherPrefetch], MemEltTyInt16, "aarch64_sve_prfh_gather_scalar_offset">; @@ -531,21 +541,24 @@ def SVPRFB_GATHER_BASES_OFFSET : MInst<"svprfb_gather[_{2}base]_offset", "vPdlJ" def SVPRFH_GATHER_BASES_OFFSET : MInst<"svprfh_gather[_{2}base]_index", "vPdlJ", "UiUl", [IsGatherPrefetch], MemEltTyInt16, "aarch64_sve_prfh_gather_scalar_offset">; def SVPRFW_GATHER_BASES_OFFSET : MInst<"svprfw_gather[_{2}base]_index", "vPdlJ", "UiUl", [IsGatherPrefetch], MemEltTyInt32, "aarch64_sve_prfw_gather_scalar_offset">; def SVPRFD_GATHER_BASES_OFFSET : MInst<"svprfd_gather[_{2}base]_index", "vPdlJ", "UiUl", [IsGatherPrefetch], MemEltTyInt64, "aarch64_sve_prfd_gather_scalar_offset">; +} // let TargetGuard = "sve" //////////////////////////////////////////////////////////////////////////////// // Address calculations +let TargetGuard = "sve" in { def SVADRB : SInst<"svadrb[_{0}base]_[{2}]offset", "uud", "ilUiUl", MergeNone, "aarch64_sve_adrb">; def SVADRH : SInst<"svadrh[_{0}base]_[{2}]index", "uud", "ilUiUl", MergeNone, "aarch64_sve_adrh">; def SVADRW : SInst<"svadrw[_{0}base]_[{2}]index", "uud", "ilUiUl", MergeNone, "aarch64_sve_adrw">; def SVADRD : SInst<"svadrd[_{0}base]_[{2}]index", "uud", "ilUiUl", MergeNone, "aarch64_sve_adrd">; +} // let TargetGuard = "sve" //////////////////////////////////////////////////////////////////////////////// // Scalar to vector def SVDUPQ_8 : SInst<"svdupq[_n]_{d}", "dssssssssssssssss", "cUc", MergeNone, "", [VerifyRuntimeMode]>; def SVDUPQ_16 : SInst<"svdupq[_n]_{d}", "dssssssss", "sUsh", MergeNone, "", [VerifyRuntimeMode]>; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVDUPQ_BF16 : SInst<"svdupq[_n]_{d}", "dssssssss", "b", MergeNone, "", [VerifyRuntimeMode]>; } def SVDUPQ_32 : SInst<"svdupq[_n]_{d}", "dssss", "iUif", MergeNone, "", [VerifyRuntimeMode]>; @@ -553,7 +566,7 @@ def SVDUPQ_64 : SInst<"svdupq[_n]_{d}", "dss", "lUld", MergeNone, "", [VerifyRu multiclass svdup_base { def NAME : SInst; - let TargetGuard = "(sve,bf16)|sme" in { + let TargetGuard = "(sve|sme),bf16" in { def _BF16: SInst; } } @@ -684,7 +697,7 @@ def SVASRD_X : SInst<"svasrd[_n_{d}]", "dPdi", "csil", MergeAny, "aa def SVASRD_Z : SInst<"svasrd[_n_{d}]", "dPdi", "csil", MergeZero, "aarch64_sve_asrd", [VerifyRuntimeMode], [ImmCheck<2, ImmCheckShiftRight, 1>]>; def SVINSR : SInst<"svinsr[_n_{d}]", "dds", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_insr", [VerifyRuntimeMode]>; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVINSR_BF16 : SInst<"svinsr[_n_{d}]", "dds", "b", MergeNone, "aarch64_sve_insr", [VerifyRuntimeMode]>; } @@ -773,7 +786,7 @@ defm SVCLS : SInstCLS<"svcls", "csil", "aarch64_sve_cls", [VerifyRunt defm SVCLZ : SInstCLS<"svclz", "csilUcUsUiUl", "aarch64_sve_clz", [VerifyRuntimeMode]>; defm SVCNT : SInstCLS<"svcnt", "csilUcUsUiUlhfd", "aarch64_sve_cnt", [VerifyRuntimeMode]>; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { defm SVCNT_BF16 : SInstCLS<"svcnt", "b", "aarch64_sve_cnt", [VerifyRuntimeMode]>; } @@ -826,10 +839,12 @@ defm SVRINTX : SInstZPZ<"svrintx", "hfd", "aarch64_sve_frintx">; defm SVRINTZ : SInstZPZ<"svrintz", "hfd", "aarch64_sve_frintz">; defm SVSQRT : SInstZPZ<"svsqrt", "hfd", "aarch64_sve_fsqrt">; +let TargetGuard = "sve" in { def SVEXPA : SInst<"svexpa[_{d}]", "du", "hfd", MergeNone, "aarch64_sve_fexpa_x">; def SVTMAD : SInst<"svtmad[_{d}]", "dddi", "hfd", MergeNone, "aarch64_sve_ftmad_x", [], [ImmCheck<2, ImmCheck0_7>]>; def SVTSMUL : SInst<"svtsmul[_{d}]", "ddu", "hfd", MergeNone, "aarch64_sve_ftsmul_x">; def SVTSSEL : SInst<"svtssel[_{d}]", "ddu", "hfd", MergeNone, "aarch64_sve_ftssel_x">; +} def SVSCALE_M : SInst<"svscale[_{d}]", "dPdx", "hfd", MergeOp1, "aarch64_sve_fscale", [VerifyRuntimeMode]>; def SVSCALE_X : SInst<"svscale[_{d}]", "dPdx", "hfd", MergeAny, "aarch64_sve_fscale", [VerifyRuntimeMode]>; @@ -932,7 +947,7 @@ defm SVFCVTZS_S64_F16 : SInstCvtMXZ<"svcvt_s64[_f16]", "ddPO", "dPO", "l", "aar defm SVFCVTZS_S32_F32 : SInstCvtMXZ<"svcvt_s32[_f32]", "ddPM", "dPM", "i", "aarch64_sve_fcvtzs", [IsOverloadCvt]>; defm SVFCVTZS_S64_F32 : SInstCvtMXZ<"svcvt_s64[_f32]", "ddPM", "dPM", "l", "aarch64_sve_fcvtzs_i64f32">; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { defm SVCVT_BF16_F32 : SInstCvtMXZ<"svcvt_bf16[_f32]", "ddPM", "dPM", "b", "aarch64_sve_fcvt_bf16f32">; def SVCVTNT_BF16_F32 : SInst<"svcvtnt_bf16[_f32]", "ddPM", "b", MergeOp1, "aarch64_sve_fcvtnt_bf16f32", [IsOverloadNone, VerifyRuntimeMode]>; } @@ -992,7 +1007,7 @@ defm SVFCVT_F32_F64 : SInstCvtMXZ<"svcvt_f32[_f64]", "MMPd", "MPd", "d", "aarc defm SVFCVT_F64_F16 : SInstCvtMXZ<"svcvt_f64[_f16]", "ddPO", "dPO", "d", "aarch64_sve_fcvt_f64f16">; defm SVFCVT_F64_F32 : SInstCvtMXZ<"svcvt_f64[_f32]", "ddPM", "dPM", "d", "aarch64_sve_fcvt_f64f32">; -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { defm SVCVTLT_F32 : SInstCvtMX<"svcvtlt_f32[_f16]", "ddPh", "dPh", "f", "aarch64_sve_fcvtlt_f32f16">; defm SVCVTLT_F64 : SInstCvtMX<"svcvtlt_f64[_f32]", "ddPh", "dPh", "d", "aarch64_sve_fcvtlt_f64f32">; @@ -1012,7 +1027,7 @@ def SVCVTXNT_F32 : SInst<"svcvtxnt_f32[_f64]", "MMPd", "d", MergeOp1, "aarch6 multiclass SVEPerm { def : SInst; - let TargetGuard = "sve,bf16" in { + let TargetGuard = "(sve|sme),bf16" in { def: SInst; } } @@ -1022,19 +1037,22 @@ defm SVCLASTA_N : SVEPerm<"svclasta[_n_{d}]", "sPsd", "aarch64_sve_clasta_n">; defm SVCLASTB : SVEPerm<"svclastb[_{d}]", "dPdd", "aarch64_sve_clastb">; defm SVCLASTB_N : SVEPerm<"svclastb[_n_{d}]", "sPsd", "aarch64_sve_clastb_n">; +let TargetGuard = "sve" in { def SVCOMPACT : SInst<"svcompact[_{d}]", "dPd", "ilUiUlfd", MergeNone, "aarch64_sve_compact">; +} + // Note: svdup_lane is implemented using the intrinsic for TBL to represent a // splat of any possible lane. It is upto LLVM to pick a more efficient // instruction such as DUP (indexed) if the lane index fits the range of the // instruction's immediate. def SVDUP_LANE : SInst<"svdup_lane[_{d}]", "ddL", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_tbl", [VerifyRuntimeMode]>; -let TargetGuard = "sve,bf16" in { +let TargetGuard = "(sve|sme),bf16" in { def SVDUP_LANE_BF16 : SInst<"svdup_lane[_{d}]", "ddL", "b", MergeNone, "aarch64_sve_tbl", [VerifyRuntimeMode]>; } def SVDUPQ_LANE : SInst<"svdupq_lane[_{d}]", "ddn", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_dupq_lane", [VerifyRuntimeMode]>; -let TargetGuard = "sve,bf16" in { +let TargetGuard = "(sve|sme),bf16" in { def SVDUPQ_LANE_BF16 : SInst<"svdupq_lane[_{d}]", "ddn", "b", MergeNone, "aarch64_sve_dupq_lane", [VerifyRuntimeMode]>; } def SVEXT : SInst<"svext[_{d}]", "dddi", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_ext", [VerifyRuntimeMode], [ImmCheck<2, ImmCheckExtract, 1>]>; @@ -1045,7 +1063,7 @@ def SVSEL : SInst<"svsel[_{d}]", "dPdd", "csilUcUsUiUlhfd", MergeNo def SVSPLICE : SInst<"svsplice[_{d}]", "dPdd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_splice", [VerifyRuntimeMode]>; def SVTBL : SInst<"svtbl[_{d}]", "ddu", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_tbl", [VerifyRuntimeMode]>; -let TargetGuard = "sve,bf16" in { +let TargetGuard = "(sve|sme),bf16" in { def SVTBL_BF16 : SInst<"svtbl[_{d}]", "ddu", "b", MergeNone, "aarch64_sve_tbl", [VerifyRuntimeMode]>; } @@ -1060,7 +1078,7 @@ def SVUZP2 : SInst<"svuzp2[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNo def SVZIP1 : SInst<"svzip1[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_zip1", [VerifyRuntimeMode]>; def SVZIP2 : SInst<"svzip2[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_zip2", [VerifyRuntimeMode]>; -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVEXT_BF16 : SInst<"svext[_{d}]", "dddi", "b", MergeNone, "aarch64_sve_ext", [VerifyRuntimeMode], [ImmCheck<2, ImmCheckExtract, 1>]>; def SVREV_BF16 : SInst<"svrev[_{d}]", "dd", "b", MergeNone, "aarch64_sve_rev", [VerifyRuntimeMode]>; def SVSEL_BF16 : SInst<"svsel[_{d}]", "dPdd", "b", MergeNone, "aarch64_sve_sel", [VerifyRuntimeMode]>; @@ -1158,10 +1176,12 @@ def SVPTEST_LAST : SInst<"svptest_last", "sPP", "Pc", MergeNone, "aarch64_sve_ //////////////////////////////////////////////////////////////////////////////// // FFR manipulation +let TargetGuard = "sve" in { def SVRDFFR : SInst<"svrdffr", "Pv", "Pc", MergeNone, "", [IsOverloadNone]>; def SVRDFFR_Z : SInst<"svrdffr_z", "PP", "Pc", MergeNone, "", [IsOverloadNone]>; def SVSETFFR : SInst<"svsetffr", "vv", "", MergeNone, "", [IsOverloadNone]>; def SVWRFFR : SInst<"svwrffr", "vP", "Pc", MergeNone, "", [IsOverloadNone]>; +} //////////////////////////////////////////////////////////////////////////////// // Counting elements @@ -1179,7 +1199,7 @@ def SVCNTD : SInst<"svcntd", "nv", "", MergeNone, "aarch64_sve_cntd", [IsAppendS def SVCNTP : SInst<"svcntp_{d}", "nPP", "PcPsPiPl", MergeNone, "aarch64_sve_cntp", [VerifyRuntimeMode]>; def SVLEN : SInst<"svlen[_{d}]", "nd", "csilUcUsUiUlhfd", MergeNone, "", [VerifyRuntimeMode]>; -let TargetGuard = "sve,bf16" in { +let TargetGuard = "(sve|sme),bf16" in { def SVLEN_BF16 : SInst<"svlen[_{d}]", "nd", "b", MergeNone, "", [VerifyRuntimeMode]>; } @@ -1249,7 +1269,9 @@ let TargetGuard = "sve,i8mm" in { def SVMLLA_S32 : SInst<"svmmla[_s32]", "ddqq","i", MergeNone, "aarch64_sve_smmla">; def SVMLLA_U32 : SInst<"svmmla[_u32]", "ddqq","Ui", MergeNone, "aarch64_sve_ummla">; def SVUSMLLA_S32 : SInst<"svusmmla[_s32]", "ddbq","i", MergeNone, "aarch64_sve_usmmla">; +} +let TargetGuard = "(sve|sme),i8mm" in { def SVUSDOT_S : SInst<"svusdot[_s32]", "ddbq", "i", MergeNone, "aarch64_sve_usdot", [VerifyRuntimeMode]>; def SVUSDOT_N_S : SInst<"svusdot[_n_s32]", "ddbr", "i", MergeNone, "aarch64_sve_usdot", [VerifyRuntimeMode]>; def SVSUDOT_S : SInst<"svsudot[_s32]", "ddqb", "i", MergeNone, "aarch64_sve_usdot", [ReverseUSDOT, VerifyRuntimeMode]>; @@ -1265,21 +1287,21 @@ def SVMLLA_F32 : SInst<"svmmla[_f32]", "dddd","f", MergeNone, "aarch64_sve_fmmla let TargetGuard = "sve,f64mm" in { def SVMLLA_F64 : SInst<"svmmla[_f64]", "dddd","d", MergeNone, "aarch64_sve_fmmla">; -def SVTRN1Q : SInst<"svtrn1q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_trn1q", [VerifyRuntimeMode]>; -def SVTRN2Q : SInst<"svtrn2q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_trn2q", [VerifyRuntimeMode]>; -def SVUZP1Q : SInst<"svuzp1q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_uzp1q", [VerifyRuntimeMode]>; -def SVUZP2Q : SInst<"svuzp2q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_uzp2q", [VerifyRuntimeMode]>; -def SVZIP1Q : SInst<"svzip1q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_zip1q", [VerifyRuntimeMode]>; -def SVZIP2Q : SInst<"svzip2q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_zip2q", [VerifyRuntimeMode]>; +def SVTRN1Q : SInst<"svtrn1q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_trn1q">; +def SVTRN2Q : SInst<"svtrn2q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_trn2q">; +def SVUZP1Q : SInst<"svuzp1q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_uzp1q">; +def SVUZP2Q : SInst<"svuzp2q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_uzp2q">; +def SVZIP1Q : SInst<"svzip1q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_zip1q">; +def SVZIP2Q : SInst<"svzip2q[_{d}]", "ddd", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_zip2q">; } let TargetGuard = "sve,bf16,f64mm" in { def SVTRN1Q_BF16 : SInst<"svtrn1q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_trn1q">; def SVTRN2Q_BF16 : SInst<"svtrn2q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_trn2q">; -def SVUZP1Q_BF16 : SInst<"svuzp1q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_uzp1q", [VerifyRuntimeMode]>; -def SVUZP2Q_BF16 : SInst<"svuzp2q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_uzp2q", [VerifyRuntimeMode]>; -def SVZIP1Q_BF16 : SInst<"svzip1q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_zip1q", [VerifyRuntimeMode]>; -def SVZIP2Q_BF16 : SInst<"svzip2q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_zip2q", [VerifyRuntimeMode]>; +def SVUZP1Q_BF16 : SInst<"svuzp1q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_uzp1q">; +def SVUZP2Q_BF16 : SInst<"svuzp2q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_uzp2q">; +def SVZIP1Q_BF16 : SInst<"svzip1q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_zip1q">; +def SVZIP2Q_BF16 : SInst<"svzip2q[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_zip2q">; } //////////////////////////////////////////////////////////////////////////////// @@ -1295,7 +1317,7 @@ def SVCREATE_3 : SInst<"svcreate3[_{d}]", "3ddd", "csilUcUsUiUlhfd", MergeNone, def SVCREATE_4 : SInst<"svcreate4[_{d}]", "4dddd", "csilUcUsUiUlhfd", MergeNone, "", [IsTupleCreate, VerifyRuntimeMode]>; } -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVUNDEF_1_BF16 : SInst<"svundef_{d}", "dv", "b", MergeNone, "", [IsUndef, VerifyRuntimeMode]>; def SVUNDEF_2_BF16 : SInst<"svundef2_{d}", "2v", "b", MergeNone, "", [IsUndef, VerifyRuntimeMode]>; def SVUNDEF_3_BF16 : SInst<"svundef3_{d}", "3v", "b", MergeNone, "", [IsUndef, VerifyRuntimeMode]>; @@ -1323,7 +1345,7 @@ def SVSET_3 : SInst<"svset3[_{d}]", "33id", "csilUcUsUiUlhfd", MergeNone, "", [I def SVSET_4 : SInst<"svset4[_{d}]", "44id", "csilUcUsUiUlhfd", MergeNone, "", [IsTupleSet, VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_3>]>; } -let TargetGuard = "(sve,bf16)|sme" in { +let TargetGuard = "(sve|sme),bf16" in { def SVGET_2_BF16 : SInst<"svget2[_{d}]", "d2i", "b", MergeNone, "", [IsTupleGet, VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_1>]>; def SVGET_3_BF16 : SInst<"svget3[_{d}]", "d3i", "b", MergeNone, "", [IsTupleGet, VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_2>]>; def SVGET_4_BF16 : SInst<"svget4[_{d}]", "d4i", "b", MergeNone, "", [IsTupleGet, VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_3>]>; @@ -1347,7 +1369,7 @@ let TargetGuard = "sve2p1|sme2" in { } //////////////////////////////////////////////////////////////////////////////// // SVE2 WhileGE/GT -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVWHILEGE_S32 : SInst<"svwhilege_{d}[_{1}]", "Pkk", "PcPsPiPl", MergeNone, "aarch64_sve_whilege", [IsOverloadWhileOrMultiVecCvt, VerifyRuntimeMode]>; def SVWHILEGE_S64 : SInst<"svwhilege_{d}[_{1}]", "Pll", "PcPsPiPl", MergeNone, "aarch64_sve_whilege", [IsOverloadWhileOrMultiVecCvt, VerifyRuntimeMode]>; def SVWHILEGT_S32 : SInst<"svwhilegt_{d}[_{1}]", "Pkk", "PcPsPiPl", MergeNone, "aarch64_sve_whilegt", [IsOverloadWhileOrMultiVecCvt, VerifyRuntimeMode]>; @@ -1373,7 +1395,7 @@ let TargetGuard = "sve2p1|sme2" in { //////////////////////////////////////////////////////////////////////////////// // SVE2 - Uniform DSP operations -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { defm SVQADD_S : SInstZPZZ<"svqadd", "csli", "aarch64_sve_sqadd", "aarch64_sve_sqadd">; defm SVQADD_U : SInstZPZZ<"svqadd", "UcUsUiUl", "aarch64_sve_uqadd", "aarch64_sve_uqadd">; defm SVHADD_S : SInstZPZZ<"svhadd", "csli", "aarch64_sve_shadd", "aarch64_sve_shadd">; @@ -1408,7 +1430,7 @@ multiclass SInstZPZxZ; } -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { defm SVQRSHL_S : SInstZPZxZ<"svqrshl", "csil", "dPdx", "dPdK", "aarch64_sve_sqrshl", [VerifyRuntimeMode]>; defm SVQRSHL_U : SInstZPZxZ<"svqrshl", "UcUsUiUl", "dPdx", "dPdK", "aarch64_sve_uqrshl", [VerifyRuntimeMode]>; defm SVQSHL_S : SInstZPZxZ<"svqshl", "csil", "dPdx", "dPdK", "aarch64_sve_sqshl", [VerifyRuntimeMode]>; @@ -1462,7 +1484,7 @@ multiclass SInstPairwise; } -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { defm SVADDP : SInstPairwise<"svaddp", "csliUcUsUiUl", "aarch64_sve_addp", [VerifyRuntimeMode]>; defm SVADDP_F : SInstPairwise<"svaddp", "hfd", "aarch64_sve_faddp", [VerifyRuntimeMode]>; defm SVMAXNMP : SInstPairwise<"svmaxnmp", "hfd", "aarch64_sve_fmaxnmp", [VerifyRuntimeMode]>; @@ -1478,7 +1500,7 @@ defm SVMINP_U : SInstPairwise<"svminp", "UcUsUiUl", "aarch64_sve_uminp", [ //////////////////////////////////////////////////////////////////////////////// // SVE2 - Widening pairwise arithmetic -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVADALP_S_M : SInst<"svadalp[_{d}]", "dPdh", "sil", MergeOp1, "aarch64_sve_sadalp", [VerifyRuntimeMode]>; def SVADALP_S_X : SInst<"svadalp[_{d}]", "dPdh", "sil", MergeAny, "aarch64_sve_sadalp", [VerifyRuntimeMode]>; def SVADALP_S_Z : SInst<"svadalp[_{d}]", "dPdh", "sil", MergeZero, "aarch64_sve_sadalp", [VerifyRuntimeMode]>; @@ -1492,7 +1514,7 @@ def SVADALP_U_Z : SInst<"svadalp[_{d}]", "dPdh", "UsUiUl", MergeZero, "aarch64_s // SVE2 - Bitwise ternary logical instructions // -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVBCAX : SInst<"svbcax[_{d}]", "dddd", "csilUcUsUiUl", MergeNone, "aarch64_sve_bcax", [VerifyRuntimeMode]>; def SVBSL : SInst<"svbsl[_{d}]", "dddd", "csilUcUsUiUl", MergeNone, "aarch64_sve_bsl", [VerifyRuntimeMode]>; def SVBSL1N : SInst<"svbsl1n[_{d}]", "dddd", "csilUcUsUiUl", MergeNone, "aarch64_sve_bsl1n", [VerifyRuntimeMode]>; @@ -1512,7 +1534,7 @@ def SVXAR_N : SInst<"svxar[_n_{d}]", "dddi", "csilUcUsUiUl", MergeNone, "aar //////////////////////////////////////////////////////////////////////////////// // SVE2 - Large integer arithmetic -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVADCLB : SInst<"svadclb[_{d}]", "dddd", "UiUl", MergeNone, "aarch64_sve_adclb", [VerifyRuntimeMode]>; def SVADCLT : SInst<"svadclt[_{d}]", "dddd", "UiUl", MergeNone, "aarch64_sve_adclt", [VerifyRuntimeMode]>; def SVSBCLB : SInst<"svsbclb[_{d}]", "dddd", "UiUl", MergeNone, "aarch64_sve_sbclb", [VerifyRuntimeMode]>; @@ -1535,7 +1557,7 @@ def SVMUL_LANE_2 : SInst<"svmul_lane[_{d}]", "dddi", "silUsUiUl", MergeNone, "a //////////////////////////////////////////////////////////////////////////////// // SVE2 - Uniform complex integer arithmetic -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVCADD : SInst<"svcadd[_{d}]", "dddi", "csilUcUsUiUl", MergeNone, "aarch64_sve_cadd_x", [VerifyRuntimeMode], [ImmCheck<2, ImmCheckComplexRot90_270>]>; def SVSQCADD : SInst<"svqcadd[_{d}]", "dddi", "csil", MergeNone, "aarch64_sve_sqcadd_x", [VerifyRuntimeMode], [ImmCheck<2, ImmCheckComplexRot90_270>]>; def SVCMLA : SInst<"svcmla[_{d}]", "ddddi", "csilUcUsUiUl", MergeNone, "aarch64_sve_cmla_x", [VerifyRuntimeMode], [ImmCheck<3, ImmCheckComplexRotAll90>]>; @@ -1564,7 +1586,7 @@ multiclass SInstWideDSPWide { def _N : SInst; } -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { defm SVABALB_S : SInstWideDSPAcc<"svabalb", "sil", "aarch64_sve_sabalb">; defm SVABALB_U : SInstWideDSPAcc<"svabalb", "UsUiUl", "aarch64_sve_uabalb">; defm SVABALT_S : SInstWideDSPAcc<"svabalt", "sil", "aarch64_sve_sabalt">; @@ -1643,7 +1665,7 @@ def SVQDMULLT_LANE : SInst<"svqdmullt_lane[_{d}]", "dhhi", "il", MergeNone, " //////////////////////////////////////////////////////////////////////////////// // SVE2 - Narrowing DSP operations -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVADDHNB : SInst<"svaddhnb[_{d}]", "hdd", "silUsUiUl", MergeNone, "aarch64_sve_addhnb", [VerifyRuntimeMode]>; def SVADDHNT : SInst<"svaddhnt[_{d}]", "hhdd", "silUsUiUl", MergeNone, "aarch64_sve_addhnt", [VerifyRuntimeMode]>; def SVRADDHNB : SInst<"svraddhnb[_{d}]", "hdd", "silUsUiUl", MergeNone, "aarch64_sve_raddhnb", [VerifyRuntimeMode]>; @@ -1683,7 +1705,7 @@ def SVQRSHRNT_U : SInst<"svqrshrnt[_n_{d}]", "hhdi", "UsUiUl", MergeNone, " //////////////////////////////////////////////////////////////////////////////// // SVE2 - Unary narrowing operations -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVQXTNB_S : SInst<"svqxtnb[_{d}]", "hd", "sil", MergeNone, "aarch64_sve_sqxtnb", [VerifyRuntimeMode]>; def SVQXTNB_U : SInst<"svqxtnb[_{d}]", "hd", "UsUiUl", MergeNone, "aarch64_sve_uqxtnb", [VerifyRuntimeMode]>; def SVQXTUNB_S : SInst<"svqxtunb[_{d}]", "ed", "sil", MergeNone, "aarch64_sve_sqxtunb", [VerifyRuntimeMode]>; @@ -1696,7 +1718,7 @@ def SVQXTUNT_S : SInst<"svqxtunt[_{d}]", "eed", "sil", MergeNone, "aarch64_s //////////////////////////////////////////////////////////////////////////////// // SVE2 - Widening complex integer arithmetic -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { defm SVADDLBT : SInstWideDSPLong<"svaddlbt", "sil", "aarch64_sve_saddlbt">; defm SVSUBLBT : SInstWideDSPLong<"svsublbt", "sil", "aarch64_sve_ssublbt">; defm SVSUBLTB : SInstWideDSPLong<"svsubltb", "sil", "aarch64_sve_ssubltb">; @@ -1830,7 +1852,7 @@ def SVSTNT1W_SCATTER_INDEX_S : MInst<"svstnt1w_scatter[_{2}base]_index[_{d}]", " //////////////////////////////////////////////////////////////////////////////// // SVE2 - Polynomial arithmetic -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVEORBT : SInst<"sveorbt[_{d}]", "dddd", "csilUcUsUiUl", MergeNone, "aarch64_sve_eorbt", [VerifyRuntimeMode]>; def SVEORBT_N : SInst<"sveorbt[_n_{d}]", "ddda", "csilUcUsUiUl", MergeNone, "aarch64_sve_eorbt", [VerifyRuntimeMode]>; def SVEORTB : SInst<"sveortb[_{d}]", "dddd", "csilUcUsUiUl", MergeNone, "aarch64_sve_eortb", [VerifyRuntimeMode]>; @@ -1850,7 +1872,7 @@ def SVPMULLT_PAIR_N : SInst<"svpmullt_pair[_n_{d}]", "dda", "UcUi", Mer //////////////////////////////////////////////////////////////////////////////// // SVE2 - Complex integer dot product -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVCDOT : SInst<"svcdot[_{d}]", "ddqqi", "il", MergeNone, "aarch64_sve_cdot", [VerifyRuntimeMode], [ImmCheck<3, ImmCheckComplexRotAll90>]>; def SVCDOT_LANE : SInst<"svcdot_lane[_{d}]", "ddqqii", "il", MergeNone, "aarch64_sve_cdot_lane", [VerifyRuntimeMode], [ImmCheck<4, ImmCheckComplexRotAll90>, ImmCheck<3, ImmCheckLaneIndexDot, 2>]>; @@ -1859,7 +1881,7 @@ def SVCDOT_LANE : SInst<"svcdot_lane[_{d}]", "ddqqii", "il", MergeNone, "aarch //////////////////////////////////////////////////////////////////////////////// // SVE2 - Floating-point widening multiply-accumulate -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVMLALB_F : SInst<"svmlalb[_{d}]", "ddhh", "f", MergeNone, "aarch64_sve_fmlalb", [VerifyRuntimeMode]>; def SVMLALB_F_N : SInst<"svmlalb[_n_{d}]", "ddhR", "f", MergeNone, "aarch64_sve_fmlalb", [VerifyRuntimeMode]>; def SVMLALB_F_LANE : SInst<"svmlalb_lane[_{d}]", "ddhhi", "f", MergeNone, "aarch64_sve_fmlalb_lane", [VerifyRuntimeMode], [ImmCheck<3, ImmCheckLaneIndex, 2>]>; @@ -1877,7 +1899,7 @@ def SVMLSLT_F_LANE : SInst<"svmlslt_lane[_{d}]", "ddhhi", "f", MergeNone, "aar //////////////////////////////////////////////////////////////////////////////// // SVE2 - Floating-point integer binary logarithm -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVLOGB_M : SInst<"svlogb[_{d}]", "xxPd", "hfd", MergeOp1, "aarch64_sve_flogb", [VerifyRuntimeMode]>; def SVLOGB_X : SInst<"svlogb[_{d}]", "xPd", "hfd", MergeAnyExp, "aarch64_sve_flogb", [VerifyRuntimeMode]>; def SVLOGB_Z : SInst<"svlogb[_{d}]", "xPd", "hfd", MergeZeroExp, "aarch64_sve_flogb", [VerifyRuntimeMode]>; @@ -1901,7 +1923,7 @@ def SVNMATCH : SInst<"svnmatch[_{d}]", "PPdd", "csUcUs", MergeNone, "aarch64_sve //////////////////////////////////////////////////////////////////////////////// // SVE2 - Contiguous conflict detection -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVWHILERW_B : SInst<"svwhilerw[_{1}]", "Pcc", "cUc", MergeNone, "aarch64_sve_whilerw_b", [IsOverloadWhileRW, VerifyRuntimeMode]>; def SVWHILERW_H : SInst<"svwhilerw[_{1}]", "Pcc", "sUsh", MergeNone, "aarch64_sve_whilerw_h", [IsOverloadWhileRW, VerifyRuntimeMode]>; def SVWHILERW_S : SInst<"svwhilerw[_{1}]", "Pcc", "iUif", MergeNone, "aarch64_sve_whilerw_s", [IsOverloadWhileRW, VerifyRuntimeMode]>; @@ -1913,19 +1935,19 @@ def SVWHILEWR_S : SInst<"svwhilewr[_{1}]", "Pcc", "iUif", MergeNone, "aarch64_sv def SVWHILEWR_D : SInst<"svwhilewr[_{1}]", "Pcc", "lUld", MergeNone, "aarch64_sve_whilewr_d", [IsOverloadWhileRW, VerifyRuntimeMode]>; } -let TargetGuard = "sve2,bf16" in { +let TargetGuard = "(sve2|sme),bf16" in { def SVWHILERW_H_BF16 : SInst<"svwhilerw[_{1}]", "Pcc", "b", MergeNone, "aarch64_sve_whilerw_h", [IsOverloadWhileRW, VerifyRuntimeMode]>; def SVWHILEWR_H_BF16 : SInst<"svwhilewr[_{1}]", "Pcc", "b", MergeNone, "aarch64_sve_whilewr_h", [IsOverloadWhileRW, VerifyRuntimeMode]>; } //////////////////////////////////////////////////////////////////////////////// // SVE2 - Extended table lookup/permute -let TargetGuard = "sve2" in { +let TargetGuard = "sve2|sme" in { def SVTBL2 : SInst<"svtbl2[_{d}]", "d2u", "csilUcUsUiUlhfd", MergeNone, "", [VerifyRuntimeMode]>; def SVTBX : SInst<"svtbx[_{d}]", "dddu", "csilUcUsUiUlhfd", MergeNone, "aarch64_sve_tbx", [VerifyRuntimeMode]>; } -let TargetGuard = "sve2,bf16" in { +let TargetGuard = "(sve2|sme),bf16" in { def SVTBL2_BF16 : SInst<"svtbl2[_{d}]", "d2u", "b", MergeNone, "", [VerifyRuntimeMode]>; def SVTBX_BF16 : SInst<"svtbx[_{d}]", "dddu", "b", MergeNone, "aarch64_sve_tbx", [VerifyRuntimeMode]>; } @@ -2067,7 +2089,7 @@ def SVDOT_LANE_X2_U : SInst<"svdot_lane[_{d}_{2}]", "ddhhi", "Ui", MergeNone, "a def SVDOT_LANE_X2_F : SInst<"svdot_lane[_{d}_{2}]", "ddhhi", "f", MergeNone, "aarch64_sve_fdot_lane_x2", [VerifyRuntimeMode], [ImmCheck<3, ImmCheck0_3>]>; } -let TargetGuard = "sve2p1|sme2" in { +let TargetGuard = "sve2p1|sme" in { def SVSCLAMP : SInst<"svclamp[_{d}]", "dddd", "csil", MergeNone, "aarch64_sve_sclamp", [VerifyRuntimeMode], []>; def SVUCLAMP : SInst<"svclamp[_{d}]", "dddd", "UcUsUiUl", MergeNone, "aarch64_sve_uclamp", [VerifyRuntimeMode], []>; @@ -2233,15 +2255,7 @@ let TargetGuard = "sve2p1" in { def SVTBXQ : SInst<"svtbxq[_{d}]", "dddu", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_tbxq">; // EXTQ def EXTQ : SInst<"svextq[_{d}]", "dddk", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_extq", [], [ImmCheck<2, ImmCheck0_15>]>; - // DUPQ - def SVDUP_LANEQ_B : SInst<"svdup_laneq[_{d}]", "ddi", "cUc", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_15>]>; - def SVDUP_LANEQ_H : SInst<"svdup_laneq[_{d}]", "ddi", "sUsh", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_7>]>; - def SVDUP_LANEQ_S : SInst<"svdup_laneq[_{d}]", "ddi", "iUif", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_3>]>; - def SVDUP_LANEQ_D : SInst<"svdup_laneq[_{d}]", "ddi", "lUld", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_1>]>; - let TargetGuard = "bf16" in { - def SVDUP_LANEQ_BF16 : SInst<"svdup_laneq[_{d}]", "ddi", "b", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_7>]>; - } // PMOV // Move to Pred multiclass PMOV_TO_PRED flags=[], ImmCheckType immCh > { @@ -2264,6 +2278,18 @@ let TargetGuard = "sve2p1" in { defm SVPMOV_TO_VEC_LANE_D : PMOV_TO_VEC<"svpmov", "lUl", "aarch64_sve_pmov_to_vector_lane" ,[], ImmCheck1_7>; } +let TargetGuard = "sve2p1|sme2p1" in { + // DUPQ + def SVDUP_LANEQ_B : SInst<"svdup_laneq[_{d}]", "ddi", "cUc", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_15>]>; + def SVDUP_LANEQ_H : SInst<"svdup_laneq[_{d}]", "ddi", "sUsh", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_7>]>; + def SVDUP_LANEQ_S : SInst<"svdup_laneq[_{d}]", "ddi", "iUif", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_3>]>; + def SVDUP_LANEQ_D : SInst<"svdup_laneq[_{d}]", "ddi", "lUld", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_1>]>; +} + +let TargetGuard = "(sve2p1|sme2p1),bf16" in { + def SVDUP_LANEQ_BF16 : SInst<"svdup_laneq[_{d}]", "ddi", "b", MergeNone, "aarch64_sve_dup_laneq", [VerifyRuntimeMode], [ImmCheck<1, ImmCheck0_7>]>; +} + // // Multi-vector convert to/from floating-point. // diff --git a/clang/include/clang/Basic/arm_sve_sme_incl.td b/clang/include/clang/Basic/arm_sve_sme_incl.td index 37e39255098361b..707f445858067db 100644 --- a/clang/include/clang/Basic/arm_sve_sme_incl.td +++ b/clang/include/clang/Basic/arm_sve_sme_incl.td @@ -272,7 +272,7 @@ class Inst; def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group, Visibility<[ClangOption, FlangOption]>, MetaVarName<"">, HelpText<"Add directory to library search path">; +def embed_dir_EQ : Joined<["--"], "embed-dir=">, Group, + Visibility<[ClangOption, CC1Option]>, MetaVarName<"">, + HelpText<"Add directory to embed search path">; def MD : Flag<["-"], "MD">, Group, HelpText<"Write a depfile containing user and system headers">; def MMD : Flag<["-"], "MMD">, Group, @@ -1477,6 +1480,9 @@ def dD : Flag<["-"], "dD">, Group, Visibility<[ClangOption, CC1Option]> def dI : Flag<["-"], "dI">, Group, Visibility<[ClangOption, CC1Option]>, HelpText<"Print include directives in -E mode in addition to normal output">, MarshallingInfoFlag>; +def dE : Flag<["-"], "dE">, Group, Visibility<[CC1Option]>, + HelpText<"Print embed directives in -E mode in addition to normal output">, + MarshallingInfoFlag>; def dM : Flag<["-"], "dM">, Group, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Print macro definitions in -E mode instead of normal output">; def dead__strip : Flag<["-"], "dead_strip">; diff --git a/clang/include/clang/Frontend/CompilerInvocation.h b/clang/include/clang/Frontend/CompilerInvocation.h index 1a2a39411e58d89..9daa0a1ecf94886 100644 --- a/clang/include/clang/Frontend/CompilerInvocation.h +++ b/clang/include/clang/Frontend/CompilerInvocation.h @@ -305,6 +305,15 @@ class CompilerInvocation : public CompilerInvocationBase { /// executable), for finding the builtin compiler path. static std::string GetResourcesPath(const char *Argv0, void *MainAddr); + /// Populate \p Opts with the default set of pointer authentication-related + /// options given \p LangOpts and \p Triple. + /// + /// Note: This is intended to be used by tools which must be aware of + /// pointer authentication-related code generation, e.g. lldb. + static void setDefaultPointerAuthOptions(PointerAuthOptions &Opts, + const LangOptions &LangOpts, + const llvm::Triple &Triple); + /// Retrieve a module hash string that is suitable for uniquely /// identifying the conditions under which the module was built. std::string getModuleHash() const; diff --git a/clang/include/clang/Frontend/PreprocessorOutputOptions.h b/clang/include/clang/Frontend/PreprocessorOutputOptions.h index 6e19cae33cf283d..654cf22f010f737 100644 --- a/clang/include/clang/Frontend/PreprocessorOutputOptions.h +++ b/clang/include/clang/Frontend/PreprocessorOutputOptions.h @@ -32,6 +32,8 @@ class PreprocessorOutputOptions { LLVM_PREFERRED_TYPE(bool) unsigned ShowIncludeDirectives : 1; ///< Print includes, imports etc. within preprocessed output. LLVM_PREFERRED_TYPE(bool) + unsigned ShowEmbedDirectives : 1; ///< Print embeds, etc. within preprocessed + LLVM_PREFERRED_TYPE(bool) unsigned RewriteIncludes : 1; ///< Preprocess include directives only. LLVM_PREFERRED_TYPE(bool) unsigned RewriteImports : 1; ///< Include contents of transitively-imported modules. @@ -51,6 +53,7 @@ class PreprocessorOutputOptions { ShowMacroComments = 0; ShowMacros = 0; ShowIncludeDirectives = 0; + ShowEmbedDirectives = 0; RewriteIncludes = 0; RewriteImports = 0; MinimizeWhitespace = 0; diff --git a/clang/include/clang/Lex/HeaderSearchOptions.h b/clang/include/clang/Lex/HeaderSearchOptions.h index e4437ac0e35263d..17635146a16146e 100644 --- a/clang/include/clang/Lex/HeaderSearchOptions.h +++ b/clang/include/clang/Lex/HeaderSearchOptions.h @@ -11,7 +11,6 @@ #include "clang/Basic/LLVM.h" #include "llvm/ADT/CachedHashString.h" -#include "llvm/ADT/Hashing.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/HashBuilder.h" @@ -310,21 +309,12 @@ class HeaderSearchOptions { } }; -inline llvm::hash_code hash_value(const HeaderSearchOptions::Entry &E) { - return llvm::hash_combine(E.Path, E.Group, E.IsFramework, E.IgnoreSysRoot); -} - template inline void addHash(llvm::HashBuilder &HBuilder, const HeaderSearchOptions::Entry &E) { HBuilder.add(E.Path, E.Group, E.IsFramework, E.IgnoreSysRoot); } -inline llvm::hash_code -hash_value(const HeaderSearchOptions::SystemHeaderPrefix &SHP) { - return llvm::hash_combine(SHP.Prefix, SHP.IsSystemHeader); -} - template inline void addHash(llvm::HashBuilder &HBuilder, const HeaderSearchOptions::SystemHeaderPrefix &SHP) { diff --git a/clang/include/clang/Lex/PPCallbacks.h b/clang/include/clang/Lex/PPCallbacks.h index dfc74b52686f1e6..46cc564086f1c56 100644 --- a/clang/include/clang/Lex/PPCallbacks.h +++ b/clang/include/clang/Lex/PPCallbacks.h @@ -27,6 +27,7 @@ class IdentifierInfo; class MacroDefinition; class MacroDirective; class MacroArgs; +struct LexEmbedParametersResult; /// This interface provides a way to observe the actions of the /// preprocessor as it does its thing. @@ -83,6 +84,34 @@ class PPCallbacks { const Token &FilenameTok, SrcMgr::CharacteristicKind FileType) {} + /// Callback invoked whenever the preprocessor cannot find a file for an + /// embed directive. + /// + /// \param FileName The name of the file being included, as written in the + /// source code. + /// + /// \returns true to indicate that the preprocessor should skip this file + /// and not issue any diagnostic. + virtual bool EmbedFileNotFound(StringRef FileName) { return false; } + + /// Callback invoked whenever an embed directive has been processed, + /// regardless of whether the embed will actually find a file. + /// + /// \param HashLoc The location of the '#' that starts the embed directive. + /// + /// \param FileName The name of the file being included, as written in the + /// source code. + /// + /// \param IsAngled Whether the file name was enclosed in angle brackets; + /// otherwise, it was enclosed in quotes. + /// + /// \param File The actual file that may be included by this embed directive. + /// + /// \param Params The parameters used by the directive. + virtual void EmbedDirective(SourceLocation HashLoc, StringRef FileName, + bool IsAngled, OptionalFileEntryRef File, + const LexEmbedParametersResult &Params) {} + /// Callback invoked whenever the preprocessor cannot find a file for an /// inclusion directive. /// @@ -333,6 +362,10 @@ class PPCallbacks { SourceRange Range) { } + /// Hook called when a '__has_embed' directive is read. + virtual void HasEmbed(SourceLocation Loc, StringRef FileName, bool IsAngled, + OptionalFileEntryRef File) {} + /// Hook called when a '__has_include' or '__has_include_next' directive is /// read. virtual void HasInclude(SourceLocation Loc, StringRef FileName, bool IsAngled, @@ -464,6 +497,21 @@ class PPChainedCallbacks : public PPCallbacks { Second->FileSkipped(SkippedFile, FilenameTok, FileType); } + bool EmbedFileNotFound(StringRef FileName) override { + bool Skip = First->FileNotFound(FileName); + // Make sure to invoke the second callback, no matter if the first already + // returned true to skip the file. + Skip |= Second->FileNotFound(FileName); + return Skip; + } + + void EmbedDirective(SourceLocation HashLoc, StringRef FileName, bool IsAngled, + OptionalFileEntryRef File, + const LexEmbedParametersResult &Params) override { + First->EmbedDirective(HashLoc, FileName, IsAngled, File, Params); + Second->EmbedDirective(HashLoc, FileName, IsAngled, File, Params); + } + bool FileNotFound(StringRef FileName) override { bool Skip = First->FileNotFound(FileName); // Make sure to invoke the second callback, no matter if the first already @@ -565,6 +613,12 @@ class PPChainedCallbacks : public PPCallbacks { Second->PragmaDiagnostic(Loc, Namespace, mapping, Str); } + void HasEmbed(SourceLocation Loc, StringRef FileName, bool IsAngled, + OptionalFileEntryRef File) override { + First->HasEmbed(Loc, FileName, IsAngled, File); + Second->HasEmbed(Loc, FileName, IsAngled, File); + } + void HasInclude(SourceLocation Loc, StringRef FileName, bool IsAngled, OptionalFileEntryRef File, SrcMgr::CharacteristicKind FileType) override; diff --git a/clang/include/clang/Lex/PPDirectiveParameter.h b/clang/include/clang/Lex/PPDirectiveParameter.h new file mode 100644 index 000000000000000..83f0566d739b10b --- /dev/null +++ b/clang/include/clang/Lex/PPDirectiveParameter.h @@ -0,0 +1,33 @@ +//===--- PPDirectiveParameter.h ---------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines the base class for preprocessor directive parameters, such +// as limit(1) or suffix(x) for #embed. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_LEX_PPDIRECTIVEPARAMETER_H +#define LLVM_CLANG_LEX_PPDIRECTIVEPARAMETER_H + +#include "clang/Basic/SourceLocation.h" + +namespace clang { + +/// Captures basic information about a preprocessor directive parameter. +class PPDirectiveParameter { + SourceRange R; + +public: + PPDirectiveParameter(SourceRange R) : R(R) {} + + SourceRange getParameterRange() const { return R; } +}; + +} // end namespace clang + +#endif diff --git a/clang/include/clang/Lex/PPEmbedParameters.h b/clang/include/clang/Lex/PPEmbedParameters.h new file mode 100644 index 000000000000000..51bf908524e7ab4 --- /dev/null +++ b/clang/include/clang/Lex/PPEmbedParameters.h @@ -0,0 +1,94 @@ +//===--- PPEmbedParameters.h ------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Defines all of the preprocessor directive parmeters for #embed +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_LEX_PPEMBEDPARAMETERS_H +#define LLVM_CLANG_LEX_PPEMBEDPARAMETERS_H + +#include "clang/Lex/PPDirectiveParameter.h" +#include "clang/Lex/Token.h" +#include "llvm/ADT/SmallVector.h" + +namespace clang { + +/// Preprocessor extension embed parameter "clang::offset" +/// `clang::offset( constant-expression )` +class PPEmbedParameterOffset : public PPDirectiveParameter { +public: + size_t Offset; + + PPEmbedParameterOffset(size_t Offset, SourceRange R) + : PPDirectiveParameter(R), Offset(Offset) {} +}; + +/// Preprocessor standard embed parameter "limit" +/// `limit( constant-expression )` +class PPEmbedParameterLimit : public PPDirectiveParameter { +public: + size_t Limit; + + PPEmbedParameterLimit(size_t Limit, SourceRange R) + : PPDirectiveParameter(R), Limit(Limit) {} +}; + +/// Preprocessor standard embed parameter "prefix" +/// `prefix( balanced-token-seq )` +class PPEmbedParameterPrefix : public PPDirectiveParameter { +public: + SmallVector Tokens; + + PPEmbedParameterPrefix(SmallVectorImpl &&Tokens, SourceRange R) + : PPDirectiveParameter(R), Tokens(std::move(Tokens)) {} +}; + +/// Preprocessor standard embed parameter "suffix" +/// `suffix( balanced-token-seq )` +class PPEmbedParameterSuffix : public PPDirectiveParameter { +public: + SmallVector Tokens; + + PPEmbedParameterSuffix(SmallVectorImpl &&Tokens, SourceRange R) + : PPDirectiveParameter(R), Tokens(std::move(Tokens)) {} +}; + +/// Preprocessor standard embed parameter "if_empty" +/// `if_empty( balanced-token-seq )` +class PPEmbedParameterIfEmpty : public PPDirectiveParameter { +public: + SmallVector Tokens; + + PPEmbedParameterIfEmpty(SmallVectorImpl &&Tokens, SourceRange R) + : PPDirectiveParameter(R), Tokens(std::move(Tokens)) {} +}; + +struct LexEmbedParametersResult { + std::optional MaybeLimitParam; + std::optional MaybeOffsetParam; + std::optional MaybeIfEmptyParam; + std::optional MaybePrefixParam; + std::optional MaybeSuffixParam; + SourceRange ParamRange; + int UnrecognizedParams; + + size_t PrefixTokenCount() const { + if (MaybePrefixParam) + return MaybePrefixParam->Tokens.size(); + return 0; + } + size_t SuffixTokenCount() const { + if (MaybeSuffixParam) + return MaybeSuffixParam->Tokens.size(); + return 0; + } +}; +} // end namespace clang + +#endif diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index 9d8a1aae23df3e9..be3334b9807463c 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -29,8 +29,10 @@ #include "clang/Lex/ModuleLoader.h" #include "clang/Lex/ModuleMap.h" #include "clang/Lex/PPCallbacks.h" +#include "clang/Lex/PPEmbedParameters.h" #include "clang/Lex/Token.h" #include "clang/Lex/TokenLexer.h" +#include "llvm/ADT/APSInt.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" @@ -119,6 +121,13 @@ enum MacroUse { MU_Undef = 2 }; +enum class EmbedResult { + Invalid = -1, // Parsing error occurred. + NotFound = 0, // Corresponds to __STDC_EMBED_NOT_FOUND__ + Found = 1, // Corresponds to __STDC_EMBED_FOUND__ + Empty = 2, // Corresponds to __STDC_EMBED_EMPTY__ +}; + /// Engages in a tight little dance with the lexer to efficiently /// preprocess tokens. /// @@ -165,6 +174,7 @@ class Preprocessor { IdentifierInfo *Ident__has_builtin; // __has_builtin IdentifierInfo *Ident__has_constexpr_builtin; // __has_constexpr_builtin IdentifierInfo *Ident__has_attribute; // __has_attribute + IdentifierInfo *Ident__has_embed; // __has_embed IdentifierInfo *Ident__has_include; // __has_include IdentifierInfo *Ident__has_include_next; // __has_include_next IdentifierInfo *Ident__has_warning; // __has_warning @@ -1734,6 +1744,10 @@ class Preprocessor { /// Lex a token, forming a header-name token if possible. bool LexHeaderName(Token &Result, bool AllowMacroExpansion = true); + /// Lex the parameters for an #embed directive, returns nullopt on error. + std::optional LexEmbedParameters(Token &Current, + bool ForHasEmbed); + bool LexAfterModuleImport(Token &Result); void CollectPpImportSuffix(SmallVectorImpl &Toks); @@ -2314,7 +2328,13 @@ class Preprocessor { /// Read and discard all tokens remaining on the current line until /// the tok::eod token is found. Returns the range of the skipped tokens. - SourceRange DiscardUntilEndOfDirective(); + SourceRange DiscardUntilEndOfDirective() { + Token Tmp; + return DiscardUntilEndOfDirective(Tmp); + } + + /// Same as above except retains the token that was found. + SourceRange DiscardUntilEndOfDirective(Token &Tok); /// Returns true if the preprocessor has seen a use of /// __DATE__ or __TIME__ in the file so far. @@ -2419,6 +2439,18 @@ class Preprocessor { bool *IsFrameworkFound, bool SkipCache = false, bool OpenFile = true, bool CacheFailures = true); + /// Given a "Filename" or \ reference, look up the indicated embed + /// resource. \p isAngled indicates whether the file reference is for + /// system \#include's or not (i.e. using <> instead of ""). If \p OpenFile + /// is true, the file looked up is opened for reading, otherwise it only + /// validates that the file exists. Quoted filenames are looked up relative + /// to \p LookupFromFile if it is nonnull. + /// + /// Returns std::nullopt on failure. + OptionalFileEntryRef + LookupEmbedFile(StringRef Filename, bool isAngled, bool OpenFile, + const FileEntry *LookupFromFile = nullptr); + /// Return true if we're in the top-level file, not in a \#include. bool isInPrimaryFile() const; @@ -2524,6 +2556,9 @@ class Preprocessor { /// Information about the result for evaluating an expression for a /// preprocessor directive. struct DirectiveEvalResult { + /// The integral value of the expression. + std::optional Value; + /// Whether the expression was evaluated as true or not. bool Conditional; @@ -2538,7 +2573,25 @@ class Preprocessor { /// \#if or \#elif directive and return a \p DirectiveEvalResult object. /// /// If the expression is equivalent to "!defined(X)" return X in IfNDefMacro. - DirectiveEvalResult EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro); + DirectiveEvalResult EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro, + bool CheckForEoD = true); + + /// Evaluate an integer constant expression that may occur after a + /// \#if or \#elif directive and return a \p DirectiveEvalResult object. + /// + /// If the expression is equivalent to "!defined(X)" return X in IfNDefMacro. + /// \p EvaluatedDefined will contain the result of whether "defined" appeared + /// in the evaluated expression or not. + DirectiveEvalResult EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro, + Token &Tok, + bool &EvaluatedDefined, + bool CheckForEoD = true); + + /// Process a '__has_embed("path" [, ...])' expression. + /// + /// Returns predefined `__STDC_EMBED_*` macro values if + /// successful. + EmbedResult EvaluateHasEmbed(Token &Tok, IdentifierInfo *II); /// Process a '__has_include("path")' expression. /// @@ -2686,6 +2739,12 @@ class Preprocessor { const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl &RelativePath, SmallVectorImpl &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled); + // Binary data inclusion + void HandleEmbedDirective(SourceLocation HashLoc, Token &Tok, + const FileEntry *LookupFromFile = nullptr); + void HandleEmbedDirectiveImpl(SourceLocation HashLoc, + const LexEmbedParametersResult &Params, + StringRef BinaryContents); // File inclusion. void HandleIncludeDirective(SourceLocation HashLoc, Token &Tok, @@ -3002,6 +3061,12 @@ class EmptylineHandler { virtual void HandleEmptyline(SourceRange Range) = 0; }; +/// Helper class to shuttle information about #embed directives from the +/// preprocessor to the parser through an annotation token. +struct EmbedAnnotationData { + StringRef BinaryData; +}; + /// Registry of pragma handlers added by plugins using PragmaHandlerRegistry = llvm::Registry; diff --git a/clang/include/clang/Lex/PreprocessorOptions.h b/clang/include/clang/Lex/PreprocessorOptions.h index 635971d0ce5ee8c..c2e3d68333024a5 100644 --- a/clang/include/clang/Lex/PreprocessorOptions.h +++ b/clang/include/clang/Lex/PreprocessorOptions.h @@ -170,6 +170,9 @@ class PreprocessorOptions { /// of the specified memory buffer (the second part of each pair). std::vector> RemappedFileBuffers; + /// User specified embed entries. + std::vector EmbedEntries; + /// Whether the compiler instance should retain (i.e., not free) /// the buffers associated with remapped files. /// diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index d054b8cf0d24057..95c0655f9a21454 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -2122,6 +2122,8 @@ class Parser : public CodeCompletionHandler { QualType PreferredBaseType; }; ExprResult ParseInitializerWithPotentialDesignator(DesignatorCompletionInfo); + ExprResult createEmbedExpr(); + void ExpandEmbedDirective(SmallVectorImpl &Exprs); //===--------------------------------------------------------------------===// // clang Expressions @@ -3813,6 +3815,7 @@ class Parser : public CodeCompletionHandler { AnnotateTemplateIdTokenAsType(CXXScopeSpec &SS, ImplicitTypenameContext AllowImplicitTypename, bool IsClassName = false); + void ExpandEmbedIntoTemplateArgList(TemplateArgList &TemplateArgs); bool ParseTemplateArgumentList(TemplateArgList &TemplateArgs, TemplateTy Template, SourceLocation OpenLoc); ParsedTemplateArgument ParseTemplateTemplateArgument(); diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 174b9dbc6d980c7..e43e5f465361d5a 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -4031,8 +4031,8 @@ class Sema final : public SemaBase { const ParsedAttributesView &AttrList); Decl *ActOnUsingEnumDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, - SourceLocation EnumLoc, - SourceLocation IdentLoc, IdentifierInfo &II, + SourceLocation EnumLoc, SourceRange TyLoc, + const IdentifierInfo &II, ParsedType Ty, CXXScopeSpec *SS = nullptr); Decl *ActOnAliasDeclaration(Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, @@ -5735,6 +5735,10 @@ class Sema final : public SemaBase { SourceLocation BuiltinLoc, SourceLocation RPLoc); + // #embed + ExprResult ActOnEmbedExpr(SourceLocation EmbedKeywordLoc, + StringLiteral *BinaryData); + // Build a potentially resolved SourceLocExpr. ExprResult BuildSourceLocExpr(SourceLocIdentKind Kind, QualType ResultTy, SourceLocation BuiltinLoc, SourceLocation RPLoc, diff --git a/clang/include/clang/Serialization/ASTBitCodes.h b/clang/include/clang/Serialization/ASTBitCodes.h index 570b08853241456..38502a23f805e58 100644 --- a/clang/include/clang/Serialization/ASTBitCodes.h +++ b/clang/include/clang/Serialization/ASTBitCodes.h @@ -26,6 +26,7 @@ #include "clang/Serialization/SourceLocationEncoding.h" #include "llvm/ADT/DenseMapInfo.h" #include "llvm/Bitstream/BitCodes.h" +#include "llvm/Support/MathExtras.h" #include #include @@ -70,41 +71,64 @@ using DeclID = DeclIDBase::DeclID; /// An ID number that refers to a type in an AST file. /// -/// The ID of a type is partitioned into two parts: the lower -/// three bits are used to store the const/volatile/restrict -/// qualifiers (as with QualType) and the upper bits provide a -/// type index. The type index values are partitioned into two +/// The ID of a type is partitioned into three parts: +/// - the lower three bits are used to store the const/volatile/restrict +/// qualifiers (as with QualType). +/// - the next 29 bits provide a type index in the corresponding +/// module file. +/// - the upper 32 bits provide a module file index. +/// +/// The type index values are partitioned into two /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a -/// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are -/// other types that have serialized representations. -using TypeID = uint32_t; +/// placeholder for "no type". The module file index for predefined +/// types are always 0 since they don't belong to any modules. +/// Values from NUM_PREDEF_TYPE_IDs are other types that have +/// serialized representations. +using TypeID = uint64_t; +/// Same with TypeID except that the LocalTypeID is only meaningful +/// with the corresponding ModuleFile. +/// +/// FIXME: Make TypeID and LocalTypeID a class to improve the type +/// safety. +using LocalTypeID = TypeID; /// A type index; the type ID with the qualifier bits removed. +/// Keep structure alignment 32-bit since the blob is assumed as 32-bit +/// aligned. class TypeIdx { + uint32_t ModuleFileIndex = 0; uint32_t Idx = 0; public: TypeIdx() = default; - explicit TypeIdx(uint32_t index) : Idx(index) {} - uint32_t getIndex() const { return Idx; } + explicit TypeIdx(uint32_t ModuleFileIdx, uint32_t Idx) + : ModuleFileIndex(ModuleFileIdx), Idx(Idx) {} + + uint32_t getModuleFileIndex() const { return ModuleFileIndex; } + + uint64_t getValue() const { return ((uint64_t)ModuleFileIndex << 32) | Idx; } TypeID asTypeID(unsigned FastQuals) const { if (Idx == uint32_t(-1)) return TypeID(-1); - return (Idx << Qualifiers::FastWidth) | FastQuals; + unsigned Index = (Idx << Qualifiers::FastWidth) | FastQuals; + return ((uint64_t)ModuleFileIndex << 32) | Index; } static TypeIdx fromTypeID(TypeID ID) { if (ID == TypeID(-1)) - return TypeIdx(-1); + return TypeIdx(0, -1); - return TypeIdx(ID >> Qualifiers::FastWidth); + return TypeIdx(ID >> 32, (ID & llvm::maskTrailingOnes(32)) >> + Qualifiers::FastWidth); } }; +static_assert(alignof(TypeIdx) == 4); + /// A structure for putting "fast"-unqualified QualTypes into a /// DenseMap. This uses the standard pointer hash function. struct UnsafeQualTypeDenseMapInfo { @@ -1658,6 +1682,9 @@ enum StmtCode { /// A SourceLocExpr record. EXPR_SOURCE_LOC, + /// A EmbedExpr record. + EXPR_BUILTIN_PP_EMBED, + /// A ShuffleVectorExpr record. EXPR_SHUFFLE_VECTOR, diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h index 0e95d82928459c6..f41c473c97cd920 100644 --- a/clang/include/clang/Serialization/ASTReader.h +++ b/clang/include/clang/Serialization/ASTReader.h @@ -491,14 +491,6 @@ class ASTReader /// ID = (I + 1) << FastQual::Width has already been loaded llvm::PagedVector TypesLoaded; - using GlobalTypeMapType = - ContinuousRangeMap; - - /// Mapping from global type IDs to the module in which the - /// type resides along with the offset that should be added to the - /// global type ID to produce a local ID. - GlobalTypeMapType GlobalTypeMap; - /// Declarations that have already been loaded from the chain. /// /// When the pointer at index I is non-NULL, the declaration with ID @@ -1429,8 +1421,8 @@ class ASTReader RecordLocation(ModuleFile *M, uint64_t O) : F(M), Offset(O) {} }; - QualType readTypeRecord(unsigned Index); - RecordLocation TypeCursorForIndex(unsigned Index); + QualType readTypeRecord(serialization::TypeID ID); + RecordLocation TypeCursorForIndex(serialization::TypeID ID); void LoadedDecl(unsigned Index, Decl *D); Decl *ReadDeclRecord(GlobalDeclID ID); void markIncompleteDeclChain(Decl *D); @@ -1544,6 +1536,11 @@ class ASTReader std::pair translateIdentifierIDToIndex(serialization::IdentifierID ID) const; + /// Translate an \param TypeID ID to the index of TypesLoaded + /// array and the corresponding module file. + std::pair + translateTypeIDToIndex(serialization::TypeID ID) const; + public: /// Load the AST file and validate its contents against the given /// Preprocessor. @@ -1892,10 +1889,11 @@ class ASTReader QualType GetType(serialization::TypeID ID); /// Resolve a local type ID within a given AST file into a type. - QualType getLocalType(ModuleFile &F, unsigned LocalID); + QualType getLocalType(ModuleFile &F, serialization::LocalTypeID LocalID); /// Map a local type ID within a given AST file into a global type ID. - serialization::TypeID getGlobalTypeID(ModuleFile &F, unsigned LocalID) const; + serialization::TypeID + getGlobalTypeID(ModuleFile &F, serialization::LocalTypeID LocalID) const; /// Read a type from the current position in the given record, which /// was read from the given AST file. diff --git a/clang/include/clang/Serialization/ASTRecordReader.h b/clang/include/clang/Serialization/ASTRecordReader.h index d00fb182f05f4e3..2561418b78ca7f0 100644 --- a/clang/include/clang/Serialization/ASTRecordReader.h +++ b/clang/include/clang/Serialization/ASTRecordReader.h @@ -163,7 +163,7 @@ class ASTRecordReader void readTypeLoc(TypeLoc TL, LocSeq *Seq = nullptr); /// Map a local type ID within a given AST file to a global type ID. - serialization::TypeID getGlobalTypeID(unsigned LocalID) const { + serialization::TypeID getGlobalTypeID(serialization::TypeID LocalID) const { return Reader->getGlobalTypeID(*F, LocalID); } diff --git a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h index ce79c75dc2911d0..71a7c28047e3189 100644 --- a/clang/include/clang/Serialization/ASTWriter.h +++ b/clang/include/clang/Serialization/ASTWriter.h @@ -228,6 +228,11 @@ class ASTWriter : public ASTDeserializationListener, /// unit, while 0 is reserved for NULL. llvm::DenseMap DeclIDs; + /// Set of predefined decls. This is a helper data to determine if a decl + /// is predefined. It should be more clear and safer to query the set + /// instead of comparing the result of `getDeclID()` or `GetDeclRef()`. + llvm::SmallPtrSet PredefinedDecls; + /// Offset of each declaration in the bitstream, indexed by /// the declaration's ID. std::vector DeclOffsets; @@ -563,8 +568,6 @@ class ASTWriter : public ASTDeserializationListener, void WriteType(QualType T); bool isLookupResultExternal(StoredDeclsList &Result, DeclContext *DC); - bool isLookupResultEntirelyExternalOrUnreachable(StoredDeclsList &Result, - DeclContext *DC); void GenerateNameLookupTable(const DeclContext *DC, llvm::SmallVectorImpl &LookupTable); @@ -844,6 +847,8 @@ class ASTWriter : public ASTDeserializationListener, bool hasChain() const { return Chain; } ASTReader *getChain() const { return Chain; } + bool isWritingModule() const { return WritingModule; } + bool isWritingStdCXXNamedModules() const { return WritingModule && WritingModule->isNamedModule(); } @@ -852,6 +857,10 @@ class ASTWriter : public ASTDeserializationListener, bool getDoneWritingDeclsAndTypes() const { return DoneWritingDeclsAndTypes; } + bool isDeclPredefined(const Decl *D) const { + return PredefinedDecls.count(D); + } + void handleVTable(CXXRecordDecl *RD); private: diff --git a/clang/include/clang/Serialization/ModuleFile.h b/clang/include/clang/Serialization/ModuleFile.h index 3787f4eeb8a8b14..3e920c0f683601d 100644 --- a/clang/include/clang/Serialization/ModuleFile.h +++ b/clang/include/clang/Serialization/ModuleFile.h @@ -482,9 +482,6 @@ class ModuleFile { /// the global type ID space. serialization::TypeID BaseTypeIndex = 0; - /// Remapping table for type IDs in this module. - ContinuousRangeMap TypeRemap; - // === Miscellaneous === /// Diagnostic IDs and their mappings that the user changed. diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index a4e6d3b108c8a5c..fca200988fea198 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -11546,6 +11546,10 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, Type = Context.SveCountTy; break; } + case 'b': { + Type = Context.AMDGPUBufferRsrcTy; + break; + } default: llvm_unreachable("Unexpected target builtin type"); } @@ -13698,14 +13702,10 @@ QualType ASTContext::getCorrespondingSignedFixedPointType(QualType Ty) const { static std::vector getFMVBackendFeaturesFor( const llvm::SmallVectorImpl &FMVFeatStrings) { std::vector BackendFeats; - for (StringRef F : FMVFeatStrings) { - if (auto FMVExt = llvm::AArch64::parseArchExtension(F)) { - SmallVector Feats; - FMVExt->DependentFeatures.split(Feats, ',', -1, false); - for (StringRef F : Feats) + for (StringRef F : FMVFeatStrings) + if (auto FMVExt = llvm::AArch64::parseFMVExtension(F)) + for (StringRef F : FMVExt->getImpliedFeatures()) BackendFeats.push_back(F.str()); - } - } return BackendFeats; } diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index 1b67feaae887482..4e1b3a5a94de760 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -6565,6 +6565,11 @@ ExpectedDecl ASTNodeImporter::VisitVarTemplateSpecializationDecl( return D2; } + // Update InsertPos, because preceding import calls may have invalidated + // it by adding new specializations. + if (!VarTemplate->findSpecialization(TemplateArgs, InsertPos)) + VarTemplate->AddSpecialization(D2, InsertPos); + QualType T; if (Error Err = importInto(T, D->getType())) return std::move(Err); @@ -6603,8 +6608,6 @@ ExpectedDecl ASTNodeImporter::VisitVarTemplateSpecializationDecl( if (FoundSpecialization) D2->setPreviousDecl(FoundSpecialization->getMostRecentDecl()); - VarTemplate->AddSpecialization(D2, InsertPos); - addDeclToContexts(D, D2); // Import the rest of the chain. I.e. import all subsequent declarations. diff --git a/clang/lib/AST/CommentParser.cpp b/clang/lib/AST/CommentParser.cpp index 5baf81a509fb606..d5e5bb27ceba3ca 100644 --- a/clang/lib/AST/CommentParser.cpp +++ b/clang/lib/AST/CommentParser.cpp @@ -222,6 +222,63 @@ class TextTokenRetokenizer { return true; } + // Check if this line starts with @par or \par + bool startsWithParCommand() { + unsigned Offset = 1; + + // Skip all whitespace characters at the beginning. + // This needs to backtrack because Pos has already advanced past the + // actual \par or @par command by the time this function is called. + while (isWhitespace(*(Pos.BufferPtr - Offset))) + Offset++; + + // Once we've reached the whitespace, backtrack and check if the previous + // four characters are \par or @par. + llvm::StringRef LineStart(Pos.BufferPtr - Offset - 3, 4); + return LineStart.starts_with("\\par") || LineStart.starts_with("@par"); + } + + /// Extract a par command argument-header. + bool lexParHeading(Token &Tok) { + if (isEnd()) + return false; + + Position SavedPos = Pos; + + consumeWhitespace(); + SmallString<32> WordText; + const char *WordBegin = Pos.BufferPtr; + SourceLocation Loc = getSourceLocation(); + + if (!startsWithParCommand()) + return false; + + // Read until the end of this token, which is effectively the end of the + // line. This gets us the content of the par header, if there is one. + while (!isEnd()) { + WordText.push_back(peek()); + if (Pos.BufferPtr + 1 == Pos.BufferEnd) { + consumeChar(); + break; + } + consumeChar(); + } + + unsigned Length = WordText.size(); + if (Length == 0) { + Pos = SavedPos; + return false; + } + + char *TextPtr = Allocator.Allocate(Length + 1); + + memcpy(TextPtr, WordText.c_str(), Length + 1); + StringRef Text = StringRef(TextPtr, Length); + + formTokenWithChars(Tok, Loc, WordBegin, Length, Text); + return true; + } + /// Extract a word -- sequence of non-whitespace characters. bool lexWord(Token &Tok) { if (isEnd()) @@ -394,6 +451,24 @@ Parser::parseThrowCommandArgs(TextTokenRetokenizer &Retokenizer, return llvm::ArrayRef(Args, ParsedArgs); } +ArrayRef +Parser::parseParCommandArgs(TextTokenRetokenizer &Retokenizer, + unsigned NumArgs) { + assert(NumArgs > 0); + auto *Args = new (Allocator.Allocate(NumArgs)) + Comment::Argument[NumArgs]; + unsigned ParsedArgs = 0; + Token Arg; + + while (ParsedArgs < NumArgs && Retokenizer.lexParHeading(Arg)) { + Args[ParsedArgs] = Comment::Argument{ + SourceRange(Arg.getLocation(), Arg.getEndLocation()), Arg.getText()}; + ParsedArgs++; + } + + return llvm::ArrayRef(Args, ParsedArgs); +} + BlockCommandComment *Parser::parseBlockCommand() { assert(Tok.is(tok::backslash_command) || Tok.is(tok::at_command)); @@ -449,6 +524,9 @@ BlockCommandComment *Parser::parseBlockCommand() { else if (Info->IsThrowsCommand) S.actOnBlockCommandArgs( BC, parseThrowCommandArgs(Retokenizer, Info->NumArgs)); + else if (Info->IsParCommand) + S.actOnBlockCommandArgs(BC, + parseParCommandArgs(Retokenizer, Info->NumArgs)); else S.actOnBlockCommandArgs(BC, parseCommandArgs(Retokenizer, Info->NumArgs)); diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 37ba5b69f446dea..6af1b5683e08bc4 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -2373,6 +2373,17 @@ APValue SourceLocExpr::EvaluateInContext(const ASTContext &Ctx, llvm_unreachable("unhandled case"); } +EmbedExpr::EmbedExpr(const ASTContext &Ctx, SourceLocation Loc, + EmbedDataStorage *Data, unsigned Begin, + unsigned NumOfElements) + : Expr(EmbedExprClass, Ctx.UnsignedCharTy, VK_PRValue, OK_Ordinary), + EmbedKeywordLoc(Loc), Ctx(&Ctx), Data(Data), Begin(Begin), + NumOfElements(NumOfElements) { + setDependence(ExprDependence::None); + FakeChildNode = IntegerLiteral::Create( + Ctx, llvm::APInt::getZero(Ctx.getTypeSize(getType())), getType(), Loc); +} + InitListExpr::InitListExpr(const ASTContext &C, SourceLocation lbraceloc, ArrayRef initExprs, SourceLocation rbraceloc) : Expr(InitListExprClass, QualType(), VK_PRValue, OK_Ordinary), @@ -3615,6 +3626,7 @@ bool Expr::HasSideEffects(const ASTContext &Ctx, case CXXUuidofExprClass: case OpaqueValueExprClass: case SourceLocExprClass: + case EmbedExprClass: case ConceptSpecializationExprClass: case RequiresExprClass: case SYCLUniqueStableNameExprClass: diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp index 390000e3ed38350..6482cb6d39acc62 100644 --- a/clang/lib/AST/ExprClassification.cpp +++ b/clang/lib/AST/ExprClassification.cpp @@ -204,6 +204,11 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) { case Expr::RequiresExprClass: return Cl::CL_PRValue; + case Expr::EmbedExprClass: + // Nominally, this just goes through as a PRValue until we actually expand + // it and check it. + return Cl::CL_PRValue; + // Make HLSL this reference-like case Expr::CXXThisExprClass: return Lang.HLSL ? Cl::CL_LValue : Cl::CL_PRValue; diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 37a869c12e56d25..fe4b9a569ab8741 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -58,6 +58,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Debug.h" #include "llvm/Support/SaveAndRestore.h" +#include "llvm/Support/SipHash.h" #include "llvm/Support/TimeProfiler.h" #include "llvm/Support/raw_ostream.h" #include @@ -2041,6 +2042,7 @@ static bool IsNoOpCall(const CallExpr *E) { unsigned Builtin = E->getBuiltinCallee(); return (Builtin == Builtin::BI__builtin___CFStringMakeConstantString || Builtin == Builtin::BI__builtin___NSStringMakeConstantString || + Builtin == Builtin::BI__builtin_ptrauth_sign_constant || Builtin == Builtin::BI__builtin_function_start); } @@ -7727,6 +7729,11 @@ class ExprEvaluatorBase return Error(E); } + bool VisitEmbedExpr(const EmbedExpr *E) { + const auto It = E->begin(); + return StmtVisitorTy::Visit(*It); + } + bool VisitPredefinedExpr(const PredefinedExpr *E) { return StmtVisitorTy::Visit(E->getFunctionName()); } @@ -9145,6 +9152,11 @@ class PointerExprEvaluator return true; } + bool VisitEmbedExpr(const EmbedExpr *E) { + llvm::report_fatal_error("Not yet implemented for ExprConstant.cpp"); + return true; + } + bool VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *E) { std::string ResultStr = E->ComputeName(Info.Ctx); @@ -10535,48 +10547,37 @@ bool RecordExprEvaluator::VisitCXXStdInitializerListExpr( // Get a pointer to the first element of the array. Array.addArray(Info, E, ArrayType); - auto InvalidType = [&] { - Info.FFDiag(E, diag::note_constexpr_unsupported_layout) - << E->getType(); - return false; - }; - - // FIXME: Perform the checks on the field types in SemaInit. - RecordDecl *Record = E->getType()->castAs()->getDecl(); - RecordDecl::field_iterator Field = Record->field_begin(); - if (Field == Record->field_end()) - return InvalidType(); - - // Start pointer. - if (!Field->getType()->isPointerType() || - !Info.Ctx.hasSameType(Field->getType()->getPointeeType(), - ArrayType->getElementType())) - return InvalidType(); - // FIXME: What if the initializer_list type has base classes, etc? Result = APValue(APValue::UninitStruct(), 0, 2); Array.moveInto(Result.getStructField(0)); - if (++Field == Record->field_end()) - return InvalidType(); - - if (Field->getType()->isPointerType() && - Info.Ctx.hasSameType(Field->getType()->getPointeeType(), - ArrayType->getElementType())) { + RecordDecl *Record = E->getType()->castAs()->getDecl(); + RecordDecl::field_iterator Field = Record->field_begin(); + assert(Field != Record->field_end() && + Info.Ctx.hasSameType(Field->getType()->getPointeeType(), + ArrayType->getElementType()) && + "Expected std::initializer_list first field to be const E *"); + ++Field; + assert(Field != Record->field_end() && + "Expected std::initializer_list to have two fields"); + + if (Info.Ctx.hasSameType(Field->getType(), Info.Ctx.getSizeType())) { + // Length. + Result.getStructField(1) = APValue(APSInt(ArrayType->getSize())); + } else { // End pointer. + assert(Info.Ctx.hasSameType(Field->getType()->getPointeeType(), + ArrayType->getElementType()) && + "Expected std::initializer_list second field to be const E *"); if (!HandleLValueArrayAdjustment(Info, E, Array, ArrayType->getElementType(), ArrayType->getZExtSize())) return false; Array.moveInto(Result.getStructField(1)); - } else if (Info.Ctx.hasSameType(Field->getType(), Info.Ctx.getSizeType())) - // Length. - Result.getStructField(1) = APValue(APSInt(ArrayType->getSize())); - else - return InvalidType(); + } - if (++Field != Record->field_end()) - return InvalidType(); + assert(++Field == Record->field_end() && + "Expected std::initializer_list to only have two fields"); return true; } @@ -11256,8 +11257,17 @@ bool ArrayExprEvaluator::VisitCXXParenListOrInitListExpr( // If the initializer might depend on the array index, run it for each // array element. - if (NumEltsToInit != NumElts && MaybeElementDependentArrayFiller(ArrayFiller)) + if (NumEltsToInit != NumElts && + MaybeElementDependentArrayFiller(ArrayFiller)) { NumEltsToInit = NumElts; + } else { + for (auto *Init : Args) { + if (auto *EmbedS = dyn_cast(Init->IgnoreParenImpCasts())) + NumEltsToInit += EmbedS->getDataElementCount() - 1; + } + if (NumEltsToInit > NumElts) + NumEltsToInit = NumElts; + } LLVM_DEBUG(llvm::dbgs() << "The number of elements to initialize: " << NumEltsToInit << ".\n"); @@ -11275,16 +11285,49 @@ bool ArrayExprEvaluator::VisitCXXParenListOrInitListExpr( LValue Subobject = This; Subobject.addArray(Info, ExprToVisit, CAT); - for (unsigned Index = 0; Index != NumEltsToInit; ++Index) { - const Expr *Init = Index < Args.size() ? Args[Index] : ArrayFiller; - if (!EvaluateInPlace(Result.getArrayInitializedElt(Index), - Info, Subobject, Init) || + auto Eval = [&](const Expr *Init, unsigned ArrayIndex) { + if (!EvaluateInPlace(Result.getArrayInitializedElt(ArrayIndex), Info, + Subobject, Init) || !HandleLValueArrayAdjustment(Info, Init, Subobject, CAT->getElementType(), 1)) { if (!Info.noteFailure()) return false; Success = false; } + return true; + }; + unsigned ArrayIndex = 0; + QualType DestTy = CAT->getElementType(); + APSInt Value(Info.Ctx.getTypeSize(DestTy), DestTy->isUnsignedIntegerType()); + for (unsigned Index = 0; Index != NumEltsToInit; ++Index) { + const Expr *Init = Index < Args.size() ? Args[Index] : ArrayFiller; + if (ArrayIndex >= NumEltsToInit) + break; + if (auto *EmbedS = dyn_cast(Init->IgnoreParenImpCasts())) { + StringLiteral *SL = EmbedS->getDataStringLiteral(); + for (unsigned I = EmbedS->getStartingElementPos(), + N = EmbedS->getDataElementCount(); + I != EmbedS->getStartingElementPos() + N; ++I) { + Value = SL->getCodeUnit(I); + if (DestTy->isIntegerType()) { + Result.getArrayInitializedElt(ArrayIndex) = APValue(Value); + } else { + assert(DestTy->isFloatingType() && "unexpected type"); + const FPOptions FPO = + Init->getFPFeaturesInEffect(Info.Ctx.getLangOpts()); + APFloat FValue(0.0); + if (!HandleIntToFloatCast(Info, Init, FPO, EmbedS->getType(), Value, + DestTy, FValue)) + return false; + Result.getArrayInitializedElt(ArrayIndex) = APValue(FValue); + } + ArrayIndex++; + } + } else { + if (!Eval(Init, ArrayIndex)) + return false; + ++ArrayIndex; + } } if (!Result.hasArrayFiller()) @@ -12592,6 +12635,13 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, case Builtin::BI__builtin_expect_with_probability: return Visit(E->getArg(0)); + case Builtin::BI__builtin_ptrauth_string_discriminator: { + const auto *Literal = + cast(E->getArg(0)->IgnoreParenImpCasts()); + uint64_t Result = getPointerAuthStableSipHash(Literal->getString()); + return Success(Result, E); + } + case Builtin::BI__builtin_ffs: case Builtin::BI__builtin_ffsl: case Builtin::BI__builtin_ffsll: { @@ -16390,6 +16440,7 @@ static ICEDiag CheckICE(const Expr* E, const ASTContext &Ctx) { case Expr::SizeOfPackExprClass: case Expr::GNUNullExprClass: case Expr::SourceLocExprClass: + case Expr::EmbedExprClass: return NoDiag(); case Expr::PackIndexingExprClass: diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 06e54e4baaaf535..edc2ec8e50952c2 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -34,11 +34,13 @@ template class DeclScope final : public VariableScope { OldInitializingDecl(Ctx->InitializingDecl) { Ctx->GlobalDecl = Context::shouldBeGloballyIndexed(VD); Ctx->InitializingDecl = VD; + Ctx->InitStack.push_back(InitLink::Decl(VD)); } ~DeclScope() { this->Ctx->GlobalDecl = OldGlobalDecl; this->Ctx->InitializingDecl = OldInitializingDecl; + this->Ctx->InitStack.pop_back(); } private: @@ -72,6 +74,20 @@ template class OptionScope final { bool OldInitializing; }; +template +bool InitLink::emit(ByteCodeExprGen *Ctx, const Expr *E) const { + switch (Kind) { + case K_This: + return Ctx->emitThis(E); + case K_Field: + // We're assuming there's a base pointer on the stack already. + return Ctx->emitGetPtrFieldPop(Offset, E); + case K_Decl: + return Ctx->visitDeclRef(D, E); + } + return true; +} + } // namespace interp } // namespace clang @@ -1332,9 +1348,27 @@ bool ByteCodeExprGen::visitInitList(ArrayRef Inits, unsigned ElementIndex = 0; for (const Expr *Init : Inits) { - if (!this->visitArrayElemInit(ElementIndex, Init)) - return false; - ++ElementIndex; + if (const auto *EmbedS = + dyn_cast(Init->IgnoreParenImpCasts())) { + PrimType TargetT = classifyPrim(Init->getType()); + + auto Eval = [&](const Expr *Init, unsigned ElemIndex) { + PrimType InitT = classifyPrim(Init->getType()); + if (!this->visit(Init)) + return false; + if (InitT != TargetT) { + if (!this->emitCast(InitT, TargetT, E)) + return false; + } + return this->emitInitElem(TargetT, ElemIndex, Init); + }; + if (!EmbedS->doForEachDataElement(Eval, ElementIndex)) + return false; + } else { + if (!this->visitArrayElemInit(ElementIndex, Init)) + return false; + ++ElementIndex; + } } // Expand the filler expression. @@ -1480,6 +1514,12 @@ bool ByteCodeExprGen::VisitConstantExpr(const ConstantExpr *E) { return this->delegate(E->getSubExpr()); } +template +bool ByteCodeExprGen::VisitEmbedExpr(const EmbedExpr *E) { + auto It = E->begin(); + return this->visit(*It); +} + static CharUnits AlignOfType(QualType T, const ASTContext &ASTCtx, UnaryExprOrTypeTrait Kind) { bool AlignOfReturnsPreferred = @@ -3717,7 +3757,12 @@ template bool ByteCodeExprGen::VisitCXXDefaultInitExpr( const CXXDefaultInitExpr *E) { SourceLocScope SLS(this, E); - return this->delegate(E->getExpr()); + + bool Old = InitStackActive; + InitStackActive = !isa(E->getUsedContext()); + bool Result = this->delegate(E->getExpr()); + InitStackActive = Old; + return Result; } template @@ -3773,6 +3818,17 @@ bool ByteCodeExprGen::VisitCXXThisExpr(const CXXThisExpr *E) { return this->emitGetPtrThisField(this->LambdaThisCapture.Offset, E); } + // In some circumstances, the 'this' pointer does not actually refer to the + // instance pointer of the current function frame, but e.g. to the declaration + // currently being initialized. Here we emit the necessary instruction(s) for + // this scenario. + if (InitStackActive && !InitStack.empty()) { + for (const InitLink &IL : InitStack) { + if (!IL.emit(this, E)) + return false; + } + return true; + } return this->emitThis(E); } @@ -4194,7 +4250,7 @@ bool ByteCodeExprGen::visitDeclRef(const ValueDecl *D, const Expr *E) { if (E->getType()->isVoidType()) return true; // Convert the dummy pointer to another pointer type if we have to. - if (PrimType PT = classifyPrim(E); PT != PT_Ptr) { + if (PrimType PT = classifyPrim(E); PT != PT_Ptr && isPtrType(PT)) { if (!this->emitDecayPtr(PT_Ptr, PT, E)) return false; } diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.h b/clang/lib/AST/Interp/ByteCodeExprGen.h index 19cbbc432e4b165..eef8cae6e38cd80 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.h +++ b/clang/lib/AST/Interp/ByteCodeExprGen.h @@ -32,10 +32,44 @@ template class LocalScope; template class DestructorScope; template class VariableScope; template class DeclScope; +template class InitLinkScope; template class OptionScope; template class ArrayIndexScope; template class SourceLocScope; +template class ByteCodeExprGen; +struct InitLink { +public: + enum { + K_This = 0, + K_Field = 1, + K_Decl = 2, + }; + + static InitLink This() { return InitLink{K_This}; } + static InitLink Field(unsigned Offset) { + InitLink IL{K_Field}; + IL.Offset = Offset; + return IL; + } + static InitLink Decl(const ValueDecl *D) { + InitLink IL{K_Decl}; + IL.D = D; + return IL; + } + + InitLink(uint8_t Kind) : Kind(Kind) {} + template + bool emit(ByteCodeExprGen *Ctx, const Expr *E) const; + +private: + uint32_t Kind; + union { + unsigned Offset; + const ValueDecl *D; + }; +}; + /// Compilation context for expressions. template class ByteCodeExprGen : public ConstStmtVisitor, bool>, @@ -115,6 +149,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, bool VisitSizeOfPackExpr(const SizeOfPackExpr *E); bool VisitGenericSelectionExpr(const GenericSelectionExpr *E); bool VisitChooseExpr(const ChooseExpr *E); + bool VisitEmbedExpr(const EmbedExpr *E); bool VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *E); bool VisitCXXInheritedCtorInitExpr(const CXXInheritedCtorInitExpr *E); bool VisitExpressionTraitExpr(const ExpressionTraitExpr *E); @@ -253,9 +288,11 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, friend class LocalScope; friend class DestructorScope; friend class DeclScope; + friend class InitLinkScope; friend class OptionScope; friend class ArrayIndexScope; friend class SourceLocScope; + friend struct InitLink; /// Emits a zero initializer. bool visitZeroInitializer(PrimType T, QualType QT, const Expr *E); @@ -324,6 +361,9 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, bool Initializing = false; const ValueDecl *InitializingDecl = nullptr; + llvm::SmallVector InitStack; + bool InitStackActive = false; + /// Flag indicating if we're initializing a global variable. bool GlobalDecl = false; }; @@ -547,6 +587,18 @@ template class SourceLocScope final { bool Enabled = false; }; +template class InitLinkScope final { +public: + InitLinkScope(ByteCodeExprGen *Ctx, InitLink &&Link) : Ctx(Ctx) { + Ctx->InitStack.push_back(std::move(Link)); + } + + ~InitLinkScope() { this->Ctx->InitStack.pop_back(); } + +private: + ByteCodeExprGen *Ctx; +}; + } // namespace interp } // namespace clang diff --git a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp index 6ee7898f228de41..0618ec1aa8f5842 100644 --- a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp @@ -155,8 +155,10 @@ bool ByteCodeStmtGen::visitFunc(const FunctionDecl *F) { return this->emitInitThisBitField(*T, F, FieldOffset, InitExpr); return this->emitInitThisField(*T, FieldOffset, InitExpr); } + // Non-primitive case. Get a pointer to the field-to-initialize // on the stack and call visitInitialzer() for it. + InitLinkScope FieldScope(this, InitLink::Field(F->Offset)); if (!this->emitGetPtrThisField(FieldOffset, InitExpr)) return false; @@ -178,6 +180,7 @@ bool ByteCodeStmtGen::visitFunc(const FunctionDecl *F) { if (!R) return false; + InitLinkScope InitScope(this, InitLink::This()); for (const auto *Init : Ctor->inits()) { // Scope needed for the initializers. BlockScope Scope(this); diff --git a/clang/lib/AST/Interp/Descriptor.cpp b/clang/lib/AST/Interp/Descriptor.cpp index d20ab1340c89039..fcb778f7aeab0eb 100644 --- a/clang/lib/AST/Interp/Descriptor.cpp +++ b/clang/lib/AST/Interp/Descriptor.cpp @@ -359,8 +359,14 @@ QualType Descriptor::getType() const { QualType Descriptor::getElemQualType() const { assert(isArray()); - const auto *AT = cast(getType()); - return AT->getElementType(); + QualType T = getType(); + if (const auto *AT = T->getAsArrayTypeUnsafe()) + return AT->getElementType(); + if (const auto *CT = T->getAs()) + return CT->getElementType(); + if (const auto *CT = T->getAs()) + return CT->getElementType(); + llvm_unreachable("Array that's not an array/complex/vector type?"); } SourceLocation Descriptor::getLocation() const { diff --git a/clang/lib/AST/Interp/Interp.h b/clang/lib/AST/Interp/Interp.h index fea83de829261d7..916d268aa4f0952 100644 --- a/clang/lib/AST/Interp/Interp.h +++ b/clang/lib/AST/Interp/Interp.h @@ -1432,7 +1432,6 @@ inline bool GetPtrField(InterpState &S, CodePtr OpPC, uint32_t Off) { if (Ptr.isBlockPointer() && Off > Ptr.block()->getSize()) return false; - S.Stk.push(Ptr.atField(Off)); return true; } diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 203db72c437331a..2cac03ba163f92a 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -4766,6 +4766,7 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, case Expr::PseudoObjectExprClass: case Expr::AtomicExprClass: case Expr::SourceLocExprClass: + case Expr::EmbedExprClass: case Expr::BuiltinBitCastExprClass: { NotPrimaryExpr(); diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index d87be5f2043a9bd..3923d34274703db 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -372,6 +372,11 @@ class MicrosoftCXXNameMangler { void mangleMemberFunctionPointer(const CXXRecordDecl *RD, const CXXMethodDecl *MD, StringRef Prefix = "$"); + void mangleFunctionPointer(const FunctionDecl *FD, + const NonTypeTemplateParmDecl *PD, + QualType TemplateArgType); + void mangleVarDecl(const VarDecl *VD, const NonTypeTemplateParmDecl *PD, + QualType TemplateArgType); void mangleMemberFunctionPointerInClassNTTP(const CXXRecordDecl *RD, const CXXMethodDecl *MD); void mangleVirtualMemPtrThunk(const CXXMethodDecl *MD, @@ -799,6 +804,50 @@ MicrosoftCXXNameMangler::mangleMemberFunctionPointer(const CXXRecordDecl *RD, mangleNumber(VBTableOffset); } +void MicrosoftCXXNameMangler::mangleFunctionPointer( + const FunctionDecl *FD, const NonTypeTemplateParmDecl *PD, + QualType TemplateArgType) { + // ::= $1? + // ::= + // + // ::= $ M 1? + Out << '$'; + + if (getASTContext().getLangOpts().isCompatibleWithMSVC( + LangOptions::MSVC2019) && + PD && PD->getType()->getTypeClass() == Type::Auto && + !TemplateArgType.isNull()) { + Out << "M"; + mangleType(TemplateArgType, SourceRange(), QMM_Drop); + } + + Out << "1?"; + mangleName(FD); + mangleFunctionEncoding(FD, /*ShouldMangle=*/true); +} + +void MicrosoftCXXNameMangler::mangleVarDecl(const VarDecl *VD, + const NonTypeTemplateParmDecl *PD, + QualType TemplateArgType) { + // ::= $1? + // ::= + // + // ::= $ M 1? + Out << '$'; + + if (getASTContext().getLangOpts().isCompatibleWithMSVC( + LangOptions::MSVC2019) && + PD && PD->getType()->getTypeClass() == Type::Auto && + !TemplateArgType.isNull()) { + Out << "M"; + mangleType(TemplateArgType, SourceRange(), QMM_Drop); + } + + Out << "1?"; + mangleName(VD); + mangleVariableEncoding(VD); +} + void MicrosoftCXXNameMangler::mangleMemberFunctionPointerInClassNTTP( const CXXRecordDecl *RD, const CXXMethodDecl *MD) { // ::= @@ -1555,6 +1604,9 @@ void MicrosoftCXXNameMangler::mangleIntegerLiteral( const llvm::APSInt &Value, const NonTypeTemplateParmDecl *PD, QualType TemplateArgType) { // ::= $0 + // ::= + // + // ::= $ M 0 Out << "$"; // Since MSVC 2019, add 'M[]' after '$' for auto template parameter when @@ -1632,8 +1684,11 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD, // ::= // ::= // ::= $ + // ::= $ // ::= // + // ::= M + // // ::= 0 # integer // ::= 1 # address of D // ::= 2 * @ # struct @@ -1681,15 +1736,17 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD, mangleMemberFunctionPointer( MD->getParent()->getMostRecentNonInjectedDecl(), MD); } else { - Out << "$1?"; - mangleName(FD); - mangleFunctionEncoding(FD, /*ShouldMangle=*/true); + mangleFunctionPointer(FD, cast(Parm), + TA.getParamTypeForDecl()); } } else if (TA.getParamTypeForDecl()->isRecordType()) { Out << "$"; auto *TPO = cast(ND); mangleTemplateArgValue(TPO->getType().getUnqualifiedType(), TPO->getValue(), TplArgKind::ClassNTTP); + } else if (const VarDecl *VD = dyn_cast(ND)) { + mangleVarDecl(VD, cast(Parm), + TA.getParamTypeForDecl()); } else { mangle(ND, "$1?"); } diff --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp index 1249531eab09fcd..fbfe92318dc5eee 100644 --- a/clang/lib/AST/ODRHash.cpp +++ b/clang/lib/AST/ODRHash.cpp @@ -251,7 +251,7 @@ unsigned ODRHash::CalculateHash() { assert(I == Bools.rend()); Bools.clear(); - return ID.ComputeHash(); + return ID.computeStableHash(); } namespace { diff --git a/clang/lib/AST/QualTypeNames.cpp b/clang/lib/AST/QualTypeNames.cpp index 18ac4b1eb57e780..4e1243ef79e8713 100644 --- a/clang/lib/AST/QualTypeNames.cpp +++ b/clang/lib/AST/QualTypeNames.cpp @@ -270,8 +270,8 @@ static NestedNameSpecifier *createNestedNameSpecifierForScopeOf( assert(Decl); const DeclContext *DC = Decl->getDeclContext()->getRedeclContext(); - const auto *Outer = dyn_cast_or_null(DC); - const auto *OuterNS = dyn_cast_or_null(DC); + const auto *Outer = dyn_cast(DC); + const auto *OuterNS = dyn_cast(DC); if (Outer && !(OuterNS && OuterNS->isAnonymousNamespace())) { if (const auto *CxxDecl = dyn_cast(DC)) { if (ClassTemplateDecl *ClassTempl = diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 8f51d16b5db0376..5241a5cdbf0095a 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1177,6 +1177,10 @@ void StmtPrinter::VisitSourceLocExpr(SourceLocExpr *Node) { OS << Node->getBuiltinStr() << "()"; } +void StmtPrinter::VisitEmbedExpr(EmbedExpr *Node) { + llvm::report_fatal_error("Not implemented"); +} + void StmtPrinter::VisitConstantExpr(ConstantExpr *Node) { PrintExpr(Node->getSubExpr()); } diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index d1655905a665662..1add5caaf9f2ecf 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -2313,6 +2313,8 @@ void StmtProfiler::VisitSourceLocExpr(const SourceLocExpr *E) { VisitExpr(E); } +void StmtProfiler::VisitEmbedExpr(const EmbedExpr *E) { VisitExpr(E); } + void StmtProfiler::VisitRecoveryExpr(const RecoveryExpr *E) { VisitExpr(E); } void StmtProfiler::VisitObjCStringLiteral(const ObjCStringLiteral *S) { diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp index bd1e630cd904703..a26f50f0719c11f 100644 --- a/clang/lib/AST/TextNodeDumper.cpp +++ b/clang/lib/AST/TextNodeDumper.cpp @@ -2884,3 +2884,8 @@ void TextNodeDumper::VisitOpenACCLoopConstruct(const OpenACCLoopConstruct *S) { else OS << " parent: " << S->getParentComputeConstruct(); } + +void TextNodeDumper::VisitEmbedExpr(const EmbedExpr *S) { + AddChild("begin", [=] { OS << S->getStartingElementPos(); }); + AddChild("number of elements", [=] { OS << S->getDataElementCount(); }); +} diff --git a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp index 675b42550f17723..200682faafd6ab5 100644 --- a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -411,10 +411,9 @@ static void builtinTransfer(unsigned CurBlockID, const CFGElement &Elt, /// by the user-specified analysis. static TypeErasedDataflowAnalysisState transferCFGBlock(const CFGBlock &Block, AnalysisContext &AC, - std::function - PostVisitCFG = nullptr) { - AC.Log.enterBlock(Block, PostVisitCFG != nullptr); + const CFGEltCallbacksTypeErased &PostAnalysisCallbacks = {}) { + AC.Log.enterBlock(Block, PostAnalysisCallbacks.Before != nullptr || + PostAnalysisCallbacks.After != nullptr); auto State = computeBlockInputState(Block, AC); AC.Log.recordState(State); int ElementIdx = 1; @@ -423,6 +422,11 @@ transferCFGBlock(const CFGBlock &Block, AnalysisContext &AC, ElementIdx++, "transferCFGBlock"); AC.Log.enterElement(Element); + + if (PostAnalysisCallbacks.Before) { + PostAnalysisCallbacks.Before(Element, State); + } + // Built-in analysis if (AC.Analysis.builtinOptions()) { builtinTransfer(Block.getBlockID(), Element, State, AC); @@ -431,10 +435,10 @@ transferCFGBlock(const CFGBlock &Block, AnalysisContext &AC, // User-provided analysis AC.Analysis.transferTypeErased(Element, State.Lattice, State.Env); - // Post processing - if (PostVisitCFG) { - PostVisitCFG(Element, State); + if (PostAnalysisCallbacks.After) { + PostAnalysisCallbacks.After(Element, State); } + AC.Log.recordState(State); } @@ -469,9 +473,7 @@ llvm::Expected>> runTypeErasedDataflowAnalysis( const AdornedCFG &ACFG, TypeErasedDataflowAnalysis &Analysis, const Environment &InitEnv, - std::function - PostVisitCFG, + const CFGEltCallbacksTypeErased &PostAnalysisCallbacks, std::int32_t MaxBlockVisits) { PrettyStackTraceAnalysis CrashInfo(ACFG, "runTypeErasedDataflowAnalysis"); @@ -553,12 +555,12 @@ runTypeErasedDataflowAnalysis( // FIXME: Consider evaluating unreachable basic blocks (those that have a // state set to `std::nullopt` at this point) to also analyze dead code. - if (PostVisitCFG) { + if (PostAnalysisCallbacks.Before || PostAnalysisCallbacks.After) { for (const CFGBlock *Block : ACFG.getCFG()) { // Skip blocks that were not evaluated. if (!BlockStates[Block->getBlockID()]) continue; - transferCFGBlock(*Block, AC, PostVisitCFG); + transferCFGBlock(*Block, AC, PostAnalysisCallbacks); } } diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index 1dc51deb829870f..4509cee1ca0fedf 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -530,13 +530,18 @@ void FileManager::fillRealPathName(FileEntry *UFE, llvm::StringRef FileName) { llvm::ErrorOr> FileManager::getBufferForFile(FileEntryRef FE, bool isVolatile, - bool RequiresNullTerminator) { + bool RequiresNullTerminator, + std::optional MaybeLimit) { const FileEntry *Entry = &FE.getFileEntry(); // If the content is living on the file entry, return a reference to it. if (Entry->Content) return llvm::MemoryBuffer::getMemBuffer(Entry->Content->getMemBufferRef()); uint64_t FileSize = Entry->getSize(); + + if (MaybeLimit) + FileSize = *MaybeLimit; + // If there's a high enough chance that the file have changed since we // got its size, force a stat before opening it. if (isVolatile || Entry->isNamedPipe()) diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index feea84544d62fbd..4f7ccaf4021d636 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -425,8 +425,8 @@ tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const { // collisions (if there were, the switch below would complain about duplicate // case values). Note that this depends on 'if' being null terminated. -#define HASH(LEN, FIRST, THIRD) \ - (LEN << 5) + (((FIRST-'a') + (THIRD-'a')) & 31) +#define HASH(LEN, FIRST, THIRD) \ + (LEN << 6) + (((FIRST - 'a') - (THIRD - 'a')) & 63) #define CASE(LEN, FIRST, THIRD, NAME) \ case HASH(LEN, FIRST, THIRD): \ return memcmp(Name, #NAME, LEN) ? tok::pp_not_keyword : tok::pp_ ## NAME @@ -441,6 +441,7 @@ tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const { CASE( 4, 'e', 's', else); CASE( 4, 'l', 'n', line); CASE( 4, 's', 'c', sccs); + CASE( 5, 'e', 'b', embed); CASE( 5, 'e', 'd', endif); CASE( 5, 'e', 'r', error); CASE( 5, 'i', 'e', ident); diff --git a/clang/lib/Basic/Targets/AArch64.cpp b/clang/lib/Basic/Targets/AArch64.cpp index fba2ad00df96d65..31d8121b91d107e 100644 --- a/clang/lib/Basic/Targets/AArch64.cpp +++ b/clang/lib/Basic/Targets/AArch64.cpp @@ -673,34 +673,30 @@ AArch64TargetInfo::getVScaleRange(const LangOptions &LangOpts) const { unsigned AArch64TargetInfo::multiVersionSortPriority(StringRef Name) const { if (Name == "default") return 0; - if (auto Ext = llvm::AArch64::parseArchExtension(Name)) - return Ext->FmvPriority; + if (auto Ext = llvm::AArch64::parseFMVExtension(Name)) + return Ext->Priority; return 0; } unsigned AArch64TargetInfo::multiVersionFeatureCost() const { // Take the maximum priority as per feature cost, so more features win. - return llvm::AArch64::ExtensionInfo::MaxFMVPriority; + constexpr unsigned MaxFMVPriority = 1000; + return MaxFMVPriority; } bool AArch64TargetInfo::doesFeatureAffectCodeGen(StringRef Name) const { - if (auto Ext = llvm::AArch64::parseArchExtension(Name)) - return !Ext->DependentFeatures.empty(); + // FMV extensions which imply no backend features do not affect codegen. + if (auto Ext = llvm::AArch64::parseFMVExtension(Name)) + return !Ext->Features.empty(); return false; } -StringRef AArch64TargetInfo::getFeatureDependencies(StringRef Name) const { - if (auto Ext = llvm::AArch64::parseArchExtension(Name)) - return Ext->DependentFeatures; - return StringRef(); -} - bool AArch64TargetInfo::validateCpuSupports(StringRef FeatureStr) const { // CPU features might be separated by '+', extract them and check llvm::SmallVector Features; FeatureStr.split(Features, "+"); for (auto &Feature : Features) - if (!llvm::AArch64::parseArchExtension(Feature.trim()).has_value()) + if (!llvm::AArch64::parseFMVExtension(Feature.trim()).has_value()) return false; return true; } diff --git a/clang/lib/Basic/Targets/AArch64.h b/clang/lib/Basic/Targets/AArch64.h index c0a6bd2de6b0493..71510fe28951075 100644 --- a/clang/lib/Basic/Targets/AArch64.h +++ b/clang/lib/Basic/Targets/AArch64.h @@ -151,7 +151,6 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo { std::optional> getVScaleRange(const LangOptions &LangOpts) const override; bool doesFeatureAffectCodeGen(StringRef Name) const override; - StringRef getFeatureDependencies(StringRef Name) const override; bool validateCpuSupports(StringRef FeatureStr) const override; bool hasFeature(StringRef Feature) const override; void setFeatureEnabled(llvm::StringMap &Features, StringRef Name, diff --git a/clang/lib/Basic/Targets/RISCV.cpp b/clang/lib/Basic/Targets/RISCV.cpp index a7ce9dda34bdde6..25ae7d64b577e4c 100644 --- a/clang/lib/Basic/Targets/RISCV.cpp +++ b/clang/lib/Basic/Targets/RISCV.cpp @@ -168,7 +168,7 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts, Twine(getVersionValue(ExtInfo.Major, ExtInfo.Minor))); } - if (ISAInfo->hasExtension("m") || ISAInfo->hasExtension("zmmul")) + if (ISAInfo->hasExtension("zmmul")) Builder.defineMacro("__riscv_mul"); if (ISAInfo->hasExtension("m")) { diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp b/clang/lib/Basic/Targets/WebAssembly.cpp index 5a000314a72ceef..1e565f0a5319f28 100644 --- a/clang/lib/Basic/Targets/WebAssembly.cpp +++ b/clang/lib/Basic/Targets/WebAssembly.cpp @@ -153,6 +153,7 @@ bool WebAssemblyTargetInfo::initFeatureMap( auto addGenericFeatures = [&]() { Features["multivalue"] = true; Features["mutable-globals"] = true; + Features["reference-types"] = true; Features["sign-ext"] = true; }; auto addBleedingEdgeFeatures = [&]() { @@ -164,7 +165,6 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["half-precision"] = true; Features["multimemory"] = true; Features["nontrapping-fptoint"] = true; - Features["reference-types"] = true; Features["tail-call"] = true; setSIMDLevel(Features, RelaxedSIMD, true); }; diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 4f393ac1d18058e..dc09f8972dd1542 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -581,38 +581,19 @@ static Value *emitCallMaybeConstrainedFPBuiltin(CodeGenFunction &CGF, return CGF.Builder.CreateCall(F, Args); } -// Emit a simple mangled intrinsic that has 1 argument and a return type -// matching the argument type. -static Value *emitUnaryBuiltin(CodeGenFunction &CGF, const CallExpr *E, - unsigned IntrinsicID, - llvm::StringRef Name = "") { - llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0)); - - Function *F = CGF.CGM.getIntrinsic(IntrinsicID, Src0->getType()); - return CGF.Builder.CreateCall(F, Src0, Name); -} - -// Emit an intrinsic that has 2 operands of the same type as its result. -static Value *emitBinaryBuiltin(CodeGenFunction &CGF, - const CallExpr *E, - unsigned IntrinsicID) { - llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0)); - llvm::Value *Src1 = CGF.EmitScalarExpr(E->getArg(1)); - - Function *F = CGF.CGM.getIntrinsic(IntrinsicID, Src0->getType()); - return CGF.Builder.CreateCall(F, { Src0, Src1 }); -} - -// Emit an intrinsic that has 3 operands of the same type as its result. -static Value *emitTernaryBuiltin(CodeGenFunction &CGF, - const CallExpr *E, - unsigned IntrinsicID) { - llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0)); - llvm::Value *Src1 = CGF.EmitScalarExpr(E->getArg(1)); - llvm::Value *Src2 = CGF.EmitScalarExpr(E->getArg(2)); - - Function *F = CGF.CGM.getIntrinsic(IntrinsicID, Src0->getType()); - return CGF.Builder.CreateCall(F, { Src0, Src1, Src2 }); +// Emit a simple intrinsic that has N scalar arguments and a return type +// matching the argument type. It is assumed that only the first argument is +// overloaded. +template +Value *emitBuiltinWithOneOverloadedType(CodeGenFunction &CGF, const CallExpr *E, + unsigned IntrinsicID, + llvm::StringRef Name = "") { + static_assert(N, "expect non-empty argument"); + SmallVector Args; + for (unsigned I = 0; I < N; ++I) + Args.push_back(CGF.EmitScalarExpr(E->getArg(I))); + Function *F = CGF.CGM.getIntrinsic(IntrinsicID, Args[0]->getType()); + return CGF.Builder.CreateCall(F, Args, Name); } // Emit an intrinsic that has 1 float or double operand, and 1 integer. @@ -2678,7 +2659,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_copysignf16: case Builtin::BI__builtin_copysignl: case Builtin::BI__builtin_copysignf128: - return RValue::get(emitBinaryBuiltin(*this, E, Intrinsic::copysign)); + return RValue::get( + emitBuiltinWithOneOverloadedType<2>(*this, E, Intrinsic::copysign)); case Builtin::BIcos: case Builtin::BIcosf: @@ -2723,7 +2705,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // TODO: strictfp support if (Builder.getIsFPConstrained()) break; - return RValue::get(emitUnaryBuiltin(*this, E, Intrinsic::exp10)); + return RValue::get( + emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::exp10)); } case Builtin::BIfabs: case Builtin::BIfabsf: @@ -2733,7 +2716,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_fabsf16: case Builtin::BI__builtin_fabsl: case Builtin::BI__builtin_fabsf128: - return RValue::get(emitUnaryBuiltin(*this, E, Intrinsic::fabs)); + return RValue::get( + emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::fabs)); case Builtin::BIfloor: case Builtin::BIfloorf: @@ -3416,13 +3400,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI_byteswap_ushort: case Builtin::BI_byteswap_ulong: case Builtin::BI_byteswap_uint64: { - return RValue::get(emitUnaryBuiltin(*this, E, Intrinsic::bswap)); + return RValue::get( + emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::bswap)); } case Builtin::BI__builtin_bitreverse8: case Builtin::BI__builtin_bitreverse16: case Builtin::BI__builtin_bitreverse32: case Builtin::BI__builtin_bitreverse64: { - return RValue::get(emitUnaryBuiltin(*this, E, Intrinsic::bitreverse)); + return RValue::get( + emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::bitreverse)); } case Builtin::BI__builtin_rotateleft8: case Builtin::BI__builtin_rotateleft16: @@ -3699,69 +3685,73 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, llvm::Intrinsic::abs, EmitScalarExpr(E->getArg(0)), Builder.getFalse(), nullptr, "elt.abs"); else - Result = emitUnaryBuiltin(*this, E, llvm::Intrinsic::fabs, "elt.abs"); + Result = emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::fabs, "elt.abs"); return RValue::get(Result); } case Builtin::BI__builtin_elementwise_ceil: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::ceil, "elt.ceil")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::ceil, "elt.ceil")); case Builtin::BI__builtin_elementwise_exp: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::exp, "elt.exp")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::exp, "elt.exp")); case Builtin::BI__builtin_elementwise_exp2: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::exp2, "elt.exp2")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::exp2, "elt.exp2")); case Builtin::BI__builtin_elementwise_log: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::log, "elt.log")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::log, "elt.log")); case Builtin::BI__builtin_elementwise_log2: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::log2, "elt.log2")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::log2, "elt.log2")); case Builtin::BI__builtin_elementwise_log10: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::log10, "elt.log10")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::log10, "elt.log10")); case Builtin::BI__builtin_elementwise_pow: { - return RValue::get(emitBinaryBuiltin(*this, E, llvm::Intrinsic::pow)); + return RValue::get( + emitBuiltinWithOneOverloadedType<2>(*this, E, llvm::Intrinsic::pow)); } case Builtin::BI__builtin_elementwise_bitreverse: - return RValue::get(emitUnaryBuiltin(*this, E, llvm::Intrinsic::bitreverse, - "elt.bitreverse")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::bitreverse, "elt.bitreverse")); case Builtin::BI__builtin_elementwise_cos: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::cos, "elt.cos")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::cos, "elt.cos")); case Builtin::BI__builtin_elementwise_floor: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::floor, "elt.floor")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::floor, "elt.floor")); case Builtin::BI__builtin_elementwise_roundeven: - return RValue::get(emitUnaryBuiltin(*this, E, llvm::Intrinsic::roundeven, - "elt.roundeven")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::roundeven, "elt.roundeven")); case Builtin::BI__builtin_elementwise_round: - return RValue::get(emitUnaryBuiltin(*this, E, llvm::Intrinsic::round, - "elt.round")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::round, "elt.round")); case Builtin::BI__builtin_elementwise_rint: - return RValue::get(emitUnaryBuiltin(*this, E, llvm::Intrinsic::rint, - "elt.rint")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::rint, "elt.rint")); case Builtin::BI__builtin_elementwise_nearbyint: - return RValue::get(emitUnaryBuiltin(*this, E, llvm::Intrinsic::nearbyint, - "elt.nearbyint")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::nearbyint, "elt.nearbyint")); case Builtin::BI__builtin_elementwise_sin: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::sin, "elt.sin")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::sin, "elt.sin")); case Builtin::BI__builtin_elementwise_tan: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::tan, "elt.tan")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::tan, "elt.tan")); case Builtin::BI__builtin_elementwise_trunc: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::trunc, "elt.trunc")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::trunc, "elt.trunc")); case Builtin::BI__builtin_elementwise_canonicalize: - return RValue::get( - emitUnaryBuiltin(*this, E, llvm::Intrinsic::canonicalize, "elt.canonicalize")); + return RValue::get(emitBuiltinWithOneOverloadedType<1>( + *this, E, llvm::Intrinsic::canonicalize, "elt.canonicalize")); case Builtin::BI__builtin_elementwise_copysign: - return RValue::get(emitBinaryBuiltin(*this, E, llvm::Intrinsic::copysign)); + return RValue::get(emitBuiltinWithOneOverloadedType<2>( + *this, E, llvm::Intrinsic::copysign)); case Builtin::BI__builtin_elementwise_fma: - return RValue::get(emitTernaryBuiltin(*this, E, llvm::Intrinsic::fma)); + return RValue::get( + emitBuiltinWithOneOverloadedType<3>(*this, E, llvm::Intrinsic::fma)); case Builtin::BI__builtin_elementwise_add_sat: case Builtin::BI__builtin_elementwise_sub_sat: { Value *Op0 = EmitScalarExpr(E->getArg(0)); @@ -3828,7 +3818,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, assert(QT->isFloatingType() && "must have a float here"); return llvm::Intrinsic::vector_reduce_fmax; }; - return RValue::get(emitUnaryBuiltin( + return RValue::get(emitBuiltinWithOneOverloadedType<1>( *this, E, GetIntrinsicID(E->getArg(0)->getType()), "rdx.min")); } @@ -3847,24 +3837,24 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return llvm::Intrinsic::vector_reduce_fmin; }; - return RValue::get(emitUnaryBuiltin( + return RValue::get(emitBuiltinWithOneOverloadedType<1>( *this, E, GetIntrinsicID(E->getArg(0)->getType()), "rdx.min")); } case Builtin::BI__builtin_reduce_add: - return RValue::get(emitUnaryBuiltin( + return RValue::get(emitBuiltinWithOneOverloadedType<1>( *this, E, llvm::Intrinsic::vector_reduce_add, "rdx.add")); case Builtin::BI__builtin_reduce_mul: - return RValue::get(emitUnaryBuiltin( + return RValue::get(emitBuiltinWithOneOverloadedType<1>( *this, E, llvm::Intrinsic::vector_reduce_mul, "rdx.mul")); case Builtin::BI__builtin_reduce_xor: - return RValue::get(emitUnaryBuiltin( + return RValue::get(emitBuiltinWithOneOverloadedType<1>( *this, E, llvm::Intrinsic::vector_reduce_xor, "rdx.xor")); case Builtin::BI__builtin_reduce_or: - return RValue::get(emitUnaryBuiltin( + return RValue::get(emitBuiltinWithOneOverloadedType<1>( *this, E, llvm::Intrinsic::vector_reduce_or, "rdx.or")); case Builtin::BI__builtin_reduce_and: - return RValue::get(emitUnaryBuiltin( + return RValue::get(emitBuiltinWithOneOverloadedType<1>( *this, E, llvm::Intrinsic::vector_reduce_and, "rdx.and")); case Builtin::BI__builtin_matrix_transpose: { @@ -5282,6 +5272,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__iso_volatile_store64: return RValue::get(EmitISOVolatileStore(*this, E)); + case Builtin::BI__builtin_ptrauth_sign_constant: + return RValue::get(ConstantEmitter(*this).emitAbstract(E, E->getType())); + case Builtin::BI__builtin_ptrauth_auth: case Builtin::BI__builtin_ptrauth_auth_and_resign: case Builtin::BI__builtin_ptrauth_blend_discriminator: @@ -5880,7 +5873,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_canonicalizef: case Builtin::BI__builtin_canonicalizef16: case Builtin::BI__builtin_canonicalizel: - return RValue::get(emitUnaryBuiltin(*this, E, Intrinsic::canonicalize)); + return RValue::get( + emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::canonicalize)); case Builtin::BI__builtin_thread_pointer: { if (!getContext().getTargetInfo().isTLSSupported()) @@ -6001,8 +5995,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // If this is a predefined lib function (e.g. malloc), emit the call // using exactly the normal call path. if (getContext().BuiltinInfo.isPredefinedLibFunction(BuiltinID)) - return emitLibraryCall( - *this, FD, E, cast(EmitScalarExpr(E->getCallee()))); + return emitLibraryCall(*this, FD, E, CGM.getRawFunctionPointer(FD)); // Check that a call to a target specific builtin has the correct target // features. @@ -14189,7 +14182,7 @@ Value *CodeGenFunction::EmitAArch64CpuSupports(const CallExpr *E) { ArgStr.split(Features, "+"); for (auto &Feature : Features) { Feature = Feature.trim(); - if (!llvm::AArch64::parseArchExtension(Feature)) + if (!llvm::AArch64::parseFMVExtension(Feature)) return Builder.getFalse(); if (Feature != "default") Features.push_back(Feature); @@ -18433,9 +18426,11 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, } case AMDGPU::BI__builtin_amdgcn_ds_swizzle: - return emitBinaryBuiltin(*this, E, Intrinsic::amdgcn_ds_swizzle); + return emitBuiltinWithOneOverloadedType<2>(*this, E, + Intrinsic::amdgcn_ds_swizzle); case AMDGPU::BI__builtin_amdgcn_mov_dpp8: - return emitBinaryBuiltin(*this, E, Intrinsic::amdgcn_mov_dpp8); + return emitBuiltinWithOneOverloadedType<2>(*this, E, + Intrinsic::amdgcn_mov_dpp8); case AMDGPU::BI__builtin_amdgcn_mov_dpp: case AMDGPU::BI__builtin_amdgcn_update_dpp: { llvm::SmallVector Args; @@ -18458,39 +18453,44 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, case AMDGPU::BI__builtin_amdgcn_div_fixup: case AMDGPU::BI__builtin_amdgcn_div_fixupf: case AMDGPU::BI__builtin_amdgcn_div_fixuph: - return emitTernaryBuiltin(*this, E, Intrinsic::amdgcn_div_fixup); + return emitBuiltinWithOneOverloadedType<3>(*this, E, + Intrinsic::amdgcn_div_fixup); case AMDGPU::BI__builtin_amdgcn_trig_preop: case AMDGPU::BI__builtin_amdgcn_trig_preopf: return emitFPIntBuiltin(*this, E, Intrinsic::amdgcn_trig_preop); case AMDGPU::BI__builtin_amdgcn_rcp: case AMDGPU::BI__builtin_amdgcn_rcpf: case AMDGPU::BI__builtin_amdgcn_rcph: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_rcp); + return emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::amdgcn_rcp); case AMDGPU::BI__builtin_amdgcn_sqrt: case AMDGPU::BI__builtin_amdgcn_sqrtf: case AMDGPU::BI__builtin_amdgcn_sqrth: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_sqrt); + return emitBuiltinWithOneOverloadedType<1>(*this, E, + Intrinsic::amdgcn_sqrt); case AMDGPU::BI__builtin_amdgcn_rsq: case AMDGPU::BI__builtin_amdgcn_rsqf: case AMDGPU::BI__builtin_amdgcn_rsqh: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_rsq); + return emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::amdgcn_rsq); case AMDGPU::BI__builtin_amdgcn_rsq_clamp: case AMDGPU::BI__builtin_amdgcn_rsq_clampf: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_rsq_clamp); + return emitBuiltinWithOneOverloadedType<1>(*this, E, + Intrinsic::amdgcn_rsq_clamp); case AMDGPU::BI__builtin_amdgcn_sinf: case AMDGPU::BI__builtin_amdgcn_sinh: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_sin); + return emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::amdgcn_sin); case AMDGPU::BI__builtin_amdgcn_cosf: case AMDGPU::BI__builtin_amdgcn_cosh: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_cos); + return emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::amdgcn_cos); case AMDGPU::BI__builtin_amdgcn_dispatch_ptr: return EmitAMDGPUDispatchPtr(*this, E); case AMDGPU::BI__builtin_amdgcn_logf: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_log); + return emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::amdgcn_log); case AMDGPU::BI__builtin_amdgcn_exp2f: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_exp2); + return emitBuiltinWithOneOverloadedType<1>(*this, E, + Intrinsic::amdgcn_exp2); case AMDGPU::BI__builtin_amdgcn_log_clampf: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_log_clamp); + return emitBuiltinWithOneOverloadedType<1>(*this, E, + Intrinsic::amdgcn_log_clamp); case AMDGPU::BI__builtin_amdgcn_ldexp: case AMDGPU::BI__builtin_amdgcn_ldexpf: { llvm::Value *Src0 = EmitScalarExpr(E->getArg(0)); @@ -18511,7 +18511,8 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, case AMDGPU::BI__builtin_amdgcn_frexp_mant: case AMDGPU::BI__builtin_amdgcn_frexp_mantf: case AMDGPU::BI__builtin_amdgcn_frexp_manth: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_frexp_mant); + return emitBuiltinWithOneOverloadedType<1>(*this, E, + Intrinsic::amdgcn_frexp_mant); case AMDGPU::BI__builtin_amdgcn_frexp_exp: case AMDGPU::BI__builtin_amdgcn_frexp_expf: { Value *Src0 = EmitScalarExpr(E->getArg(0)); @@ -18528,13 +18529,17 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, case AMDGPU::BI__builtin_amdgcn_fract: case AMDGPU::BI__builtin_amdgcn_fractf: case AMDGPU::BI__builtin_amdgcn_fracth: - return emitUnaryBuiltin(*this, E, Intrinsic::amdgcn_fract); + return emitBuiltinWithOneOverloadedType<1>(*this, E, + Intrinsic::amdgcn_fract); case AMDGPU::BI__builtin_amdgcn_lerp: - return emitTernaryBuiltin(*this, E, Intrinsic::amdgcn_lerp); + return emitBuiltinWithOneOverloadedType<3>(*this, E, + Intrinsic::amdgcn_lerp); case AMDGPU::BI__builtin_amdgcn_ubfe: - return emitTernaryBuiltin(*this, E, Intrinsic::amdgcn_ubfe); + return emitBuiltinWithOneOverloadedType<3>(*this, E, + Intrinsic::amdgcn_ubfe); case AMDGPU::BI__builtin_amdgcn_sbfe: - return emitTernaryBuiltin(*this, E, Intrinsic::amdgcn_sbfe); + return emitBuiltinWithOneOverloadedType<3>(*this, E, + Intrinsic::amdgcn_sbfe); case AMDGPU::BI__builtin_amdgcn_ballot_w32: case AMDGPU::BI__builtin_amdgcn_ballot_w64: { llvm::Type *ResultType = ConvertType(E->getType()); @@ -18572,7 +18577,8 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return emitFPIntBuiltin(*this, E, Intrinsic::amdgcn_class); case AMDGPU::BI__builtin_amdgcn_fmed3f: case AMDGPU::BI__builtin_amdgcn_fmed3h: - return emitTernaryBuiltin(*this, E, Intrinsic::amdgcn_fmed3); + return emitBuiltinWithOneOverloadedType<3>(*this, E, + Intrinsic::amdgcn_fmed3); case AMDGPU::BI__builtin_amdgcn_ds_append: case AMDGPU::BI__builtin_amdgcn_ds_consume: { Intrinsic::ID Intrin = BuiltinID == AMDGPU::BI__builtin_amdgcn_ds_append ? @@ -19009,7 +19015,8 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, // r600 intrinsics case AMDGPU::BI__builtin_r600_recipsqrt_ieee: case AMDGPU::BI__builtin_r600_recipsqrt_ieeef: - return emitUnaryBuiltin(*this, E, Intrinsic::r600_recipsqrt_ieee); + return emitBuiltinWithOneOverloadedType<1>(*this, E, + Intrinsic::r600_recipsqrt_ieee); case AMDGPU::BI__builtin_r600_read_tidig_x: return emitRangedBuiltin(*this, Intrinsic::r600_read_tidig_x, 0, 1024); case AMDGPU::BI__builtin_r600_read_tidig_y: @@ -19108,6 +19115,9 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_make_buffer_rsrc: + return emitBuiltinWithOneOverloadedType<4>( + *this, E, Intrinsic::amdgcn_make_buffer_rsrc); default: return nullptr; } diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index a071b16fc37f929..2b301130ef7b703 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -5678,6 +5678,9 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, !isa_and_nonnull(TargetDecl)) EmitKCFIOperandBundle(ConcreteCallee, BundleList); + // Add the pointer-authentication bundle. + EmitPointerAuthOperandBundle(ConcreteCallee.getPointerAuthInfo(), BundleList); + if (const FunctionDecl *FD = dyn_cast_or_null(CurFuncDecl)) if (FD->hasAttr()) // All calls within a strictfp function are marked strictfp diff --git a/clang/lib/CodeGen/CGCall.h b/clang/lib/CodeGen/CGCall.h index 6b676ac196db2a9..412b44a8c753aaa 100644 --- a/clang/lib/CodeGen/CGCall.h +++ b/clang/lib/CodeGen/CGCall.h @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_LIB_CODEGEN_CGCALL_H #define LLVM_CLANG_LIB_CODEGEN_CGCALL_H +#include "CGPointerAuthInfo.h" #include "CGValue.h" #include "EHScopeStack.h" #include "clang/AST/ASTFwd.h" @@ -69,6 +70,10 @@ class CGCallee { Last = Virtual }; + struct OrdinaryInfoStorage { + CGCalleeInfo AbstractInfo; + CGPointerAuthInfo PointerAuthInfo; + }; struct BuiltinInfoStorage { const FunctionDecl *Decl; unsigned ID; @@ -85,7 +90,7 @@ class CGCallee { SpecialKind KindOrFunctionPointer; union { - CGCalleeInfo AbstractInfo; + OrdinaryInfoStorage OrdinaryInfo; BuiltinInfoStorage BuiltinInfo; PseudoDestructorInfoStorage PseudoDestructorInfo; VirtualInfoStorage VirtualInfo; @@ -104,10 +109,13 @@ class CGCallee { /// Construct a callee. Call this constructor directly when this /// isn't a direct call. - CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr) + CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr, + /* FIXME: make parameter pointerAuthInfo mandatory */ + const CGPointerAuthInfo &pointerAuthInfo = CGPointerAuthInfo()) : KindOrFunctionPointer( SpecialKind(reinterpret_cast(functionPtr))) { - AbstractInfo = abstractInfo; + OrdinaryInfo.AbstractInfo = abstractInfo; + OrdinaryInfo.PointerAuthInfo = pointerAuthInfo; assert(functionPtr && "configuring callee without function pointer"); assert(functionPtr->getType()->isPointerTy()); } @@ -173,7 +181,11 @@ class CGCallee { if (isVirtual()) return VirtualInfo.MD; assert(isOrdinary()); - return AbstractInfo; + return OrdinaryInfo.AbstractInfo; + } + const CGPointerAuthInfo &getPointerAuthInfo() const { + assert(isOrdinary()); + return OrdinaryInfo.PointerAuthInfo; } llvm::Value *getFunctionPointer() const { assert(isOrdinary()); @@ -184,6 +196,10 @@ class CGCallee { KindOrFunctionPointer = SpecialKind(reinterpret_cast(functionPtr)); } + void setPointerAuthInfo(CGPointerAuthInfo PointerAuth) { + assert(isOrdinary()); + OrdinaryInfo.PointerAuthInfo = PointerAuth; + } bool isVirtual() const { return KindOrFunctionPointer == SpecialKind::Virtual; diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 3dfe5e09c778d11..534f46da7486276 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2856,22 +2856,22 @@ static LValue EmitGlobalVarDeclLValue(CodeGenFunction &CGF, return LV; } -static llvm::Constant *EmitFunctionDeclPointer(CodeGenModule &CGM, - GlobalDecl GD) { +llvm::Constant *CodeGenModule::getRawFunctionPointer(GlobalDecl GD, + llvm::Type *Ty) { const FunctionDecl *FD = cast(GD.getDecl()); if (FD->hasAttr()) { - ConstantAddress aliasee = CGM.GetWeakRefReference(FD); + ConstantAddress aliasee = GetWeakRefReference(FD); return aliasee.getPointer(); } - llvm::Constant *V = CGM.GetAddrOfFunction(GD); + llvm::Constant *V = GetAddrOfFunction(GD, Ty); return V; } static LValue EmitFunctionDeclLValue(CodeGenFunction &CGF, const Expr *E, GlobalDecl GD) { const FunctionDecl *FD = cast(GD.getDecl()); - llvm::Value *V = EmitFunctionDeclPointer(CGF.CGM, GD); + llvm::Constant *V = CGF.CGM.getFunctionPointer(GD); CharUnits Alignment = CGF.getContext().getDeclAlign(FD); return CGF.MakeAddrLValue(V, E->getType(), Alignment, AlignmentSource::Decl); @@ -5506,7 +5506,7 @@ static CGCallee EmitDirectCallee(CodeGenFunction &CGF, GlobalDecl GD) { // name to make it clear it's not the actual builtin. if (CGF.CurFn->getName() != FDInlineName && OnlyHasInlineBuiltinDeclaration(FD)) { - llvm::Constant *CalleePtr = EmitFunctionDeclPointer(CGF.CGM, GD); + llvm::Constant *CalleePtr = CGF.CGM.getRawFunctionPointer(GD); llvm::Function *Fn = llvm::cast(CalleePtr); llvm::Module *M = Fn->getParent(); llvm::Function *Clone = M->getFunction(FDInlineName); @@ -5529,7 +5529,7 @@ static CGCallee EmitDirectCallee(CodeGenFunction &CGF, GlobalDecl GD) { return CGCallee::forBuiltin(builtinID, FD); } - llvm::Constant *CalleePtr = EmitFunctionDeclPointer(CGF.CGM, GD); + llvm::Constant *CalleePtr = CGF.CGM.getRawFunctionPointer(GD); if (CGF.CGM.getLangOpts().CUDA && !CGF.CGM.getLangOpts().CUDAIsDevice && FD->hasAttr()) CalleePtr = CGF.CGM.getCUDARuntime().getKernelStub( @@ -5586,7 +5586,8 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { GD = GlobalDecl(VD); CGCalleeInfo calleeInfo(functionType->getAs(), GD); - CGCallee callee(calleeInfo, calleePtr); + CGPointerAuthInfo pointerAuth = CGM.getFunctionPointerAuthInfo(functionType); + CGCallee callee(calleeInfo, calleePtr, pointerAuth); return callee; } diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index c369163ffaa9c23..c3c10e73ff05ebd 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -426,53 +426,45 @@ AggExprEmitter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) { Ctx.getAsConstantArrayType(E->getSubExpr()->getType()); assert(ArrayType && "std::initializer_list constructed from non-array"); - // FIXME: Perform the checks on the field types in SemaInit. RecordDecl *Record = E->getType()->castAs()->getDecl(); RecordDecl::field_iterator Field = Record->field_begin(); - if (Field == Record->field_end()) { - CGF.ErrorUnsupported(E, "weird std::initializer_list"); - return; - } + assert(Field != Record->field_end() && + Ctx.hasSameType(Field->getType()->getPointeeType(), + ArrayType->getElementType()) && + "Expected std::initializer_list first field to be const E *"); // Start pointer. - if (!Field->getType()->isPointerType() || - !Ctx.hasSameType(Field->getType()->getPointeeType(), - ArrayType->getElementType())) { - CGF.ErrorUnsupported(E, "weird std::initializer_list"); - return; - } - AggValueSlot Dest = EnsureSlot(E->getType()); LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); LValue Start = CGF.EmitLValueForFieldInitialization(DestLV, *Field); llvm::Value *ArrayStart = ArrayPtr.emitRawPointer(CGF); CGF.EmitStoreThroughLValue(RValue::get(ArrayStart), Start); ++Field; - - if (Field == Record->field_end()) { - CGF.ErrorUnsupported(E, "weird std::initializer_list"); - return; - } + assert(Field != Record->field_end() && + "Expected std::initializer_list to have two fields"); llvm::Value *Size = Builder.getInt(ArrayType->getSize()); LValue EndOrLength = CGF.EmitLValueForFieldInitialization(DestLV, *Field); - if (Field->getType()->isPointerType() && - Ctx.hasSameType(Field->getType()->getPointeeType(), - ArrayType->getElementType())) { + if (Ctx.hasSameType(Field->getType(), Ctx.getSizeType())) { + // Length. + CGF.EmitStoreThroughLValue(RValue::get(Size), EndOrLength); + + } else { // End pointer. + assert(Field->getType()->isPointerType() && + Ctx.hasSameType(Field->getType()->getPointeeType(), + ArrayType->getElementType()) && + "Expected std::initializer_list second field to be const E *"); llvm::Value *Zero = llvm::ConstantInt::get(CGF.PtrDiffTy, 0); llvm::Value *IdxEnd[] = { Zero, Size }; llvm::Value *ArrayEnd = Builder.CreateInBoundsGEP( ArrayPtr.getElementType(), ArrayPtr.emitRawPointer(CGF), IdxEnd, "arrayend"); CGF.EmitStoreThroughLValue(RValue::get(ArrayEnd), EndOrLength); - } else if (Ctx.hasSameType(Field->getType(), Ctx.getSizeType())) { - // Length. - CGF.EmitStoreThroughLValue(RValue::get(Size), EndOrLength); - } else { - CGF.ErrorUnsupported(E, "weird std::initializer_list"); - return; } + + assert(++Field == Record->field_end() && + "Expected std::initializer_list to only have two fields"); } /// Determine if E is a trivial array filler, that is, one that is @@ -506,6 +498,16 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, uint64_t NumInitElements = Args.size(); uint64_t NumArrayElements = AType->getNumElements(); + for (const auto *Init : Args) { + if (const auto *Embed = dyn_cast(Init->IgnoreParenImpCasts())) { + NumInitElements += Embed->getDataElementCount() - 1; + if (NumInitElements > NumArrayElements) { + NumInitElements = NumArrayElements; + break; + } + } + } + assert(NumInitElements <= NumArrayElements); QualType elementType = @@ -574,23 +576,37 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, llvm::Value *one = llvm::ConstantInt::get(CGF.SizeTy, 1); - // Emit the explicit initializers. - for (uint64_t i = 0; i != NumInitElements; ++i) { + auto Emit = [&](Expr *Init, uint64_t ArrayIndex) { llvm::Value *element = begin; - if (i > 0) { - element = Builder.CreateInBoundsGEP(llvmElementType, begin, - llvm::ConstantInt::get(CGF.SizeTy, i), - "arrayinit.element"); + if (ArrayIndex > 0) { + element = Builder.CreateInBoundsGEP( + llvmElementType, begin, + llvm::ConstantInt::get(CGF.SizeTy, ArrayIndex), "arrayinit.element"); // Tell the cleanup that it needs to destroy up to this // element. TODO: some of these stores can be trivially // observed to be unnecessary. - if (endOfInit.isValid()) Builder.CreateStore(element, endOfInit); + if (endOfInit.isValid()) + Builder.CreateStore(element, endOfInit); } LValue elementLV = CGF.MakeAddrLValue( Address(element, llvmElementType, elementAlign), elementType); - EmitInitializationToLValue(Args[i], elementLV); + EmitInitializationToLValue(Init, elementLV); + return true; + }; + + unsigned ArrayIndex = 0; + // Emit the explicit initializers. + for (uint64_t i = 0; i != NumInitElements; ++i) { + if (ArrayIndex >= NumInitElements) + break; + if (auto *EmbedS = dyn_cast(Args[i]->IgnoreParenImpCasts())) { + EmbedS->doForEachDataElement(Emit, ArrayIndex); + } else { + Emit(Args[i], ArrayIndex); + ArrayIndex++; + } } // Check whether there's a non-trivial array-fill expression. diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 0712f40fd8215a0..dffb8ce83b64374 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1061,6 +1061,24 @@ class ConstExprEmitter return Visit(E->getInitializer(), T); } + llvm::Constant *ProduceIntToIntCast(const Expr *E, QualType DestType) { + QualType FromType = E->getType(); + // See also HandleIntToIntCast in ExprConstant.cpp + if (FromType->isIntegerType()) + if (llvm::Constant *C = Visit(E, FromType)) + if (auto *CI = dyn_cast(C)) { + unsigned SrcWidth = CGM.getContext().getIntWidth(FromType); + unsigned DstWidth = CGM.getContext().getIntWidth(DestType); + if (DstWidth == SrcWidth) + return CI; + llvm::APInt A = FromType->isSignedIntegerType() + ? CI->getValue().sextOrTrunc(DstWidth) + : CI->getValue().zextOrTrunc(DstWidth); + return llvm::ConstantInt::get(CGM.getLLVMContext(), A); + } + return nullptr; + } + llvm::Constant *VisitCastExpr(const CastExpr *E, QualType destType) { if (const auto *ECE = dyn_cast(E)) CGM.EmitExplicitCastExprType(ECE, Emitter.CGF); @@ -1142,23 +1160,8 @@ class ConstExprEmitter case CK_IntToOCLSampler: llvm_unreachable("global sampler variables are not generated"); - case CK_IntegralCast: { - QualType FromType = subExpr->getType(); - // See also HandleIntToIntCast in ExprConstant.cpp - if (FromType->isIntegerType()) - if (llvm::Constant *C = Visit(subExpr, FromType)) - if (auto *CI = dyn_cast(C)) { - unsigned SrcWidth = CGM.getContext().getIntWidth(FromType); - unsigned DstWidth = CGM.getContext().getIntWidth(destType); - if (DstWidth == SrcWidth) - return CI; - llvm::APInt A = FromType->isSignedIntegerType() - ? CI->getValue().sextOrTrunc(DstWidth) - : CI->getValue().zextOrTrunc(DstWidth); - return llvm::ConstantInt::get(CGM.getLLVMContext(), A); - } - return nullptr; - } + case CK_IntegralCast: + return ProduceIntToIntCast(subExpr, destType); case CK_Dependent: llvm_unreachable("saw dependent cast!"); @@ -1249,15 +1252,42 @@ class ConstExprEmitter return llvm::ConstantInt::get(CGM.getLLVMContext(), I->getValue()); } + static APValue withDestType(ASTContext &Ctx, const Expr *E, QualType SrcType, + QualType DestType, const llvm::APSInt &Value) { + if (!Ctx.hasSameType(SrcType, DestType)) { + if (DestType->isFloatingType()) { + llvm::APFloat Result = + llvm::APFloat(Ctx.getFloatTypeSemantics(DestType), 1); + llvm::RoundingMode RM = + E->getFPFeaturesInEffect(Ctx.getLangOpts()).getRoundingMode(); + if (RM == llvm::RoundingMode::Dynamic) + RM = llvm::RoundingMode::NearestTiesToEven; + Result.convertFromAPInt(Value, Value.isSigned(), RM); + return APValue(Result); + } + } + return APValue(Value); + } + llvm::Constant *EmitArrayInitialization(const InitListExpr *ILE, QualType T) { auto *CAT = CGM.getContext().getAsConstantArrayType(ILE->getType()); assert(CAT && "can't emit array init for non-constant-bound array"); + uint64_t NumInitElements = ILE->getNumInits(); const uint64_t NumElements = CAT->getZExtSize(); + for (const auto *Init : ILE->inits()) { + if (const auto *Embed = + dyn_cast(Init->IgnoreParenImpCasts())) { + NumInitElements += Embed->getDataElementCount() - 1; + if (NumInitElements > NumElements) { + NumInitElements = NumElements; + break; + } + } + } // Initialising an array requires us to automatically // initialise any elements that have not been initialised explicitly - uint64_t NumInitableElts = - std::min(ILE->getNumInits(), NumElements); + uint64_t NumInitableElts = std::min(NumInitElements, NumElements); QualType EltType = CAT->getElementType(); @@ -1270,23 +1300,61 @@ class ConstExprEmitter } // Copy initializer elements. - SmallVector Elts; + SmallVector Elts; if (fillC && fillC->isNullValue()) Elts.reserve(NumInitableElts + 1); else Elts.reserve(NumElements); llvm::Type *CommonElementType = nullptr; - for (unsigned i = 0; i < NumInitableElts; ++i) { - const Expr *Init = ILE->getInit(i); - llvm::Constant *C = Emitter.tryEmitPrivateForMemory(Init, EltType); + auto Emit = [&](const Expr *Init, unsigned ArrayIndex) { + llvm::Constant *C = nullptr; + C = Emitter.tryEmitPrivateForMemory(Init, EltType); if (!C) - return nullptr; - if (i == 0) + return false; + if (ArrayIndex == 0) CommonElementType = C->getType(); else if (C->getType() != CommonElementType) CommonElementType = nullptr; Elts.push_back(C); + return true; + }; + + unsigned ArrayIndex = 0; + QualType DestTy = CAT->getElementType(); + for (unsigned i = 0; i < ILE->getNumInits(); ++i) { + const Expr *Init = ILE->getInit(i); + if (auto *EmbedS = dyn_cast(Init->IgnoreParenImpCasts())) { + StringLiteral *SL = EmbedS->getDataStringLiteral(); + llvm::APSInt Value(CGM.getContext().getTypeSize(DestTy), + DestTy->isUnsignedIntegerType()); + llvm::Constant *C; + for (unsigned I = EmbedS->getStartingElementPos(), + N = EmbedS->getDataElementCount(); + I != EmbedS->getStartingElementPos() + N; ++I) { + Value = SL->getCodeUnit(I); + if (DestTy->isIntegerType()) { + C = llvm::ConstantInt::get(CGM.getLLVMContext(), Value); + } else { + C = Emitter.tryEmitPrivateForMemory( + withDestType(CGM.getContext(), Init, EmbedS->getType(), DestTy, + Value), + EltType); + } + if (!C) + return nullptr; + Elts.push_back(C); + ArrayIndex++; + } + if ((ArrayIndex - EmbedS->getDataElementCount()) == 0) + CommonElementType = C->getType(); + else if (C->getType() != CommonElementType) + CommonElementType = nullptr; + } else { + if (!Emit(Init, ArrayIndex)) + return nullptr; + ArrayIndex++; + } } llvm::ArrayType *Desired = @@ -1856,6 +1924,12 @@ class ConstantLValueEmitter : public ConstStmtVisitor + emitPointerAuthDiscriminator(const Expr *E); + bool hasNonZeroOffset() const { return !Value.getLValueOffset().isZero(); } @@ -1950,8 +2024,25 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { if (D->hasAttr()) return CGM.GetWeakRefReference(D).getPointer(); + auto PtrAuthSign = [&](llvm::Constant *C) { + CGPointerAuthInfo AuthInfo = CGM.getFunctionPointerAuthInfo(DestType); + + if (AuthInfo) { + if (hasNonZeroOffset()) + return ConstantLValue(nullptr); + + C = applyOffset(C); + C = CGM.getConstantSignedPointer( + C, AuthInfo.getKey(), nullptr, + cast_or_null(AuthInfo.getDiscriminator())); + return ConstantLValue(C, /*applied offset*/ true); + } + + return ConstantLValue(C); + }; + if (auto FD = dyn_cast(D)) - return CGM.GetAddrOfFunction(FD); + return PtrAuthSign(CGM.getRawFunctionPointer(FD)); if (auto VD = dyn_cast(D)) { // We can never refer to a variable with local storage. @@ -2048,6 +2139,10 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { if (builtin == Builtin::BI__builtin_function_start) return CGM.GetFunctionStart( E->getArg(0)->getAsBuiltinConstantDeclRef(CGM.getContext())); + + if (builtin == Builtin::BI__builtin_ptrauth_sign_constant) + return emitPointerAuthSignConstant(E); + if (builtin != Builtin::BI__builtin___CFStringMakeConstantString && builtin != Builtin::BI__builtin___NSStringMakeConstantString) return nullptr; @@ -2061,6 +2156,55 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { } } +ConstantLValue +ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) { + llvm::Constant *UnsignedPointer = emitPointerAuthPointer(E->getArg(0)); + unsigned Key = emitPointerAuthKey(E->getArg(1)); + auto [StorageAddress, OtherDiscriminator] = + emitPointerAuthDiscriminator(E->getArg(2)); + + llvm::Constant *SignedPointer = CGM.getConstantSignedPointer( + UnsignedPointer, Key, StorageAddress, OtherDiscriminator); + return SignedPointer; +} + +llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { + Expr::EvalResult Result; + bool Succeeded = E->EvaluateAsRValue(Result, CGM.getContext()); + assert(Succeeded); + (void)Succeeded; + + // The assertions here are all checked by Sema. + assert(Result.Val.isLValue()); + return ConstantEmitter(CGM, Emitter.CGF) + .emitAbstract(E->getExprLoc(), Result.Val, E->getType()); +} + +unsigned ConstantLValueEmitter::emitPointerAuthKey(const Expr *E) { + return E->EvaluateKnownConstInt(CGM.getContext()).getZExtValue(); +} + +std::pair +ConstantLValueEmitter::emitPointerAuthDiscriminator(const Expr *E) { + E = E->IgnoreParens(); + + if (const auto *Call = dyn_cast(E)) { + if (Call->getBuiltinCallee() == + Builtin::BI__builtin_ptrauth_blend_discriminator) { + llvm::Constant *Pointer = ConstantEmitter(CGM).emitAbstract( + Call->getArg(0), Call->getArg(0)->getType()); + auto *Extra = cast(ConstantEmitter(CGM).emitAbstract( + Call->getArg(1), Call->getArg(1)->getType())); + return {Pointer, Extra}; + } + } + + llvm::Constant *Result = ConstantEmitter(CGM).emitAbstract(E, E->getType()); + if (Result->getType()->isPointerTy()) + return {Result, nullptr}; + return {nullptr, cast(Result)}; +} + ConstantLValue ConstantLValueEmitter::VisitBlockExpr(const BlockExpr *E) { StringRef functionName; diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 7e76e57bc3f02ba..f40f3c273206bb3 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -506,6 +506,7 @@ class ScalarExprEmitter } Value *VisitSYCLUniqueStableNameExpr(SYCLUniqueStableNameExpr *E); + Value *VisitEmbedExpr(EmbedExpr *E); Value *VisitOpaqueValueExpr(OpaqueValueExpr *E) { if (E->isGLValue()) @@ -1796,6 +1797,12 @@ ScalarExprEmitter::VisitSYCLUniqueStableNameExpr(SYCLUniqueStableNameExpr *E) { "usn_addr_cast"); } +Value *ScalarExprEmitter::VisitEmbedExpr(EmbedExpr *E) { + assert(E->getDataElementCount() == 1); + auto It = E->begin(); + return Builder.getInt((*It)->getValue()); +} + Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) { // Vector Mask Case if (E->getNumSubExprs() == 2) { diff --git a/clang/lib/CodeGen/CGPointerAuth.cpp b/clang/lib/CodeGen/CGPointerAuth.cpp new file mode 100644 index 000000000000000..f0819b046748985 --- /dev/null +++ b/clang/lib/CodeGen/CGPointerAuth.cpp @@ -0,0 +1,82 @@ +//===--- CGPointerAuth.cpp - IR generation for pointer authentication -----===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file contains common routines relating to the emission of +// pointer authentication operations. +// +//===----------------------------------------------------------------------===// + +#include "CodeGenModule.h" +#include "clang/CodeGen/CodeGenABITypes.h" + +using namespace clang; +using namespace CodeGen; + +/// Return the abstract pointer authentication schema for a pointer to the given +/// function type. +CGPointerAuthInfo CodeGenModule::getFunctionPointerAuthInfo(QualType T) { + const auto &Schema = getCodeGenOpts().PointerAuth.FunctionPointers; + if (!Schema) + return CGPointerAuthInfo(); + + assert(!Schema.isAddressDiscriminated() && + "function pointers cannot use address-specific discrimination"); + + assert(!Schema.hasOtherDiscrimination() && + "function pointers don't support any discrimination yet"); + + return CGPointerAuthInfo(Schema.getKey(), Schema.getAuthenticationMode(), + /*IsaPointer=*/false, /*AuthenticatesNull=*/false, + /*Discriminator=*/nullptr); +} + +llvm::Constant * +CodeGenModule::getConstantSignedPointer(llvm::Constant *Pointer, unsigned Key, + llvm::Constant *StorageAddress, + llvm::ConstantInt *OtherDiscriminator) { + llvm::Constant *AddressDiscriminator; + if (StorageAddress) { + assert(StorageAddress->getType() == UnqualPtrTy); + AddressDiscriminator = StorageAddress; + } else { + AddressDiscriminator = llvm::Constant::getNullValue(UnqualPtrTy); + } + + llvm::ConstantInt *IntegerDiscriminator; + if (OtherDiscriminator) { + assert(OtherDiscriminator->getType() == Int64Ty); + IntegerDiscriminator = OtherDiscriminator; + } else { + IntegerDiscriminator = llvm::ConstantInt::get(Int64Ty, 0); + } + + return llvm::ConstantPtrAuth::get(Pointer, + llvm::ConstantInt::get(Int32Ty, Key), + IntegerDiscriminator, AddressDiscriminator); +} + +llvm::Constant *CodeGenModule::getFunctionPointer(llvm::Constant *Pointer, + QualType FunctionType) { + assert(FunctionType->isFunctionType() || + FunctionType->isFunctionReferenceType() || + FunctionType->isFunctionPointerType()); + + if (auto PointerAuth = getFunctionPointerAuthInfo(FunctionType)) + return getConstantSignedPointer( + Pointer, PointerAuth.getKey(), /*StorageAddress=*/nullptr, + cast_or_null(PointerAuth.getDiscriminator())); + + return Pointer; +} + +llvm::Constant *CodeGenModule::getFunctionPointer(GlobalDecl GD, + llvm::Type *Ty) { + const auto *FD = cast(GD.getDecl()); + QualType FuncType = FD->getType(); + return getFunctionPointer(getRawFunctionPointer(GD, Ty), FuncType); +} diff --git a/clang/lib/CodeGen/CGPointerAuthInfo.h b/clang/lib/CodeGen/CGPointerAuthInfo.h new file mode 100644 index 000000000000000..0a0c11fb423f25e --- /dev/null +++ b/clang/lib/CodeGen/CGPointerAuthInfo.h @@ -0,0 +1,99 @@ +//===----- CGPointerAuthInfo.h - -------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Pointer auth info class. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_LIB_CODEGEN_CGPOINTERAUTHINFO_H +#define LLVM_CLANG_LIB_CODEGEN_CGPOINTERAUTHINFO_H + +#include "clang/AST/Type.h" +#include "clang/Basic/LangOptions.h" +#include "llvm/IR/Type.h" +#include "llvm/IR/Value.h" + +namespace clang { +namespace CodeGen { + +class CGPointerAuthInfo { +private: + PointerAuthenticationMode AuthenticationMode : 2; + unsigned IsIsaPointer : 1; + unsigned AuthenticatesNullValues : 1; + unsigned Key : 2; + llvm::Value *Discriminator; + +public: + CGPointerAuthInfo() + : AuthenticationMode(PointerAuthenticationMode::None), + IsIsaPointer(false), AuthenticatesNullValues(false), Key(0), + Discriminator(nullptr) {} + CGPointerAuthInfo(unsigned Key, PointerAuthenticationMode AuthenticationMode, + bool IsIsaPointer, bool AuthenticatesNullValues, + llvm::Value *Discriminator) + : AuthenticationMode(AuthenticationMode), IsIsaPointer(IsIsaPointer), + AuthenticatesNullValues(AuthenticatesNullValues), Key(Key), + Discriminator(Discriminator) { + assert(!Discriminator || Discriminator->getType()->isIntegerTy() || + Discriminator->getType()->isPointerTy()); + } + + explicit operator bool() const { return isSigned(); } + + bool isSigned() const { + return AuthenticationMode != PointerAuthenticationMode::None; + } + + unsigned getKey() const { + assert(isSigned()); + return Key; + } + llvm::Value *getDiscriminator() const { + assert(isSigned()); + return Discriminator; + } + + PointerAuthenticationMode getAuthenticationMode() const { + return AuthenticationMode; + } + + bool isIsaPointer() const { return IsIsaPointer; } + + bool authenticatesNullValues() const { return AuthenticatesNullValues; } + + bool shouldStrip() const { + return AuthenticationMode == PointerAuthenticationMode::Strip || + AuthenticationMode == PointerAuthenticationMode::SignAndStrip; + } + + bool shouldSign() const { + return AuthenticationMode == PointerAuthenticationMode::SignAndStrip || + AuthenticationMode == PointerAuthenticationMode::SignAndAuth; + } + + bool shouldAuth() const { + return AuthenticationMode == PointerAuthenticationMode::SignAndAuth; + } + + friend bool operator!=(const CGPointerAuthInfo &LHS, + const CGPointerAuthInfo &RHS) { + return LHS.Key != RHS.Key || LHS.Discriminator != RHS.Discriminator || + LHS.AuthenticationMode != RHS.AuthenticationMode; + } + + friend bool operator==(const CGPointerAuthInfo &LHS, + const CGPointerAuthInfo &RHS) { + return !(LHS != RHS); + } +}; + +} // end namespace CodeGen +} // end namespace clang + +#endif diff --git a/clang/lib/CodeGen/CMakeLists.txt b/clang/lib/CodeGen/CMakeLists.txt index 7a933d0ed0d0d7d..8dd9d8b54c25faa 100644 --- a/clang/lib/CodeGen/CMakeLists.txt +++ b/clang/lib/CodeGen/CMakeLists.txt @@ -89,6 +89,7 @@ add_clang_library(clangCodeGen CGOpenCLRuntime.cpp CGOpenMPRuntime.cpp CGOpenMPRuntimeGPU.cpp + CGPointerAuth.cpp CGRecordLayoutBuilder.cpp CGStmt.cpp CGStmtOpenMP.cpp diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 200c40da8bc43be..650c5662539f9f9 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -861,6 +861,11 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, FD->getBody()->getStmtClass() == Stmt::CoroutineBodyStmtClass) SanOpts.Mask &= ~SanitizerKind::Null; + // Add pointer authentication attributes. + const CodeGenOptions &CodeGenOpts = CGM.getCodeGenOpts(); + if (CodeGenOpts.PointerAuth.FunctionPointers) + Fn->addFnAttr("ptrauth-calls"); + // Apply xray attributes to the function (as a string, for now) bool AlwaysXRayAttr = false; if (const auto *XRayAttr = D ? D->getAttr() : nullptr) { @@ -3042,3 +3047,19 @@ llvm::Value *CodeGenFunction::emitBoolVecConversion(llvm::Value *SrcVec, return Builder.CreateShuffleVector(SrcVec, ShuffleMask, Name); } + +void CodeGenFunction::EmitPointerAuthOperandBundle( + const CGPointerAuthInfo &PointerAuth, + SmallVectorImpl &Bundles) { + if (!PointerAuth.isSigned()) + return; + + auto *Key = Builder.getInt32(PointerAuth.getKey()); + + llvm::Value *Discriminator = PointerAuth.getDiscriminator(); + if (!Discriminator) + Discriminator = Builder.getSize(0); + + llvm::Value *Args[] = {Key, Discriminator}; + Bundles.emplace_back("ptrauth", Args); +} diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index cdb5ae66634054a..a9c497bde687173 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -4417,6 +4417,10 @@ class CodeGenFunction : public CodeGenTypeCache { bool isPointerKnownNonNull(const Expr *E); + void EmitPointerAuthOperandBundle( + const CGPointerAuthInfo &Info, + SmallVectorImpl &Bundles); + // Return the copy constructor name with the prefix "__copy_constructor_" // removed. static std::string getNonTrivialCopyConstructorStr(QualType QT, diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 9b63f47ef42cba4..9913304757caa77 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -69,6 +69,7 @@ class Expr; class Stmt; class StringLiteral; class NamedDecl; +class PointerAuthSchema; class ValueDecl; class VarDecl; class LangOptions; @@ -937,6 +938,30 @@ class CodeGenModule : public CodeGenTypeCache { // Return the function body address of the given function. llvm::Constant *GetFunctionStart(const ValueDecl *Decl); + /// Return a function pointer for a reference to the given function. + /// This correctly handles weak references, but does not apply a + /// pointer signature. + llvm::Constant *getRawFunctionPointer(GlobalDecl GD, + llvm::Type *Ty = nullptr); + + /// Return the ABI-correct function pointer value for a reference + /// to the given function. This will apply a pointer signature if + /// necessary, caching the result for the given function. + llvm::Constant *getFunctionPointer(GlobalDecl GD, llvm::Type *Ty = nullptr); + + /// Return the ABI-correct function pointer value for a reference + /// to the given function. This will apply a pointer signature if + /// necessary. + llvm::Constant *getFunctionPointer(llvm::Constant *Pointer, + QualType FunctionType); + + CGPointerAuthInfo getFunctionPointerAuthInfo(QualType T); + + llvm::Constant * + getConstantSignedPointer(llvm::Constant *Pointer, unsigned Key, + llvm::Constant *StorageAddress, + llvm::ConstantInt *OtherDiscriminator); + // Return whether RTTI information should be emitted for this target. bool shouldEmitRTTI(bool ForEH = false) { return (ForEH || getLangOpts().RTTI) && !getLangOpts().CUDAIsDevice && diff --git a/clang/lib/CodeGen/Targets/AArch64.cpp b/clang/lib/CodeGen/Targets/AArch64.cpp index cfb4b5f58ef7290..8ebf3d9a51b50ab 100644 --- a/clang/lib/CodeGen/Targets/AArch64.cpp +++ b/clang/lib/CodeGen/Targets/AArch64.cpp @@ -965,7 +965,7 @@ void AArch64ABIInfo::appendAttributeMangling(StringRef AttrStr, llvm::SmallDenseSet UniqueFeats; for (auto &Feat : Features) - if (auto Ext = llvm::AArch64::parseArchExtension(Feat)) + if (auto Ext = llvm::AArch64::parseFMVExtension(Feat)) if (UniqueFeats.insert(Ext->Name).second) Out << 'M' << Ext->Name; } diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 67bf0604acd6ead..0298d22203d9d49 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -4595,6 +4595,7 @@ Action *Driver::BuildOffloadingActions(Compilation &C, for (const ToolChain *TC : ToolChains) for (StringRef Arch : getOffloadArchs(C, Args, Kind, TC)) TCAndArchs.push_back(std::make_pair(TC, Arch)); + llvm::sort(TCAndArchs, llvm::less_second()); for (unsigned I = 0, E = TCAndArchs.size(); I != E; ++I) DeviceActions.push_back(C.MakeAction(*InputArg, InputType)); diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp index 20f879e2f75cb80..453daed7cc7d5b7 100644 --- a/clang/lib/Driver/ToolChains/AMDGPU.cpp +++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp @@ -14,6 +14,7 @@ #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/InputInfo.h" #include "clang/Driver/Options.h" +#include "clang/Driver/SanitizerArgs.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Option/ArgList.h" #include "llvm/Support/Error.h" @@ -946,6 +947,11 @@ void ROCMToolChain::addClangTargetOptions( DriverArgs, LibDeviceFile, Wave64, DAZ, FiniteOnly, UnsafeMathOpt, FastRelaxedMath, CorrectSqrt, ABIVer, false)); + if (getSanitizerArgs(DriverArgs).needsAsanRt()) { + CC1Args.push_back("-mlink-bitcode-file"); + CC1Args.push_back( + DriverArgs.MakeArgString(RocmInstallation->getAsanRTLPath())); + } for (StringRef BCFile : BCLibs) { CC1Args.push_back("-mlink-builtin-bitcode"); CC1Args.push_back(DriverArgs.MakeArgString(BCFile)); diff --git a/clang/lib/Driver/ToolChains/AMDGPU.h b/clang/lib/Driver/ToolChains/AMDGPU.h index 13c0e138f08f3a5..7e70dae8ce152e5 100644 --- a/clang/lib/Driver/ToolChains/AMDGPU.h +++ b/clang/lib/Driver/ToolChains/AMDGPU.h @@ -140,6 +140,9 @@ class LLVM_LIBRARY_VISIBILITY ROCMToolChain : public AMDGPUToolChain { getCommonDeviceLibNames(const llvm::opt::ArgList &DriverArgs, const std::string &GPUArch, bool isOpenMP = false) const; + SanitizerMask getSupportedSanitizers() const override { + return SanitizerKind::Address; + } }; } // end namespace toolchains diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 331cf6e713d8906..2ce9e2f4bcfcd48 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -1220,7 +1220,8 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, Args.addAllArgs(CmdArgs, {options::OPT_D, options::OPT_U, options::OPT_I_Group, - options::OPT_F, options::OPT_index_header_map}); + options::OPT_F, options::OPT_index_header_map, + options::OPT_embed_dir_EQ}); // Add -Wp, and -Xpreprocessor if using the preprocessor. @@ -8505,6 +8506,9 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA, // Pass along any -I options so we get proper .include search paths. Args.AddAllArgs(CmdArgs, options::OPT_I_Group); + // Pass along any --embed-dir or similar options so we get proper embed paths. + Args.AddAllArgs(CmdArgs, options::OPT_embed_dir_EQ); + // Determine the original source input. auto FindSource = [](const Action *S) -> const Action * { while (S->getKind() != Action::InputClass) { diff --git a/clang/lib/Format/CMakeLists.txt b/clang/lib/Format/CMakeLists.txt index 84a3c136f650a85..b787b11ac7b744c 100644 --- a/clang/lib/Format/CMakeLists.txt +++ b/clang/lib/Format/CMakeLists.txt @@ -29,3 +29,27 @@ add_clang_library(clangFormat clangToolingCore clangToolingInclusions ) + +file(GLOB_RECURSE files + *.cpp + *.h + ../../include/clang/Format/*.h + ../../tools/clang-format/*.cpp + ../../unittests/Format/*.cpp + ../../unittests/Format/*.h + ) + +set(check_format_depends) +set(i 0) +foreach (file IN LISTS files) + add_custom_command(OUTPUT clang-format-check-format${i} + COMMAND clang-format ${file} | diff -u ${file} - + VERBATIM + COMMENT "Checking format of ${file}..." + ) + list(APPEND check_format_depends "clang-format-check-format${i}") + + math(EXPR i ${i}+1) +endforeach () + +add_custom_target(clang-format-check-format DEPENDS ${check_format_depends}) diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 87e3e712d699357..63a028a6f477932 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -2661,18 +2661,27 @@ class AnnotatingParser { /// Determine whether ')' is ending a cast. bool rParenEndsCast(const FormatToken &Tok) { + assert(Tok.is(tok::r_paren)); + + if (!Tok.MatchingParen || !Tok.Previous) + return false; + // C-style casts are only used in C++, C# and Java. - if (!Style.isCSharp() && !IsCpp && Style.Language != FormatStyle::LK_Java) + if (!IsCpp && !Style.isCSharp() && Style.Language != FormatStyle::LK_Java) return false; + const auto *LParen = Tok.MatchingParen; + const auto *BeforeRParen = Tok.Previous; + const auto *AfterRParen = Tok.Next; + // Empty parens aren't casts and there are no casts at the end of the line. - if (Tok.Previous == Tok.MatchingParen || !Tok.Next || !Tok.MatchingParen) + if (BeforeRParen == LParen || !AfterRParen) return false; - if (Tok.MatchingParen->is(TT_OverloadedOperatorLParen)) + if (LParen->is(TT_OverloadedOperatorLParen)) return false; - FormatToken *LeftOfParens = Tok.MatchingParen->getPreviousNonComment(); + auto *LeftOfParens = LParen->getPreviousNonComment(); if (LeftOfParens) { // If there is a closing parenthesis left of the current // parentheses, look past it as these might be chained casts. @@ -2728,37 +2737,38 @@ class AnnotatingParser { } } - if (Tok.Next->is(tok::question) || - (Tok.Next->is(tok::ampamp) && !Tok.Previous->isTypeName(LangOpts))) { + if (AfterRParen->is(tok::question) || + (AfterRParen->is(tok::ampamp) && !BeforeRParen->isTypeName(LangOpts))) { return false; } // `foreach((A a, B b) in someList)` should not be seen as a cast. - if (Tok.Next->is(Keywords.kw_in) && Style.isCSharp()) + if (AfterRParen->is(Keywords.kw_in) && Style.isCSharp()) return false; // Functions which end with decorations like volatile, noexcept are unlikely // to be casts. - if (Tok.Next->isOneOf(tok::kw_noexcept, tok::kw_volatile, tok::kw_const, - tok::kw_requires, tok::kw_throw, tok::arrow, - Keywords.kw_override, Keywords.kw_final) || - isCppAttribute(IsCpp, *Tok.Next)) { + if (AfterRParen->isOneOf(tok::kw_noexcept, tok::kw_volatile, tok::kw_const, + tok::kw_requires, tok::kw_throw, tok::arrow, + Keywords.kw_override, Keywords.kw_final) || + isCppAttribute(IsCpp, *AfterRParen)) { return false; } // As Java has no function types, a "(" after the ")" likely means that this // is a cast. - if (Style.Language == FormatStyle::LK_Java && Tok.Next->is(tok::l_paren)) + if (Style.Language == FormatStyle::LK_Java && AfterRParen->is(tok::l_paren)) return true; // If a (non-string) literal follows, this is likely a cast. - if (Tok.Next->isOneOf(tok::kw_sizeof, tok::kw_alignof) || - (Tok.Next->Tok.isLiteral() && Tok.Next->isNot(tok::string_literal))) { + if (AfterRParen->isOneOf(tok::kw_sizeof, tok::kw_alignof) || + (AfterRParen->Tok.isLiteral() && + AfterRParen->isNot(tok::string_literal))) { return true; } // Heuristically try to determine whether the parentheses contain a type. - auto IsQualifiedPointerOrReference = [](FormatToken *T, + auto IsQualifiedPointerOrReference = [](const FormatToken *T, const LangOptions &LangOpts) { // This is used to handle cases such as x = (foo *const)&y; assert(!T->isTypeName(LangOpts) && "Should have already been checked"); @@ -2791,12 +2801,11 @@ class AnnotatingParser { return T && T->is(TT_PointerOrReference); }; bool ParensAreType = - !Tok.Previous || - Tok.Previous->isOneOf(TT_TemplateCloser, TT_TypeDeclarationParen) || - Tok.Previous->isTypeName(LangOpts) || - IsQualifiedPointerOrReference(Tok.Previous, LangOpts); + BeforeRParen->isOneOf(TT_TemplateCloser, TT_TypeDeclarationParen) || + BeforeRParen->isTypeName(LangOpts) || + IsQualifiedPointerOrReference(BeforeRParen, LangOpts); bool ParensCouldEndDecl = - Tok.Next->isOneOf(tok::equal, tok::semi, tok::l_brace, tok::greater); + AfterRParen->isOneOf(tok::equal, tok::semi, tok::l_brace, tok::greater); if (ParensAreType && !ParensCouldEndDecl) return true; @@ -2808,49 +2817,49 @@ class AnnotatingParser { // Certain token types inside the parentheses mean that this can't be a // cast. - for (const FormatToken *Token = Tok.MatchingParen->Next; Token != &Tok; - Token = Token->Next) { + for (const auto *Token = LParen->Next; Token != &Tok; Token = Token->Next) if (Token->is(TT_BinaryOperator)) return false; - } // If the following token is an identifier or 'this', this is a cast. All // cases where this can be something else are handled above. - if (Tok.Next->isOneOf(tok::identifier, tok::kw_this)) + if (AfterRParen->isOneOf(tok::identifier, tok::kw_this)) return true; // Look for a cast `( x ) (`. - if (Tok.Next->is(tok::l_paren) && Tok.Previous && Tok.Previous->Previous) { - if (Tok.Previous->is(tok::identifier) && - Tok.Previous->Previous->is(tok::l_paren)) { + if (AfterRParen->is(tok::l_paren) && BeforeRParen->Previous) { + if (BeforeRParen->is(tok::identifier) && + BeforeRParen->Previous->is(tok::l_paren)) { return true; } } - if (!Tok.Next->Next) + if (!AfterRParen->Next) return false; // If the next token after the parenthesis is a unary operator, assume // that this is cast, unless there are unexpected tokens inside the // parenthesis. - const bool NextIsAmpOrStar = Tok.Next->isOneOf(tok::amp, tok::star); - if (!(Tok.Next->isUnaryOperator() || NextIsAmpOrStar) || - Tok.Next->is(tok::plus) || - !Tok.Next->Next->isOneOf(tok::identifier, tok::numeric_constant)) { + const bool NextIsAmpOrStar = AfterRParen->isOneOf(tok::amp, tok::star); + if (!(AfterRParen->isUnaryOperator() || NextIsAmpOrStar) || + AfterRParen->is(tok::plus) || + !AfterRParen->Next->isOneOf(tok::identifier, tok::numeric_constant)) { return false; } + if (NextIsAmpOrStar && - (Tok.Next->Next->is(tok::numeric_constant) || Line.InPPDirective)) { + (AfterRParen->Next->is(tok::numeric_constant) || Line.InPPDirective)) { return false; } - if (Line.InPPDirective && Tok.Next->is(tok::minus)) + + if (Line.InPPDirective && AfterRParen->is(tok::minus)) return false; + // Search for unexpected tokens. - for (FormatToken *Prev = Tok.Previous; Prev != Tok.MatchingParen; - Prev = Prev->Previous) { + for (auto *Prev = BeforeRParen; Prev != LParen; Prev = Prev->Previous) if (!Prev->isOneOf(tok::kw_const, tok::identifier, tok::coloncolon)) return false; - } + return true; } diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 58694e5399d58ca..a6d9f42ace9cc9b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1458,6 +1458,29 @@ static void setPGOUseInstrumentor(CodeGenOptions &Opts, Opts.setProfileUse(CodeGenOptions::ProfileClangInstr); } +void CompilerInvocation::setDefaultPointerAuthOptions( + PointerAuthOptions &Opts, const LangOptions &LangOpts, + const llvm::Triple &Triple) { + assert(Triple.getArch() == llvm::Triple::aarch64); + if (LangOpts.PointerAuthCalls) { + using Key = PointerAuthSchema::ARM8_3Key; + using Discrimination = PointerAuthSchema::Discrimination; + // If you change anything here, be sure to update . + Opts.FunctionPointers = + PointerAuthSchema(Key::ASIA, false, Discrimination::None); + } +} + +static void parsePointerAuthOptions(PointerAuthOptions &Opts, + const LangOptions &LangOpts, + const llvm::Triple &Triple, + DiagnosticsEngine &Diags) { + if (!LangOpts.PointerAuthCalls) + return; + + CompilerInvocation::setDefaultPointerAuthOptions(Opts, LangOpts, Triple); +} + void CompilerInvocationBase::GenerateCodeGenArgs(const CodeGenOptions &Opts, ArgumentConsumer Consumer, const llvm::Triple &T, @@ -2153,6 +2176,9 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.EmitVersionIdentMetadata = Args.hasFlag(OPT_Qy, OPT_Qn, true); + if (!LangOpts->CUDAIsDevice) + parsePointerAuthOptions(Opts.PointerAuth, *LangOpts, T, Diags); + if (Args.hasArg(options::OPT_ffinite_loops)) Opts.FiniteLoops = CodeGenOptions::FiniteLoopsKind::Always; else if (Args.hasArg(options::OPT_fno_finite_loops)) @@ -4492,6 +4518,9 @@ static void GeneratePreprocessorArgs(const PreprocessorOptions &Opts, if (Opts.DefineTargetOSMacros) GenerateArg(Consumer, OPT_fdefine_target_os_macros); + for (const auto &EmbedEntry : Opts.EmbedEntries) + GenerateArg(Consumer, OPT_embed_dir_EQ, EmbedEntry); + // Don't handle LexEditorPlaceholders. It is implied by the action that is // generated elsewhere. } @@ -4584,6 +4613,11 @@ static bool ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, } } + for (const auto *A : Args.filtered(OPT_embed_dir_EQ)) { + StringRef Val = A->getValue(); + Opts.EmbedEntries.push_back(std::string(Val)); + } + // Always avoid lexing editor placeholders when we're just running the // preprocessor as we never want to emit the // "editor placeholder in source file" error in PP only mode. diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 369816e89e1d6cc..528eae2c5283ea1 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -62,6 +62,19 @@ struct DepCollectorPPCallbacks : public PPCallbacks { /*IsMissing=*/false); } + void EmbedDirective(SourceLocation, StringRef, bool, + OptionalFileEntryRef File, + const LexEmbedParametersResult &) override { + assert(File && "expected to only be called when the file is found"); + StringRef FileName = + llvm::sys::path::remove_leading_dotslash(File->getName()); + DepCollector.maybeAddDependency(FileName, + /*FromModule*/ false, + /*IsSystem*/ false, + /*IsModuleFile*/ false, + /*IsMissing*/ false); + } + void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, @@ -77,6 +90,18 @@ struct DepCollectorPPCallbacks : public PPCallbacks { // Files that actually exist are handled by FileChanged. } + void HasEmbed(SourceLocation, StringRef, bool, + OptionalFileEntryRef File) override { + if (!File) + return; + StringRef Filename = + llvm::sys::path::remove_leading_dotslash(File->getName()); + DepCollector.maybeAddDependency(Filename, + /*FromModule=*/false, false, + /*IsModuleFile=*/false, + /*IsMissing=*/false); + } + void HasInclude(SourceLocation Loc, StringRef SpelledFilename, bool IsAngled, OptionalFileEntryRef File, SrcMgr::CharacteristicKind FileType) override { diff --git a/clang/lib/Frontend/DependencyGraph.cpp b/clang/lib/Frontend/DependencyGraph.cpp index 20e5f233e224e2c..c23ce66a40dd0b3 100644 --- a/clang/lib/Frontend/DependencyGraph.cpp +++ b/clang/lib/Frontend/DependencyGraph.cpp @@ -43,7 +43,7 @@ class DependencyGraphCallback : public PPCallbacks { public: DependencyGraphCallback(const Preprocessor *_PP, StringRef OutputFile, StringRef SysRoot) - : PP(_PP), OutputFile(OutputFile.str()), SysRoot(SysRoot.str()) { } + : PP(_PP), OutputFile(OutputFile.str()), SysRoot(SysRoot.str()) {} void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, @@ -53,6 +53,10 @@ class DependencyGraphCallback : public PPCallbacks { bool ModuleImported, SrcMgr::CharacteristicKind FileType) override; + void EmbedDirective(SourceLocation HashLoc, StringRef FileName, bool IsAngled, + OptionalFileEntryRef File, + const LexEmbedParametersResult &Params) override; + void EndOfMainFile() override { OutputGraphFile(); } @@ -86,6 +90,24 @@ void DependencyGraphCallback::InclusionDirective( AllFiles.insert(*FromFile); } +void DependencyGraphCallback::EmbedDirective(SourceLocation HashLoc, StringRef, + bool, OptionalFileEntryRef File, + const LexEmbedParametersResult &) { + if (!File) + return; + + SourceManager &SM = PP->getSourceManager(); + OptionalFileEntryRef FromFile = + SM.getFileEntryRefForID(SM.getFileID(SM.getExpansionLoc(HashLoc))); + if (!FromFile) + return; + + Dependencies[*FromFile].push_back(*File); + + AllFiles.insert(*File); + AllFiles.insert(*FromFile); +} + raw_ostream & DependencyGraphCallback::writeNodeReference(raw_ostream &OS, const FileEntry *Node) { diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index e8c8a5175f8f416..2d5c94c76025228 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -508,6 +508,14 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__STDC_UTF_16__", "1"); Builder.defineMacro("__STDC_UTF_32__", "1"); + // __has_embed definitions + Builder.defineMacro("__STDC_EMBED_NOT_FOUND__", + llvm::itostr(static_cast(EmbedResult::NotFound))); + Builder.defineMacro("__STDC_EMBED_FOUND__", + llvm::itostr(static_cast(EmbedResult::Found))); + Builder.defineMacro("__STDC_EMBED_EMPTY__", + llvm::itostr(static_cast(EmbedResult::Empty))); + if (LangOpts.ObjC) Builder.defineMacro("__OBJC__"); diff --git a/clang/lib/Frontend/PrecompiledPreamble.cpp b/clang/lib/Frontend/PrecompiledPreamble.cpp index fdf05c3613c9563..cab5838fceb24d9 100644 --- a/clang/lib/Frontend/PrecompiledPreamble.cpp +++ b/clang/lib/Frontend/PrecompiledPreamble.cpp @@ -28,6 +28,7 @@ #include "llvm/Config/llvm-config.h" #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/FileSystem.h" +#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" #include "llvm/Support/VirtualFileSystem.h" diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index a26d2c3ab8582b9..0592423c12eca45 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -11,11 +11,11 @@ // //===----------------------------------------------------------------------===// -#include "clang/Frontend/Utils.h" #include "clang/Basic/CharInfo.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceManager.h" #include "clang/Frontend/PreprocessorOutputOptions.h" +#include "clang/Frontend/Utils.h" #include "clang/Lex/MacroInfo.h" #include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Pragma.h" @@ -93,6 +93,7 @@ class PrintPPOutputPPCallbacks : public PPCallbacks { bool DisableLineMarkers; bool DumpDefines; bool DumpIncludeDirectives; + bool DumpEmbedDirectives; bool UseLineDirectives; bool IsFirstFileEntered; bool MinimizeWhitespace; @@ -100,6 +101,7 @@ class PrintPPOutputPPCallbacks : public PPCallbacks { bool KeepSystemIncludes; raw_ostream *OrigOS; std::unique_ptr NullOS; + unsigned NumToksToSkip; Token PrevTok; Token PrevPrevTok; @@ -107,14 +109,16 @@ class PrintPPOutputPPCallbacks : public PPCallbacks { public: PrintPPOutputPPCallbacks(Preprocessor &pp, raw_ostream *os, bool lineMarkers, bool defines, bool DumpIncludeDirectives, - bool UseLineDirectives, bool MinimizeWhitespace, - bool DirectivesOnly, bool KeepSystemIncludes) + bool DumpEmbedDirectives, bool UseLineDirectives, + bool MinimizeWhitespace, bool DirectivesOnly, + bool KeepSystemIncludes) : PP(pp), SM(PP.getSourceManager()), ConcatInfo(PP), OS(os), DisableLineMarkers(lineMarkers), DumpDefines(defines), DumpIncludeDirectives(DumpIncludeDirectives), + DumpEmbedDirectives(DumpEmbedDirectives), UseLineDirectives(UseLineDirectives), MinimizeWhitespace(MinimizeWhitespace), DirectivesOnly(DirectivesOnly), - KeepSystemIncludes(KeepSystemIncludes), OrigOS(os) { + KeepSystemIncludes(KeepSystemIncludes), OrigOS(os), NumToksToSkip(0) { CurLine = 0; CurFilename += ""; EmittedTokensOnThisLine = false; @@ -129,6 +133,10 @@ class PrintPPOutputPPCallbacks : public PPCallbacks { PrevPrevTok.startToken(); } + /// Returns true if #embed directives should be expanded into a comma- + /// delimited list of integer constants or not. + bool expandEmbedContents() const { return !DumpEmbedDirectives; } + bool isMinimizeWhitespace() const { return MinimizeWhitespace; } void setEmittedTokensOnThisLine() { EmittedTokensOnThisLine = true; } @@ -149,6 +157,9 @@ class PrintPPOutputPPCallbacks : public PPCallbacks { void FileChanged(SourceLocation Loc, FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, FileID PrevFID) override; + void EmbedDirective(SourceLocation HashLoc, StringRef FileName, bool IsAngled, + OptionalFileEntryRef File, + const LexEmbedParametersResult &Params) override; void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, @@ -232,6 +243,9 @@ class PrintPPOutputPPCallbacks : public PPCallbacks { void BeginModule(const Module *M); void EndModule(const Module *M); + + unsigned GetNumToksToSkip() const { return NumToksToSkip; } + void ResetSkipToks() { NumToksToSkip = 0; } }; } // end anonymous namespace @@ -399,6 +413,74 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc, } } +void PrintPPOutputPPCallbacks::EmbedDirective( + SourceLocation HashLoc, StringRef FileName, bool IsAngled, + OptionalFileEntryRef File, const LexEmbedParametersResult &Params) { + if (!DumpEmbedDirectives) + return; + + // The EmbedDirective() callback is called before we produce the annotation + // token stream for the directive. We skip printing the annotation tokens + // within PrintPreprocessedTokens(), but we also need to skip the prefix, + // suffix, and if_empty tokens as those are inserted directly into the token + // stream and would otherwise be printed immediately after printing the + // #embed directive. + // + // FIXME: counting tokens to skip is a kludge but we have no way to know + // which tokens were inserted as part of the embed and which ones were + // explicitly written by the user. + MoveToLine(HashLoc, /*RequireStartOfLine=*/true); + *OS << "#embed " << (IsAngled ? '<' : '"') << FileName + << (IsAngled ? '>' : '"'); + + auto PrintToks = [&](llvm::ArrayRef Toks) { + SmallString<128> SpellingBuffer; + for (const Token &T : Toks) { + if (T.hasLeadingSpace()) + *OS << " "; + *OS << PP.getSpelling(T, SpellingBuffer); + } + }; + bool SkipAnnotToks = true; + if (Params.MaybeIfEmptyParam) { + *OS << " if_empty("; + PrintToks(Params.MaybeIfEmptyParam->Tokens); + *OS << ")"; + // If the file is empty, we can skip those tokens. If the file is not + // empty, we skip the annotation tokens. + if (File && !File->getSize()) { + NumToksToSkip += Params.MaybeIfEmptyParam->Tokens.size(); + SkipAnnotToks = false; + } + } + + if (Params.MaybeLimitParam) { + *OS << " limit(" << Params.MaybeLimitParam->Limit << ")"; + } + if (Params.MaybeOffsetParam) { + *OS << " clang::offset(" << Params.MaybeOffsetParam->Offset << ")"; + } + if (Params.MaybePrefixParam) { + *OS << " prefix("; + PrintToks(Params.MaybePrefixParam->Tokens); + *OS << ")"; + NumToksToSkip += Params.MaybePrefixParam->Tokens.size(); + } + if (Params.MaybeSuffixParam) { + *OS << " suffix("; + PrintToks(Params.MaybeSuffixParam->Tokens); + *OS << ")"; + NumToksToSkip += Params.MaybeSuffixParam->Tokens.size(); + } + + // We may need to skip the annotation token. + if (SkipAnnotToks) + NumToksToSkip++; + + *OS << " /* clang -E -dE */"; + setEmittedDirectiveOnThisLine(); +} + void PrintPPOutputPPCallbacks::InclusionDirective( SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, OptionalFileEntryRef File, @@ -678,7 +760,7 @@ void PrintPPOutputPPCallbacks::HandleWhitespaceBeforeTok(const Token &Tok, if (Tok.is(tok::eof) || (Tok.isAnnotation() && !Tok.is(tok::annot_header_unit) && !Tok.is(tok::annot_module_begin) && !Tok.is(tok::annot_module_end) && - !Tok.is(tok::annot_repl_input_end))) + !Tok.is(tok::annot_repl_input_end) && !Tok.is(tok::annot_embed))) return; // EmittedDirectiveOnThisLine takes priority over RequireSameLine. @@ -878,6 +960,27 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, std::string Name = M->getFullModuleName(); Callbacks->OS->write(Name.data(), Name.size()); Callbacks->HandleNewlinesInToken(Name.data(), Name.size()); + } else if (Tok.is(tok::annot_embed)) { + // Manually explode the binary data out to a stream of comma-delimited + // integer values. If the user passed -dE, that is handled by the + // EmbedDirective() callback. We should only get here if the user did not + // pass -dE. + assert(Callbacks->expandEmbedContents() && + "did not expect an embed annotation"); + auto *Data = + reinterpret_cast(Tok.getAnnotationValue()); + + // Loop over the contents and print them as a comma-delimited list of + // values. + bool PrintComma = false; + for (auto Iter = Data->BinaryData.begin(), End = Data->BinaryData.end(); + Iter != End; ++Iter) { + if (PrintComma) + *Callbacks->OS << ", "; + *Callbacks->OS << static_cast(*Iter); + PrintComma = true; + } + IsStartOfLine = true; } else if (Tok.isAnnotation()) { // Ignore annotation tokens created by pragmas - the pragmas themselves // will be reproduced in the preprocessed output. @@ -926,6 +1029,10 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, if (Tok.is(tok::eof)) break; PP.Lex(Tok); + // If lexing that token causes us to need to skip future tokens, do so now. + for (unsigned I = 0, Skip = Callbacks->GetNumToksToSkip(); I < Skip; ++I) + PP.Lex(Tok); + Callbacks->ResetSkipToks(); } } @@ -982,8 +1089,9 @@ void clang::DoPrintPreprocessedInput(Preprocessor &PP, raw_ostream *OS, PrintPPOutputPPCallbacks *Callbacks = new PrintPPOutputPPCallbacks( PP, OS, !Opts.ShowLineMarkers, Opts.ShowMacros, - Opts.ShowIncludeDirectives, Opts.UseLineDirectives, - Opts.MinimizeWhitespace, Opts.DirectivesOnly, Opts.KeepSystemIncludes); + Opts.ShowIncludeDirectives, Opts.ShowEmbedDirectives, + Opts.UseLineDirectives, Opts.MinimizeWhitespace, Opts.DirectivesOnly, + Opts.KeepSystemIncludes); // Expand macros in pragmas with -fms-extensions. The assumption is that // the majority of pragmas in such a file will be Microsoft pragmas. diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt index d3090e488306f0b..89fa0ecd45eb4ca 100644 --- a/clang/lib/Headers/CMakeLists.txt +++ b/clang/lib/Headers/CMakeLists.txt @@ -318,8 +318,10 @@ set(ppc_wrapper_files set(openmp_wrapper_files openmp_wrappers/math.h openmp_wrappers/cmath - openmp_wrappers/complex.h + # Due to a bug in CMake, `complex` must be before `complex.h` + # See: https://gitlab.kitware.com/cmake/cmake/-/issues/26058 openmp_wrappers/complex + openmp_wrappers/complex.h openmp_wrappers/__clang_openmp_device_functions.h openmp_wrappers/complex_cmath.h openmp_wrappers/new diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h index 1227f45d5432b9c..d2250926ce5e100 100644 --- a/clang/lib/Headers/intrin.h +++ b/clang/lib/Headers/intrin.h @@ -330,24 +330,35 @@ static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } -static inline int _inp(unsigned short port) { - int ret; - __asm__ volatile("inb %w1, %b0" : "=a"(ret) : "Nd"(port)); +static inline unsigned char __inbyte(unsigned short port) { + unsigned char ret; + __asm__ __volatile__("inb %w1, %b0" : "=a"(ret) : "Nd"(port)); return ret; } -static inline unsigned short _inpw(unsigned short port) { +static inline unsigned short __inword(unsigned short port) { unsigned short ret; - __asm__ volatile("inw %w1, %w0" : "=a"(ret) : "Nd"(port)); + __asm__ __volatile__("inw %w1, %w0" : "=a"(ret) : "Nd"(port)); return ret; } -static inline unsigned long _inpd(unsigned short port) { +static inline unsigned long __indword(unsigned short port) { unsigned long ret; - __asm__ volatile("inl %w1, %k0" : "=a"(ret) : "Nd"(port)); + __asm__ __volatile__("inl %w1, %k0" : "=a"(ret) : "Nd"(port)); return ret; } +static inline void __outbyte(unsigned short port, unsigned char data) { + __asm__ __volatile__("outb %b0, %w1" : : "a"(data), "Nd"(port)); +} + +static inline void __outword(unsigned short port, unsigned short data) { + __asm__ __volatile__("outw %w0, %w1" : : "a"(data), "Nd"(port)); +} + +static inline void __outdword(unsigned short port, unsigned long data) { + __asm__ __volatile__("outl %k0, %w1" : : "a"(data), "Nd"(port)); +} #endif #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) diff --git a/clang/lib/Headers/ptrauth.h b/clang/lib/Headers/ptrauth.h index a9d182aa24470a0..1a4bd02933ea235 100644 --- a/clang/lib/Headers/ptrauth.h +++ b/clang/lib/Headers/ptrauth.h @@ -28,6 +28,12 @@ typedef enum { /* A process-specific key which can be used to sign data pointers. */ ptrauth_key_process_dependent_data = ptrauth_key_asdb, + /* The key used to sign C function pointers. + The extra data is always 0. */ + ptrauth_key_function_pointer = ptrauth_key_process_independent_code, + + /* Other pointers signed under the ABI use private ABI rules. */ + } ptrauth_key; /* An integer type of the appropriate size for a discriminator argument. */ @@ -68,12 +74,30 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; On arm64e, the integer must fall within the range of a uint16_t; other bits may be ignored. + For the purposes of ptrauth_sign_constant, the result of calling + this function is considered a constant expression if the arguments + are constant. Some restrictions may be imposed on the pointer. + The first argument must be an expression of pointer type. The second argument must be an expression of integer type. The result will have type uintptr_t. */ #define ptrauth_blend_discriminator(__pointer, __integer) \ __builtin_ptrauth_blend_discriminator(__pointer, __integer) +/* Return a signed pointer for a constant address in a manner which guarantees + a non-attackable sequence. + + The value must be a constant expression of pointer type which evaluates to + a non-null pointer. + The key must be a constant expression of type ptrauth_key. + The extra data must be a constant expression of pointer or integer type; + if an integer, it will be coerced to ptrauth_extra_data_t. + The result will have the same type as the original value. + + This can be used in constant expressions. */ +#define ptrauth_sign_constant(__value, __key, __data) \ + __builtin_ptrauth_sign_constant(__value, __key, __data) + /* Add a signature to the given pointer value using a specific key, using the given extra data as a salt to the signing process. @@ -113,6 +137,27 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; __builtin_ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \ __new_data) +/* Authenticate a pointer using one scheme and resign it as a C + function pointer. + + If the result is subsequently authenticated using the new scheme, that + authentication is guaranteed to fail if and only if the initial + authentication failed. + + The value must be an expression of function pointer type. + The key must be a constant expression of type ptrauth_key. + The extra data must be an expression of pointer or integer type; + if an integer, it will be coerced to ptrauth_extra_data_t. + The result will have the same type as the original value. + + This operation is guaranteed to not leave the intermediate value + available for attack before it is re-signed. Additionally, if this + expression is used syntactically as the function expression in a + call, only a single authentication will be performed. */ +#define ptrauth_auth_function(__value, __old_key, __old_data) \ + ptrauth_auth_and_resign(__value, __old_key, __old_data, \ + ptrauth_key_function_pointer, 0) + /* Authenticate a data pointer. The value must be an expression of non-function pointer type. @@ -125,6 +170,19 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; #define ptrauth_auth_data(__value, __old_key, __old_data) \ __builtin_ptrauth_auth(__value, __old_key, __old_data) +/* Compute a constant discriminator from the given string. + + The argument must be a string literal of char character type. The result + has type ptrauth_extra_data_t. + + The result value is never zero and always within range for both the + __ptrauth qualifier and ptrauth_blend_discriminator. + + This can be used in constant expressions. +*/ +#define ptrauth_string_discriminator(__string) \ + __builtin_ptrauth_string_discriminator(__string) + /* Compute a signature for the given pair of pointer-sized values. The order of the arguments is significant. @@ -162,6 +220,13 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; ((ptrauth_extra_data_t)0); \ }) +#define ptrauth_sign_constant(__value, __key, __data) \ + ({ \ + (void)__key; \ + (void)__data; \ + __value; \ + }) + #define ptrauth_sign_unauthenticated(__value, __key, __data) \ ({ \ (void)__key; \ @@ -179,6 +244,13 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; __value; \ }) +#define ptrauth_auth_function(__value, __old_key, __old_data) \ + ({ \ + (void)__old_key; \ + (void)__old_data; \ + __value; \ + }) + #define ptrauth_auth_data(__value, __old_key, __old_data) \ ({ \ (void)__old_key; \ @@ -186,6 +258,12 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; __value; \ }) +#define ptrauth_string_discriminator(__string) \ + ({ \ + (void)__string; \ + ((ptrauth_extra_data_t)0); \ + }) + #define ptrauth_sign_generic_data(__value, __data) \ ({ \ (void)__value; \ diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 3bd3aa447ff40bf..c3b3064cfbf28ba 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -25,11 +25,11 @@ #include "clang/Lex/Preprocessor.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/Hashing.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Capacity.h" #include "llvm/Support/Errc.h" @@ -37,6 +37,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/VirtualFileSystem.h" +#include "llvm/Support/xxhash.h" #include #include #include @@ -282,10 +283,10 @@ std::string HeaderSearch::getCachedModuleFileNameImpl(StringRef ModuleName, if (getModuleMap().canonicalizeModuleMapPath(CanonicalPath)) return {}; - llvm::hash_code Hash = llvm::hash_combine(CanonicalPath.str().lower()); + auto Hash = llvm::xxh3_64bits(CanonicalPath.str().lower()); SmallString<128> HashStr; - llvm::APInt(64, size_t(Hash)).toStringUnsigned(HashStr, /*Radix*/36); + llvm::APInt(64, Hash).toStringUnsigned(HashStr, /*Radix*/36); llvm::sys::path::append(Result, ModuleName + "-" + HashStr + ".pcm"); } return Result.str().str(); diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 8e7386449dcedba..94410bc7e078ab7 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -19,6 +19,7 @@ #include "clang/Basic/Module.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" +#include "clang/Basic/TargetInfo.h" #include "clang/Basic/TokenKinds.h" #include "clang/Lex/CodeCompletionHandler.h" #include "clang/Lex/HeaderSearch.h" @@ -39,6 +40,7 @@ #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/AlignOf.h" @@ -82,8 +84,7 @@ Preprocessor::AllocateVisibilityMacroDirective(SourceLocation Loc, /// Read and discard all tokens remaining on the current line until /// the tok::eod token is found. -SourceRange Preprocessor::DiscardUntilEndOfDirective() { - Token Tmp; +SourceRange Preprocessor::DiscardUntilEndOfDirective(Token &Tmp) { SourceRange Res; LexUnexpandedToken(Tmp); @@ -1073,6 +1074,74 @@ OptionalFileEntryRef Preprocessor::LookupFile( return std::nullopt; } +OptionalFileEntryRef +Preprocessor::LookupEmbedFile(StringRef Filename, bool isAngled, bool OpenFile, + const FileEntry *LookupFromFile) { + FileManager &FM = this->getFileManager(); + if (llvm::sys::path::is_absolute(Filename)) { + // lookup path or immediately fail + llvm::Expected ShouldBeEntry = + FM.getFileRef(Filename, OpenFile); + return llvm::expectedToOptional(std::move(ShouldBeEntry)); + } + + auto SeparateComponents = [](SmallVectorImpl &LookupPath, + StringRef StartingFrom, StringRef FileName, + bool RemoveInitialFileComponentFromLookupPath) { + llvm::sys::path::native(StartingFrom, LookupPath); + if (RemoveInitialFileComponentFromLookupPath) + llvm::sys::path::remove_filename(LookupPath); + if (!LookupPath.empty() && + !llvm::sys::path::is_separator(LookupPath.back())) { + LookupPath.push_back(llvm::sys::path::get_separator().front()); + } + LookupPath.append(FileName.begin(), FileName.end()); + }; + + // Otherwise, it's search time! + SmallString<512> LookupPath; + // Non-angled lookup + if (!isAngled) { + if (LookupFromFile) { + // Use file-based lookup. + StringRef FullFileDir = LookupFromFile->tryGetRealPathName(); + if (!FullFileDir.empty()) { + SeparateComponents(LookupPath, FullFileDir, Filename, true); + llvm::Expected ShouldBeEntry = + FM.getFileRef(LookupPath, OpenFile); + if (ShouldBeEntry) + return llvm::expectedToOptional(std::move(ShouldBeEntry)); + llvm::consumeError(ShouldBeEntry.takeError()); + } + } + + // Otherwise, do working directory lookup. + LookupPath.clear(); + auto MaybeWorkingDirEntry = FM.getDirectoryRef("."); + if (MaybeWorkingDirEntry) { + DirectoryEntryRef WorkingDirEntry = *MaybeWorkingDirEntry; + StringRef WorkingDir = WorkingDirEntry.getName(); + if (!WorkingDir.empty()) { + SeparateComponents(LookupPath, WorkingDir, Filename, false); + llvm::Expected ShouldBeEntry = + FM.getFileRef(LookupPath, OpenFile); + if (ShouldBeEntry) + return llvm::expectedToOptional(std::move(ShouldBeEntry)); + llvm::consumeError(ShouldBeEntry.takeError()); + } + } + } + + for (const auto &Entry : PPOpts->EmbedEntries) { + LookupPath.clear(); + SeparateComponents(LookupPath, Entry, Filename, false); + llvm::Expected ShouldBeEntry = + FM.getFileRef(LookupPath, OpenFile); + return llvm::expectedToOptional(std::move(ShouldBeEntry)); + } + return std::nullopt; +} + //===----------------------------------------------------------------------===// // Preprocessor Directive Handling. //===----------------------------------------------------------------------===// @@ -1168,6 +1237,7 @@ void Preprocessor::HandleDirective(Token &Result) { case tok::pp_include_next: case tok::pp___include_macros: case tok::pp_pragma: + case tok::pp_embed: Diag(Result, diag::err_embedded_directive) << II->getName(); Diag(*ArgMacro, diag::note_macro_expansion_here) << ArgMacro->getIdentifierInfo(); @@ -1282,6 +1352,11 @@ void Preprocessor::HandleDirective(Token &Result) { return HandleIdentSCCSDirective(Result); case tok::pp_sccs: return HandleIdentSCCSDirective(Result); + case tok::pp_embed: + return HandleEmbedDirective(SavedHash.getLocation(), Result, + getCurrentFileLexer() + ? *getCurrentFileLexer()->getFileEntry() + : static_cast(nullptr)); case tok::pp_assert: //isExtension = true; // FIXME: implement #assert break; @@ -3543,3 +3618,399 @@ void Preprocessor::HandleElifFamilyDirective(Token &ElifToken, HashToken.getLocation(), CI.IfLoc, /*Foundnonskip*/ true, /*FoundElse*/ CI.FoundElse, ElifToken.getLocation()); } + +std::optional +Preprocessor::LexEmbedParameters(Token &CurTok, bool ForHasEmbed) { + LexEmbedParametersResult Result{}; + SmallVector ParameterTokens; + tok::TokenKind EndTokenKind = ForHasEmbed ? tok::r_paren : tok::eod; + Result.ParamRange = {CurTok.getLocation(), CurTok.getLocation()}; + + auto DiagMismatchedBracesAndSkipToEOD = + [&](tok::TokenKind Expected, + std::pair Matches) { + Result.ParamRange.setEnd(CurTok.getEndLoc()); + Diag(CurTok, diag::err_expected) << Expected; + Diag(Matches.second, diag::note_matching) << Matches.first; + if (CurTok.isNot(tok::eod)) + DiscardUntilEndOfDirective(CurTok); + }; + + auto ExpectOrDiagAndSkipToEOD = [&](tok::TokenKind Kind) { + if (CurTok.isNot(Kind)) { + Result.ParamRange.setEnd(CurTok.getEndLoc()); + Diag(CurTok, diag::err_expected) << Kind; + if (CurTok.isNot(tok::eod)) + DiscardUntilEndOfDirective(CurTok); + return false; + } + return true; + }; + + // C23 6.10: + // pp-parameter-name: + // pp-standard-parameter + // pp-prefixed-parameter + // + // pp-standard-parameter: + // identifier + // + // pp-prefixed-parameter: + // identifier :: identifier + auto LexPPParameterName = [&]() -> std::optional { + // We expect the current token to be an identifier; if it's not, things + // have gone wrong. + if (!ExpectOrDiagAndSkipToEOD(tok::identifier)) + return std::nullopt; + + const IdentifierInfo *Prefix = CurTok.getIdentifierInfo(); + + // Lex another token; it is either a :: or we're done with the parameter + // name. + LexNonComment(CurTok); + if (CurTok.is(tok::coloncolon)) { + // We found a ::, so lex another identifier token. + LexNonComment(CurTok); + if (!ExpectOrDiagAndSkipToEOD(tok::identifier)) + return std::nullopt; + + const IdentifierInfo *Suffix = CurTok.getIdentifierInfo(); + + // Lex another token so we're past the name. + LexNonComment(CurTok); + return (llvm::Twine(Prefix->getName()) + "::" + Suffix->getName()).str(); + } + return Prefix->getName().str(); + }; + + // C23 6.10p5: In all aspects, a preprocessor standard parameter specified by + // this document as an identifier pp_param and an identifier of the form + // __pp_param__ shall behave the same when used as a preprocessor parameter, + // except for the spelling. + auto NormalizeParameterName = [](StringRef Name) { + if (Name.size() > 4 && Name.starts_with("__") && Name.ends_with("__")) + return Name.substr(2, Name.size() - 4); + return Name; + }; + + auto LexParenthesizedIntegerExpr = [&]() -> std::optional { + // we have a limit parameter and its internals are processed using + // evaluation rules from #if. + if (!ExpectOrDiagAndSkipToEOD(tok::l_paren)) + return std::nullopt; + + // We do not consume the ( because EvaluateDirectiveExpression will lex + // the next token for us. + IdentifierInfo *ParameterIfNDef = nullptr; + bool EvaluatedDefined; + DirectiveEvalResult LimitEvalResult = EvaluateDirectiveExpression( + ParameterIfNDef, CurTok, EvaluatedDefined, /*CheckForEOD=*/false); + + if (!LimitEvalResult.Value) { + // If there was an error evaluating the directive expression, we expect + // to be at the end of directive token. + assert(CurTok.is(tok::eod) && "expect to be at the end of directive"); + return std::nullopt; + } + + if (!ExpectOrDiagAndSkipToEOD(tok::r_paren)) + return std::nullopt; + + // Eat the ). + LexNonComment(CurTok); + + // C23 6.10.3.2p2: The token defined shall not appear within the constant + // expression. + if (EvaluatedDefined) { + Diag(CurTok, diag::err_defined_in_pp_embed); + return std::nullopt; + } + + if (LimitEvalResult.Value) { + const llvm::APSInt &Result = *LimitEvalResult.Value; + if (Result.isNegative()) { + Diag(CurTok, diag::err_requires_positive_value) + << toString(Result, 10) << /*positive*/ 0; + return std::nullopt; + } + return Result.getLimitedValue(); + } + return std::nullopt; + }; + + auto GetMatchingCloseBracket = [](tok::TokenKind Kind) { + switch (Kind) { + case tok::l_paren: + return tok::r_paren; + case tok::l_brace: + return tok::r_brace; + case tok::l_square: + return tok::r_square; + default: + llvm_unreachable("should not get here"); + } + }; + + auto LexParenthesizedBalancedTokenSoup = + [&](llvm::SmallVectorImpl &Tokens) { + std::vector> BracketStack; + + // We expect the current token to be a left paren. + if (!ExpectOrDiagAndSkipToEOD(tok::l_paren)) + return false; + LexNonComment(CurTok); // Eat the ( + + bool WaitingForInnerCloseParen = false; + while (CurTok.isNot(tok::eod) && + (WaitingForInnerCloseParen || CurTok.isNot(tok::r_paren))) { + switch (CurTok.getKind()) { + default: // Shutting up diagnostics about not fully-covered switch. + break; + case tok::l_paren: + WaitingForInnerCloseParen = true; + [[fallthrough]]; + case tok::l_brace: + case tok::l_square: + BracketStack.push_back({CurTok.getKind(), CurTok.getLocation()}); + break; + case tok::r_paren: + WaitingForInnerCloseParen = false; + [[fallthrough]]; + case tok::r_brace: + case tok::r_square: { + tok::TokenKind Matching = + GetMatchingCloseBracket(BracketStack.back().first); + if (BracketStack.empty() || CurTok.getKind() != Matching) { + DiagMismatchedBracesAndSkipToEOD(Matching, BracketStack.back()); + return false; + } + BracketStack.pop_back(); + } break; + } + Tokens.push_back(CurTok); + LexNonComment(CurTok); + } + + // When we're done, we want to eat the closing paren. + if (!ExpectOrDiagAndSkipToEOD(tok::r_paren)) + return false; + + LexNonComment(CurTok); // Eat the ) + return true; + }; + + LexNonComment(CurTok); // Prime the pump. + while (!CurTok.isOneOf(EndTokenKind, tok::eod)) { + SourceLocation ParamStartLoc = CurTok.getLocation(); + std::optional ParamName = LexPPParameterName(); + if (!ParamName) + return std::nullopt; + StringRef Parameter = NormalizeParameterName(*ParamName); + + // Lex the parameters (dependent on the parameter type we want!). + // + // C23 6.10.3.Xp1: The X standard embed parameter may appear zero times or + // one time in the embed parameter sequence. + if (Parameter == "limit") { + if (Result.MaybeLimitParam) + Diag(CurTok, diag::err_pp_embed_dup_params) << Parameter; + + std::optional Limit = LexParenthesizedIntegerExpr(); + if (!Limit) + return std::nullopt; + Result.MaybeLimitParam = + PPEmbedParameterLimit{*Limit, {ParamStartLoc, CurTok.getLocation()}}; + } else if (Parameter == "clang::offset") { + if (Result.MaybeOffsetParam) + Diag(CurTok, diag::err_pp_embed_dup_params) << Parameter; + + std::optional Offset = LexParenthesizedIntegerExpr(); + if (!Offset) + return std::nullopt; + Result.MaybeOffsetParam = PPEmbedParameterOffset{ + *Offset, {ParamStartLoc, CurTok.getLocation()}}; + } else if (Parameter == "prefix") { + if (Result.MaybePrefixParam) + Diag(CurTok, diag::err_pp_embed_dup_params) << Parameter; + + SmallVector Soup; + if (!LexParenthesizedBalancedTokenSoup(Soup)) + return std::nullopt; + Result.MaybePrefixParam = PPEmbedParameterPrefix{ + std::move(Soup), {ParamStartLoc, CurTok.getLocation()}}; + } else if (Parameter == "suffix") { + if (Result.MaybeSuffixParam) + Diag(CurTok, diag::err_pp_embed_dup_params) << Parameter; + + SmallVector Soup; + if (!LexParenthesizedBalancedTokenSoup(Soup)) + return std::nullopt; + Result.MaybeSuffixParam = PPEmbedParameterSuffix{ + std::move(Soup), {ParamStartLoc, CurTok.getLocation()}}; + } else if (Parameter == "if_empty") { + if (Result.MaybeIfEmptyParam) + Diag(CurTok, diag::err_pp_embed_dup_params) << Parameter; + + SmallVector Soup; + if (!LexParenthesizedBalancedTokenSoup(Soup)) + return std::nullopt; + Result.MaybeIfEmptyParam = PPEmbedParameterIfEmpty{ + std::move(Soup), {ParamStartLoc, CurTok.getLocation()}}; + } else { + ++Result.UnrecognizedParams; + + // If there's a left paren, we need to parse a balanced token sequence + // and just eat those tokens. + if (CurTok.is(tok::l_paren)) { + SmallVector Soup; + if (!LexParenthesizedBalancedTokenSoup(Soup)) + return std::nullopt; + } + if (!ForHasEmbed) { + Diag(CurTok, diag::err_pp_unknown_parameter) << 1 << Parameter; + return std::nullopt; + } + } + } + Result.ParamRange.setEnd(CurTok.getLocation()); + return Result; +} + +void Preprocessor::HandleEmbedDirectiveImpl( + SourceLocation HashLoc, const LexEmbedParametersResult &Params, + StringRef BinaryContents) { + if (BinaryContents.empty()) { + // If we have no binary contents, the only thing we need to emit are the + // if_empty tokens, if any. + // FIXME: this loses AST fidelity; nothing in the compiler will see that + // these tokens came from #embed. We have to hack around this when printing + // preprocessed output. The same is true for prefix and suffix tokens. + if (Params.MaybeIfEmptyParam) { + ArrayRef Toks = Params.MaybeIfEmptyParam->Tokens; + size_t TokCount = Toks.size(); + auto NewToks = std::make_unique(TokCount); + llvm::copy(Toks, NewToks.get()); + EnterTokenStream(std::move(NewToks), TokCount, true, true); + } + return; + } + + size_t NumPrefixToks = Params.PrefixTokenCount(), + NumSuffixToks = Params.SuffixTokenCount(); + size_t TotalNumToks = 1 + NumPrefixToks + NumSuffixToks; + size_t CurIdx = 0; + auto Toks = std::make_unique(TotalNumToks); + + // Add the prefix tokens, if any. + if (Params.MaybePrefixParam) { + llvm::copy(Params.MaybePrefixParam->Tokens, &Toks[CurIdx]); + CurIdx += NumPrefixToks; + } + + EmbedAnnotationData *Data = new (BP) EmbedAnnotationData; + Data->BinaryData = BinaryContents; + + Toks[CurIdx].startToken(); + Toks[CurIdx].setKind(tok::annot_embed); + Toks[CurIdx].setAnnotationRange(HashLoc); + Toks[CurIdx++].setAnnotationValue(Data); + + // Now add the suffix tokens, if any. + if (Params.MaybeSuffixParam) { + llvm::copy(Params.MaybeSuffixParam->Tokens, &Toks[CurIdx]); + CurIdx += NumSuffixToks; + } + + assert(CurIdx == TotalNumToks && "Calculated the incorrect number of tokens"); + EnterTokenStream(std::move(Toks), TotalNumToks, true, true); +} + +void Preprocessor::HandleEmbedDirective(SourceLocation HashLoc, Token &EmbedTok, + const FileEntry *LookupFromFile) { + // Give the usual extension/compatibility warnings. + if (LangOpts.C23) + Diag(EmbedTok, diag::warn_compat_pp_embed_directive); + else + Diag(EmbedTok, diag::ext_pp_embed_directive) + << (LangOpts.CPlusPlus ? /*Clang*/ 1 : /*C23*/ 0); + + // Parse the filename header + Token FilenameTok; + if (LexHeaderName(FilenameTok)) + return; + + if (FilenameTok.isNot(tok::header_name)) { + Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename); + if (FilenameTok.isNot(tok::eod)) + DiscardUntilEndOfDirective(); + return; + } + + // Parse the optional sequence of + // directive-parameters: + // identifier parameter-name-list[opt] directive-argument-list[opt] + // directive-argument-list: + // '(' balanced-token-sequence ')' + // parameter-name-list: + // '::' identifier parameter-name-list[opt] + Token CurTok; + std::optional Params = + LexEmbedParameters(CurTok, /*ForHasEmbed=*/false); + + assert((Params || CurTok.is(tok::eod)) && + "expected success or to be at the end of the directive"); + if (!Params) + return; + + // Now, splat the data out! + SmallString<128> FilenameBuffer; + StringRef Filename = getSpelling(FilenameTok, FilenameBuffer); + StringRef OriginalFilename = Filename; + bool isAngled = + GetIncludeFilenameSpelling(FilenameTok.getLocation(), Filename); + // If GetIncludeFilenameSpelling set the start ptr to null, there was an + // error. + assert(!Filename.empty()); + OptionalFileEntryRef MaybeFileRef = + this->LookupEmbedFile(Filename, isAngled, true, LookupFromFile); + if (!MaybeFileRef) { + // could not find file + if (Callbacks && Callbacks->EmbedFileNotFound(OriginalFilename)) { + return; + } + Diag(FilenameTok, diag::err_pp_file_not_found) << Filename; + return; + } + std::optional MaybeFile = + getSourceManager().getMemoryBufferForFileOrNone(*MaybeFileRef); + if (!MaybeFile) { + // could not find file + Diag(FilenameTok, diag::err_cannot_open_file) + << Filename << "a buffer to the contents could not be created"; + return; + } + StringRef BinaryContents = MaybeFile->getBuffer(); + + // The order is important between 'offset' and 'limit'; we want to offset + // first and then limit second; otherwise we may reduce the notional resource + // size to something too small to offset into. + if (Params->MaybeOffsetParam) { + // FIXME: just like with the limit() and if_empty() parameters, this loses + // source fidelity in the AST; it has no idea that there was an offset + // involved. + // offsets all the way to the end of the file make for an empty file. + BinaryContents = BinaryContents.substr(Params->MaybeOffsetParam->Offset); + } + + if (Params->MaybeLimitParam) { + // FIXME: just like with the clang::offset() and if_empty() parameters, + // this loses source fidelity in the AST; it has no idea there was a limit + // involved. + BinaryContents = BinaryContents.substr(0, Params->MaybeLimitParam->Limit); + } + + if (Callbacks) + Callbacks->EmbedDirective(HashLoc, Filename, isAngled, MaybeFileRef, + *Params); + HandleEmbedDirectiveImpl(HashLoc, *Params, BinaryContents); +} diff --git a/clang/lib/Lex/PPExpressions.cpp b/clang/lib/Lex/PPExpressions.cpp index f267efabd617fd9..8bb82bd22eb98f5 100644 --- a/clang/lib/Lex/PPExpressions.cpp +++ b/clang/lib/Lex/PPExpressions.cpp @@ -870,7 +870,9 @@ static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, /// may occur after a #if or #elif directive. If the expression is equivalent /// to "!defined(X)" return X in IfNDefMacro. Preprocessor::DirectiveEvalResult -Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) { +Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro, + Token &Tok, bool &EvaluatedDefined, + bool CheckForEoD) { SaveAndRestore PPDir(ParsingIfOrElifDirective, true); // Save the current state of 'DisableMacroExpansion' and reset it to false. If // 'DisableMacroExpansion' is true, then we must be in a macro argument list @@ -882,7 +884,6 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) { DisableMacroExpansion = false; // Peek ahead one token. - Token Tok; LexNonComment(Tok); // C99 6.10.1p3 - All expressions are evaluated as intmax_t or uintmax_t. @@ -895,7 +896,7 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) { // Parse error, skip the rest of the macro line. SourceRange ConditionRange = ExprStartLoc; if (Tok.isNot(tok::eod)) - ConditionRange = DiscardUntilEndOfDirective(); + ConditionRange = DiscardUntilEndOfDirective(Tok); // Restore 'DisableMacroExpansion'. DisableMacroExpansion = DisableMacroExpansionAtStartOfDirective; @@ -903,11 +904,14 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) { // We cannot trust the source range from the value because there was a // parse error. Track the range manually -- the end of the directive is the // end of the condition range. - return {false, + return {std::nullopt, + false, DT.IncludedUndefinedIds, {ExprStartLoc, ConditionRange.getEnd()}}; } + EvaluatedDefined = DT.State != DefinedTracker::Unknown; + // If we are at the end of the expression after just parsing a value, there // must be no (unparenthesized) binary operators involved, so we can exit // directly. @@ -919,7 +923,10 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) { // Restore 'DisableMacroExpansion'. DisableMacroExpansion = DisableMacroExpansionAtStartOfDirective; - return {ResVal.Val != 0, DT.IncludedUndefinedIds, ResVal.getRange()}; + bool IsNonZero = ResVal.Val != 0; + SourceRange ValRange = ResVal.getRange(); + return {std::move(ResVal.Val), IsNonZero, DT.IncludedUndefinedIds, + ValRange}; } // Otherwise, we must have a binary operator (e.g. "#if 1 < 2"), so parse the @@ -928,21 +935,37 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) { Tok, true, DT.IncludedUndefinedIds, *this)) { // Parse error, skip the rest of the macro line. if (Tok.isNot(tok::eod)) - DiscardUntilEndOfDirective(); + DiscardUntilEndOfDirective(Tok); // Restore 'DisableMacroExpansion'. DisableMacroExpansion = DisableMacroExpansionAtStartOfDirective; - return {false, DT.IncludedUndefinedIds, ResVal.getRange()}; + SourceRange ValRange = ResVal.getRange(); + return {std::nullopt, false, DT.IncludedUndefinedIds, ValRange}; } - // If we aren't at the tok::eod token, something bad happened, like an extra - // ')' token. - if (Tok.isNot(tok::eod)) { - Diag(Tok, diag::err_pp_expected_eol); - DiscardUntilEndOfDirective(); + if (CheckForEoD) { + // If we aren't at the tok::eod token, something bad happened, like an extra + // ')' token. + if (Tok.isNot(tok::eod)) { + Diag(Tok, diag::err_pp_expected_eol); + DiscardUntilEndOfDirective(Tok); + } } + EvaluatedDefined = EvaluatedDefined || DT.State != DefinedTracker::Unknown; + // Restore 'DisableMacroExpansion'. DisableMacroExpansion = DisableMacroExpansionAtStartOfDirective; - return {ResVal.Val != 0, DT.IncludedUndefinedIds, ResVal.getRange()}; + bool IsNonZero = ResVal.Val != 0; + SourceRange ValRange = ResVal.getRange(); + return {std::move(ResVal.Val), IsNonZero, DT.IncludedUndefinedIds, ValRange}; +} + +Preprocessor::DirectiveEvalResult +Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro, + bool CheckForEoD) { + Token Tok; + bool EvaluatedDefined; + return EvaluateDirectiveExpression(IfNDefMacro, Tok, EvaluatedDefined, + CheckForEoD); } diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index f085b9437164427..3913ff08c2eb55b 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -380,6 +380,7 @@ void Preprocessor::RegisterBuiltinMacros() { Ident__has_c_attribute = nullptr; Ident__has_declspec = RegisterBuiltinMacro(*this, "__has_declspec_attribute"); + Ident__has_embed = RegisterBuiltinMacro(*this, "__has_embed"); Ident__has_include = RegisterBuiltinMacro(*this, "__has_include"); Ident__has_include_next = RegisterBuiltinMacro(*this, "__has_include_next"); Ident__has_warning = RegisterBuiltinMacro(*this, "__has_warning"); @@ -1279,6 +1280,105 @@ static bool EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II, return File.has_value(); } +/// EvaluateHasEmbed - Process a '__has_embed("foo" params...)' expression. +/// Returns a filled optional with the value if successful; otherwise, empty. +EmbedResult Preprocessor::EvaluateHasEmbed(Token &Tok, IdentifierInfo *II) { + // These expressions are only allowed within a preprocessor directive. + if (!this->isParsingIfOrElifDirective()) { + Diag(Tok, diag::err_pp_directive_required) << II; + // Return a valid identifier token. + assert(Tok.is(tok::identifier)); + Tok.setIdentifierInfo(II); + return EmbedResult::Invalid; + } + + // Ensure we have a '('. + LexUnexpandedToken(Tok); + if (Tok.isNot(tok::l_paren)) { + Diag(Tok, diag::err_pp_expected_after) << II << tok::l_paren; + // If the next token looks like a filename or the start of one, + // assume it is and process it as such. + return EmbedResult::Invalid; + } + + // Save '(' location for possible missing ')' message and then lex the header + // name token for the embed resource. + SourceLocation LParenLoc = Tok.getLocation(); + if (this->LexHeaderName(Tok)) + return EmbedResult::Invalid; + + if (Tok.isNot(tok::header_name)) { + Diag(Tok.getLocation(), diag::err_pp_expects_filename); + return EmbedResult::Invalid; + } + + SourceLocation FilenameLoc = Tok.getLocation(); + Token FilenameTok = Tok; + + std::optional Params = + this->LexEmbedParameters(Tok, /*ForHasEmbed=*/true); + assert((Params || Tok.is(tok::eod)) && + "expected success or to be at the end of the directive"); + + if (!Params) + return EmbedResult::Invalid; + + if (Params->UnrecognizedParams > 0) + return EmbedResult::NotFound; + + if (!Tok.is(tok::r_paren)) { + Diag(this->getLocForEndOfToken(FilenameLoc), diag::err_pp_expected_after) + << II << tok::r_paren; + Diag(LParenLoc, diag::note_matching) << tok::l_paren; + if (Tok.isNot(tok::eod)) + DiscardUntilEndOfDirective(); + return EmbedResult::Invalid; + } + + SmallString<128> FilenameBuffer; + StringRef Filename = this->getSpelling(FilenameTok, FilenameBuffer); + bool isAngled = + this->GetIncludeFilenameSpelling(FilenameTok.getLocation(), Filename); + // If GetIncludeFilenameSpelling set the start ptr to null, there was an + // error. + assert(!Filename.empty()); + const FileEntry *LookupFromFile = + this->getCurrentFileLexer() ? *this->getCurrentFileLexer()->getFileEntry() + : static_cast(nullptr); + OptionalFileEntryRef MaybeFileEntry = + this->LookupEmbedFile(Filename, isAngled, false, LookupFromFile); + if (Callbacks) { + Callbacks->HasEmbed(LParenLoc, Filename, isAngled, MaybeFileEntry); + } + if (!MaybeFileEntry) + return EmbedResult::NotFound; + + size_t FileSize = MaybeFileEntry->getSize(); + // First, "offset" into the file (this reduces the amount of data we can read + // from the file). + if (Params->MaybeOffsetParam) { + if (Params->MaybeOffsetParam->Offset > FileSize) + FileSize = 0; + else + FileSize -= Params->MaybeOffsetParam->Offset; + } + + // Second, limit the data from the file (this also reduces the amount of data + // we can read from the file). + if (Params->MaybeLimitParam) { + if (Params->MaybeLimitParam->Limit > FileSize) + FileSize = 0; + else + FileSize = Params->MaybeLimitParam->Limit; + } + + // If we have no data left to read, the file is empty, otherwise we have the + // expected resource. + if (FileSize == 0) + return EmbedResult::Empty; + return EmbedResult::Found; +} + bool Preprocessor::EvaluateHasInclude(Token &Tok, IdentifierInfo *II) { return EvaluateHasIncludeCommon(Tok, II, *this, nullptr, nullptr); } @@ -1820,6 +1920,17 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { return; OS << (int)Value; Tok.setKind(tok::numeric_constant); + } else if (II == Ident__has_embed) { + // The argument to these two builtins should be a parenthesized + // file name string literal using angle brackets (<>) or + // double-quotes (""), optionally followed by a series of + // arguments similar to form like attributes. + EmbedResult Value = EvaluateHasEmbed(Tok, II); + if (Value == EmbedResult::Invalid) + return; + + Tok.setKind(tok::numeric_constant); + OS << static_cast(Value); } else if (II == Ident__has_warning) { // The argument should be a parenthesized string literal. EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, diff --git a/clang/lib/Lex/TokenConcatenation.cpp b/clang/lib/Lex/TokenConcatenation.cpp index 1b3201bd805bf98..865879d18053368 100644 --- a/clang/lib/Lex/TokenConcatenation.cpp +++ b/clang/lib/Lex/TokenConcatenation.cpp @@ -193,9 +193,12 @@ bool TokenConcatenation::AvoidConcat(const Token &PrevPrevTok, if (Tok.isAnnotation()) { // Modules annotation can show up when generated automatically for includes. assert(Tok.isOneOf(tok::annot_module_include, tok::annot_module_begin, - tok::annot_module_end) && + tok::annot_module_end, tok::annot_embed) && "unexpected annotation in AvoidConcat"); + ConcatInfo = 0; + if (Tok.is(tok::annot_embed)) + return true; } if (ConcatInfo == 0) diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index d02548f6441f932..5e3ee5f0579aabe 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -692,7 +692,7 @@ bool Parser::ParseUsingDeclarator(DeclaratorContext Context, /// using-enum-declaration: [C++20, dcl.enum] /// 'using' elaborated-enum-specifier ; /// The terminal name of the elaborated-enum-specifier undergoes -/// ordinary lookup +/// type-only lookup /// /// elaborated-enum-specifier: /// 'enum' nested-name-specifier[opt] identifier @@ -724,7 +724,7 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( /*ObectHasErrors=*/false, /*EnteringConttext=*/false, /*MayBePseudoDestructor=*/nullptr, - /*IsTypename=*/false, + /*IsTypename=*/true, /*IdentifierInfo=*/nullptr, /*OnlyNamespace=*/false, /*InUsingDeclaration=*/true)) { @@ -738,16 +738,49 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } - if (!Tok.is(tok::identifier)) { + Decl *UED = nullptr; + + // FIXME: identifier and annot_template_id handling is very similar to + // ParseBaseTypeSpecifier. It should be factored out into a function. + if (Tok.is(tok::identifier)) { + IdentifierInfo *IdentInfo = Tok.getIdentifierInfo(); + SourceLocation IdentLoc = ConsumeToken(); + + ParsedType Type = Actions.getTypeName( + *IdentInfo, IdentLoc, getCurScope(), &SS, /*isClassName=*/true, + /*HasTrailingDot=*/false, + /*ObjectType=*/nullptr, /*IsCtorOrDtorName=*/false, + /*WantNontrivialTypeSourceInfo=*/true); + + UED = Actions.ActOnUsingEnumDeclaration( + getCurScope(), AS, UsingLoc, UELoc, IdentLoc, *IdentInfo, Type, &SS); + } else if (Tok.is(tok::annot_template_id)) { + TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok); + + if (TemplateId->mightBeType()) { + AnnotateTemplateIdTokenAsType(SS, ImplicitTypenameContext::No, + /*IsClassName=*/true); + + assert(Tok.is(tok::annot_typename) && "template-id -> type failed"); + TypeResult Type = getTypeAnnotation(Tok); + SourceRange Loc = Tok.getAnnotationRange(); + ConsumeAnnotationToken(); + + UED = Actions.ActOnUsingEnumDeclaration(getCurScope(), AS, UsingLoc, + UELoc, Loc, *TemplateId->Name, + Type.get(), &SS); + } else { + Diag(Tok.getLocation(), diag::err_using_enum_not_enum) + << TemplateId->Name->getName() + << SourceRange(TemplateId->TemplateNameLoc, TemplateId->RAngleLoc); + } + } else { Diag(Tok.getLocation(), diag::err_using_enum_expect_identifier) << Tok.is(tok::kw_enum); SkipUntil(tok::semi); return nullptr; } - IdentifierInfo *IdentInfo = Tok.getIdentifierInfo(); - SourceLocation IdentLoc = ConsumeToken(); - Decl *UED = Actions.ActOnUsingEnumDeclaration( - getCurScope(), AS, UsingLoc, UELoc, IdentLoc, *IdentInfo, &SS); + if (!UED) { SkipUntil(tok::semi); return nullptr; @@ -1403,6 +1436,8 @@ TypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, } // Check whether we have a template-id that names a type. + // FIXME: identifier and annot_template_id handling in ParseUsingDeclaration + // work very similarly. It should be refactored into a separate function. if (Tok.is(tok::annot_template_id)) { TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok); if (TemplateId->mightBeType()) { diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index eb7447fa038e479..9fc3cd73f73a0fb 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1066,6 +1066,21 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind, break; } + case tok::annot_embed: { + // We've met #embed in a context where a single value is expected. Take last + // element from #embed data as if it were a comma expression. + EmbedAnnotationData *Data = + reinterpret_cast(Tok.getAnnotationValue()); + SourceLocation StartLoc = ConsumeAnnotationToken(); + ASTContext &Context = Actions.getASTContext(); + Res = IntegerLiteral::Create(Context, + llvm::APInt(CHAR_BIT, Data->BinaryData.back()), + Context.UnsignedCharTy, StartLoc); + if (Data->BinaryData.size() > 1) + Diag(StartLoc, diag::warn_unused_comma_left_operand); + break; + } + case tok::kw___super: case tok::kw_decltype: // Annotate the token and tail recurse. @@ -3563,6 +3578,17 @@ ExprResult Parser::ParseFoldExpression(ExprResult LHS, T.getCloseLocation()); } +void Parser::ExpandEmbedDirective(SmallVectorImpl &Exprs) { + EmbedAnnotationData *Data = + reinterpret_cast(Tok.getAnnotationValue()); + SourceLocation StartLoc = ConsumeAnnotationToken(); + ASTContext &Context = Actions.getASTContext(); + for (auto Byte : Data->BinaryData) { + Exprs.push_back(IntegerLiteral::Create(Context, llvm::APInt(CHAR_BIT, Byte), + Context.UnsignedCharTy, StartLoc)); + } +} + /// ParseExpressionList - Used for C/C++ (argument-)expression-list. /// /// \verbatim @@ -3598,8 +3624,17 @@ bool Parser::ParseExpressionList(SmallVectorImpl &Exprs, if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists); Expr = ParseBraceInitializer(); - } else + } else if (Tok.is(tok::annot_embed)) { + ExpandEmbedDirective(Exprs); + if (Tok.isNot(tok::comma)) + break; + Token Comma = Tok; + ConsumeToken(); + checkPotentialAngleBracketDelimiter(Comma); + continue; + } else { Expr = ParseAssignmentExpression(); + } if (EarlyTypoCorrection) Expr = Actions.CorrectDelayedTyposInExpr(Expr); diff --git a/clang/lib/Parse/ParseInit.cpp b/clang/lib/Parse/ParseInit.cpp index 432ddc74b1087b9..0a9a359cdaf9790 100644 --- a/clang/lib/Parse/ParseInit.cpp +++ b/clang/lib/Parse/ParseInit.cpp @@ -428,6 +428,34 @@ ExprResult Parser::ParseInitializerWithPotentialDesignator( return ExprError(); } +ExprResult Parser::createEmbedExpr() { + assert(Tok.getKind() == tok::annot_embed); + EmbedAnnotationData *Data = + reinterpret_cast(Tok.getAnnotationValue()); + ExprResult Res; + ASTContext &Context = Actions.getASTContext(); + SourceLocation StartLoc = ConsumeAnnotationToken(); + if (Data->BinaryData.size() == 1) { + Res = IntegerLiteral::Create(Context, + llvm::APInt(CHAR_BIT, Data->BinaryData.back()), + Context.UnsignedCharTy, StartLoc); + } else { + auto CreateStringLiteralFromStringRef = [&](StringRef Str, QualType Ty) { + llvm::APSInt ArraySize = + Context.MakeIntValue(Str.size(), Context.getSizeType()); + QualType ArrayTy = Context.getConstantArrayType( + Ty, ArraySize, nullptr, ArraySizeModifier::Normal, 0); + return StringLiteral::Create(Context, Str, StringLiteralKind::Ordinary, + false, ArrayTy, StartLoc); + }; + + StringLiteral *BinaryDataArg = CreateStringLiteralFromStringRef( + Data->BinaryData, Context.UnsignedCharTy); + Res = Actions.ActOnEmbedExpr(StartLoc, BinaryDataArg); + } + return Res; +} + /// ParseBraceInitializer - Called when parsing an initializer that has a /// leading open brace. /// @@ -501,6 +529,8 @@ ExprResult Parser::ParseBraceInitializer() { ExprResult SubElt; if (MayBeDesignationStart()) SubElt = ParseInitializerWithPotentialDesignator(DesignatorCompletion); + else if (Tok.getKind() == tok::annot_embed) + SubElt = createEmbedExpr(); else SubElt = ParseInitializer(); diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index a5130f56600e54b..7e30afa2c64a4ff 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -1523,6 +1523,19 @@ ParsedTemplateArgument Parser::ParseTemplateArgument() { ExprArg.get(), Loc); } +void Parser::ExpandEmbedIntoTemplateArgList(TemplateArgList &TemplateArgs) { + EmbedAnnotationData *Data = + reinterpret_cast(Tok.getAnnotationValue()); + SourceLocation StartLoc = ConsumeAnnotationToken(); + ASTContext &Context = Actions.getASTContext(); + for (auto Byte : Data->BinaryData) { + Expr *E = IntegerLiteral::Create(Context, llvm::APInt(CHAR_BIT, Byte), + Context.UnsignedCharTy, StartLoc); + TemplateArgs.push_back( + ParsedTemplateArgument(ParsedTemplateArgument::NonType, E, StartLoc)); + } +} + /// ParseTemplateArgumentList - Parse a C++ template-argument-list /// (C++ [temp.names]). Returns true if there was an error. /// @@ -1547,19 +1560,23 @@ bool Parser::ParseTemplateArgumentList(TemplateArgList &TemplateArgs, do { PreferredType.enterFunctionArgument(Tok.getLocation(), RunSignatureHelp); - ParsedTemplateArgument Arg = ParseTemplateArgument(); - SourceLocation EllipsisLoc; - if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) - Arg = Actions.ActOnPackExpansion(Arg, EllipsisLoc); - - if (Arg.isInvalid()) { - if (PP.isCodeCompletionReached() && !CalledSignatureHelp) - RunSignatureHelp(); - return true; - } + if (Tok.is(tok::annot_embed)) { + ExpandEmbedIntoTemplateArgList(TemplateArgs); + } else { + ParsedTemplateArgument Arg = ParseTemplateArgument(); + SourceLocation EllipsisLoc; + if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) + Arg = Actions.ActOnPackExpansion(Arg, EllipsisLoc); + + if (Arg.isInvalid()) { + if (PP.isCodeCompletionReached() && !CalledSignatureHelp) + RunSignatureHelp(); + return true; + } - // Save this template argument. - TemplateArgs.push_back(Arg); + // Save this template argument. + TemplateArgs.push_back(Arg); + } // If the next token is a comma, consume it and keep reading // arguments. diff --git a/clang/lib/Sema/SemaAPINotes.cpp b/clang/lib/Sema/SemaAPINotes.cpp index bc1628f5b71636b..d535cb35cfbc8ba 100644 --- a/clang/lib/Sema/SemaAPINotes.cpp +++ b/clang/lib/Sema/SemaAPINotes.cpp @@ -18,6 +18,7 @@ #include "clang/Sema/SemaInternal.h" #include "clang/Sema/SemaObjC.h" #include "clang/Sema/SemaSwift.h" +#include using namespace clang; diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 07cd0727eb3f4a2..7a2076d139c6903 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -2040,8 +2040,23 @@ bool Sema::checkConstantPointerAuthKey(Expr *Arg, unsigned &Result) { return false; } -static bool checkPointerAuthValue(Sema &S, Expr *&Arg, - PointerAuthOpKind OpKind) { +static std::pair +findConstantBaseAndOffset(Sema &S, Expr *E) { + // Must evaluate as a pointer. + Expr::EvalResult Result; + if (!E->EvaluateAsRValue(Result, S.Context) || !Result.Val.isLValue()) + return {nullptr, CharUnits()}; + + const auto *BaseDecl = + Result.Val.getLValueBase().dyn_cast(); + if (!BaseDecl) + return {nullptr, CharUnits()}; + + return {BaseDecl, Result.Val.getLValueOffset()}; +} + +static bool checkPointerAuthValue(Sema &S, Expr *&Arg, PointerAuthOpKind OpKind, + bool RequireConstant = false) { if (Arg->hasPlaceholderType()) { ExprResult R = S.CheckPlaceholderExpr(Arg); if (R.isInvalid()) @@ -2084,16 +2099,87 @@ static bool checkPointerAuthValue(Sema &S, Expr *&Arg, if (convertArgumentToType(S, Arg, ExpectedTy)) return true; - // Warn about null pointers for non-generic sign and auth operations. - if ((OpKind == PAO_Sign || OpKind == PAO_Auth) && - Arg->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNull)) { - S.Diag(Arg->getExprLoc(), OpKind == PAO_Sign - ? diag::warn_ptrauth_sign_null_pointer - : diag::warn_ptrauth_auth_null_pointer) - << Arg->getSourceRange(); + if (!RequireConstant) { + // Warn about null pointers for non-generic sign and auth operations. + if ((OpKind == PAO_Sign || OpKind == PAO_Auth) && + Arg->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNull)) { + S.Diag(Arg->getExprLoc(), OpKind == PAO_Sign + ? diag::warn_ptrauth_sign_null_pointer + : diag::warn_ptrauth_auth_null_pointer) + << Arg->getSourceRange(); + } + + return false; } - return false; + // Perform special checking on the arguments to ptrauth_sign_constant. + + // The main argument. + if (OpKind == PAO_Sign) { + // Require the value we're signing to have a special form. + auto [BaseDecl, Offset] = findConstantBaseAndOffset(S, Arg); + bool Invalid; + + // Must be rooted in a declaration reference. + if (!BaseDecl) + Invalid = true; + + // If it's a function declaration, we can't have an offset. + else if (isa(BaseDecl)) + Invalid = !Offset.isZero(); + + // Otherwise we're fine. + else + Invalid = false; + + if (Invalid) + S.Diag(Arg->getExprLoc(), diag::err_ptrauth_bad_constant_pointer); + return Invalid; + } + + // The discriminator argument. + assert(OpKind == PAO_Discriminator); + + // Must be a pointer or integer or blend thereof. + Expr *Pointer = nullptr; + Expr *Integer = nullptr; + if (auto *Call = dyn_cast(Arg->IgnoreParens())) { + if (Call->getBuiltinCallee() == + Builtin::BI__builtin_ptrauth_blend_discriminator) { + Pointer = Call->getArg(0); + Integer = Call->getArg(1); + } + } + if (!Pointer && !Integer) { + if (Arg->getType()->isPointerType()) + Pointer = Arg; + else + Integer = Arg; + } + + // Check the pointer. + bool Invalid = false; + if (Pointer) { + assert(Pointer->getType()->isPointerType()); + + // TODO: if we're initializing a global, check that the address is + // somehow related to what we're initializing. This probably will + // never really be feasible and we'll have to catch it at link-time. + auto [BaseDecl, Offset] = findConstantBaseAndOffset(S, Pointer); + if (!BaseDecl || !isa(BaseDecl)) + Invalid = true; + } + + // Check the integer. + if (Integer) { + assert(Integer->getType()->isIntegerType()); + if (!Integer->isEvaluatable(S.Context)) + Invalid = true; + } + + if (Invalid) + S.Diag(Arg->getExprLoc(), diag::err_ptrauth_bad_constant_discriminator); + return Invalid; } static ExprResult PointerAuthStrip(Sema &S, CallExpr *Call) { @@ -2136,14 +2222,16 @@ static ExprResult PointerAuthSignGenericData(Sema &S, CallExpr *Call) { } static ExprResult PointerAuthSignOrAuth(Sema &S, CallExpr *Call, - PointerAuthOpKind OpKind) { + PointerAuthOpKind OpKind, + bool RequireConstant) { if (S.checkArgCount(Call, 3)) return ExprError(); if (checkPointerAuthEnabled(S, Call)) return ExprError(); - if (checkPointerAuthValue(S, Call->getArgs()[0], OpKind) || + if (checkPointerAuthValue(S, Call->getArgs()[0], OpKind, RequireConstant) || checkPointerAuthKey(S, Call->getArgs()[1]) || - checkPointerAuthValue(S, Call->getArgs()[2], PAO_Discriminator)) + checkPointerAuthValue(S, Call->getArgs()[2], PAO_Discriminator, + RequireConstant)) return ExprError(); Call->setType(Call->getArgs()[0]->getType()); @@ -2166,6 +2254,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { + if (checkPointerAuthEnabled(S, Call)) + return ExprError(); + + // We've already performed normal call type-checking. + const Expr *Arg = Call->getArg(0)->IgnoreParenImpCasts(); + + // Operand must be an ordinary or UTF-8 string literal. + const auto *Literal = dyn_cast(Arg); + if (!Literal || Literal->getCharByteWidth() != 1) { + S.Diag(Arg->getExprLoc(), diag::err_ptrauth_string_not_literal) + << (Literal ? 1 : 0) << Arg->getSourceRange(); + return ExprError(); + } + + return Call; +} + static ExprResult BuiltinLaunder(Sema &S, CallExpr *TheCall) { if (S.checkArgCount(TheCall, 1)) return ExprError(); @@ -2925,14 +3031,21 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, return PointerAuthStrip(*this, TheCall); case Builtin::BI__builtin_ptrauth_blend_discriminator: return PointerAuthBlendDiscriminator(*this, TheCall); + case Builtin::BI__builtin_ptrauth_sign_constant: + return PointerAuthSignOrAuth(*this, TheCall, PAO_Sign, + /*RequireConstant=*/true); case Builtin::BI__builtin_ptrauth_sign_unauthenticated: - return PointerAuthSignOrAuth(*this, TheCall, PAO_Sign); + return PointerAuthSignOrAuth(*this, TheCall, PAO_Sign, + /*RequireConstant=*/false); case Builtin::BI__builtin_ptrauth_auth: - return PointerAuthSignOrAuth(*this, TheCall, PAO_Auth); + return PointerAuthSignOrAuth(*this, TheCall, PAO_Auth, + /*RequireConstant=*/false); case Builtin::BI__builtin_ptrauth_sign_generic_data: return PointerAuthSignGenericData(*this, TheCall); case Builtin::BI__builtin_ptrauth_auth_and_resign: return PointerAuthAuthAndResign(*this, TheCall); + case Builtin::BI__builtin_ptrauth_string_discriminator: + return PointerAuthStringDiscriminator(*this, TheCall); // OpenCL v2.0, s6.13.16 - Pipe functions case Builtin::BIread_pipe: case Builtin::BIwrite_pipe: diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index d38700d56e4ff96..234e89b91da07af 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -12372,23 +12372,24 @@ Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, - SourceLocation EnumLoc, - SourceLocation IdentLoc, - IdentifierInfo &II, CXXScopeSpec *SS) { + SourceLocation EnumLoc, SourceRange TyLoc, + const IdentifierInfo &II, ParsedType Ty, + CXXScopeSpec *SS) { assert(!SS->isInvalid() && "ScopeSpec is invalid"); TypeSourceInfo *TSI = nullptr; - QualType EnumTy = GetTypeFromParser( - getTypeName(II, IdentLoc, S, SS, /*isClassName=*/false, - /*HasTrailingDot=*/false, - /*ObjectType=*/nullptr, /*IsCtorOrDtorName=*/false, - /*WantNontrivialTypeSourceInfo=*/true), - &TSI); + SourceLocation IdentLoc = TyLoc.getBegin(); + QualType EnumTy = GetTypeFromParser(Ty, &TSI); if (EnumTy.isNull()) { Diag(IdentLoc, SS && isDependentScopeSpecifier(*SS) ? diag::err_using_enum_is_dependent : diag::err_unknown_typename) << II.getName() - << SourceRange(SS ? SS->getBeginLoc() : IdentLoc, IdentLoc); + << SourceRange(SS ? SS->getBeginLoc() : IdentLoc, TyLoc.getEnd()); + return nullptr; + } + + if (EnumTy->isDependentType()) { + Diag(IdentLoc, diag::err_using_enum_is_dependent); return nullptr; } @@ -16111,7 +16112,7 @@ ExprResult Sema::BuildCXXConstructExpr( CXXConstructionKind ConstructKind, SourceRange ParenRange) { if (auto *Shadow = dyn_cast(FoundDecl)) { Constructor = findInheritingConstructor(ConstructLoc, Constructor, Shadow); - // The only way to get here is if we did overlaod resolution to find the + // The only way to get here is if we did overload resolution to find the // shadow decl, so we don't need to worry about re-checking the trailing // requires clause. if (DiagnoseUseOfOverloadedDecl(Constructor, ConstructLoc)) diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp index 67e0c7c63909ecb..d226e3bb1307239 100644 --- a/clang/lib/Sema/SemaExceptionSpec.cpp +++ b/clang/lib/Sema/SemaExceptionSpec.cpp @@ -1111,13 +1111,22 @@ static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { } static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) { + // A typeid of a type is a constant and does not throw. if (DC->isTypeOperand()) return CT_Cannot; if (DC->isValueDependent()) return CT_Dependent; - return DC->hasNullCheck() ? CT_Can : CT_Cannot; + // If this operand is not evaluated it cannot possibly throw. + if (!DC->isPotentiallyEvaluated()) + return CT_Cannot; + + // Can throw std::bad_typeid if a nullptr is dereferenced. + if (DC->hasNullCheck()) + return CT_Can; + + return S.canThrow(DC->getExprOperand()); } CanThrowResult Sema::canThrow(const Stmt *S) { @@ -1404,6 +1413,7 @@ CanThrowResult Sema::canThrow(const Stmt *S) { case Expr::PackIndexingExprClass: case Expr::StringLiteralClass: case Expr::SourceLocExprClass: + case Expr::EmbedExprClass: case Expr::ConceptSpecializationExprClass: case Expr::RequiresExprClass: // These expressions can never throw. diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index e48c5954e2a054d..4a2f3a65eac96f3 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -3711,7 +3711,7 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc, bool AllowZero) { bool ValueIsPositive = AllowZero ? ValueAPS.isNonNegative() : ValueAPS.isStrictlyPositive(); if (!ValueIsPositive || ValueAPS.getActiveBits() > 31) { - Diag(E->getExprLoc(), diag::err_pragma_loop_invalid_argument_value) + Diag(E->getExprLoc(), diag::err_requires_positive_value) << toString(ValueAPS, 10) << ValueIsPositive; return true; } @@ -7300,8 +7300,8 @@ Sema::BuildInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, } } - InitListExpr *E = new (Context) InitListExpr(Context, LBraceLoc, InitArgList, - RBraceLoc); + InitListExpr *E = + new (Context) InitListExpr(Context, LBraceLoc, InitArgList, RBraceLoc); E->setType(Context.VoidTy); // FIXME: just a place holder for now. return E; } @@ -16689,6 +16689,15 @@ ExprResult Sema::BuildSourceLocExpr(SourceLocIdentKind Kind, QualType ResultTy, SourceLocExpr(Context, Kind, ResultTy, BuiltinLoc, RPLoc, ParentContext); } +ExprResult Sema::ActOnEmbedExpr(SourceLocation EmbedKeywordLoc, + StringLiteral *BinaryData) { + EmbedDataStorage *Data = new (Context) EmbedDataStorage; + Data->BinaryData = BinaryData; + return new (Context) + EmbedExpr(Context, EmbedKeywordLoc, Data, /*NumOfElements=*/0, + Data->getDataElementCount()); +} + static bool maybeDiagnoseAssignmentToFunction(Sema &S, QualType DstType, const Expr *SrcExpr) { if (!DstType->isFunctionPointerType() || diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 494787253f09273..f820db5233f5390 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -313,6 +313,8 @@ class InitListChecker { InitListExpr *FullyStructuredList = nullptr; NoInitExpr *DummyExpr = nullptr; SmallVectorImpl *AggrDeductionCandidateParamTypes = nullptr; + EmbedExpr *CurEmbed = nullptr; // Save current embed we're processing. + unsigned CurEmbedIndex = 0; NoInitExpr *getDummyInit() { if (!DummyExpr) @@ -501,6 +503,42 @@ class InitListChecker { void CheckEmptyInitializable(const InitializedEntity &Entity, SourceLocation Loc); + Expr *HandleEmbed(EmbedExpr *Embed, const InitializedEntity &Entity) { + Expr *Result = nullptr; + // Undrestand which part of embed we'd like to reference. + if (!CurEmbed) { + CurEmbed = Embed; + CurEmbedIndex = 0; + } + // Reference just one if we're initializing a single scalar. + uint64_t ElsCount = 1; + // Otherwise try to fill whole array with embed data. + if (Entity.getKind() == InitializedEntity::EK_ArrayElement) { + ValueDecl *ArrDecl = Entity.getParent()->getDecl(); + auto *AType = SemaRef.Context.getAsArrayType(ArrDecl->getType()); + assert(AType && "expected array type when initializing array"); + ElsCount = Embed->getDataElementCount(); + if (const auto *CAType = dyn_cast(AType)) + ElsCount = std::min(CAType->getSize().getZExtValue(), + ElsCount - CurEmbedIndex); + if (ElsCount == Embed->getDataElementCount()) { + CurEmbed = nullptr; + CurEmbedIndex = 0; + return Embed; + } + } + + Result = new (SemaRef.Context) + EmbedExpr(SemaRef.Context, Embed->getLocation(), Embed->getData(), + CurEmbedIndex, ElsCount); + CurEmbedIndex += ElsCount; + if (CurEmbedIndex >= Embed->getDataElementCount()) { + CurEmbed = nullptr; + CurEmbedIndex = 0; + } + return Result; + } + public: InitListChecker( Sema &S, const InitializedEntity &Entity, InitListExpr *IL, QualType &T, @@ -1473,6 +1511,9 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity, // Brace elision is never performed if the element is not an // assignment-expression. if (Seq || isa(expr)) { + if (auto *Embed = dyn_cast(expr)) { + expr = HandleEmbed(Embed, Entity); + } if (!VerifyOnly) { ExprResult Result = Seq.Perform(SemaRef, TmpEntity, Kind, expr); if (Result.isInvalid()) @@ -1486,7 +1527,8 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity, UpdateStructuredListElement(StructuredList, StructuredIndex, getDummyInit()); } - ++Index; + if (!CurEmbed) + ++Index; if (AggrDeductionCandidateParamTypes) AggrDeductionCandidateParamTypes->push_back(ElemType); return; @@ -1679,6 +1721,8 @@ void InitListChecker::CheckScalarType(const InitializedEntity &Entity, ++Index; ++StructuredIndex; return; + } else if (auto *Embed = dyn_cast(expr)) { + expr = HandleEmbed(Embed, Entity); } ExprResult Result; @@ -1700,14 +1744,16 @@ void InitListChecker::CheckScalarType(const InitializedEntity &Entity, else { ResultExpr = Result.getAs(); - if (ResultExpr != expr && !VerifyOnly) { + if (ResultExpr != expr && !VerifyOnly && !CurEmbed) { // The type was promoted, update initializer list. // FIXME: Why are we updating the syntactic init list? IList->setInit(Index, ResultExpr); } } + UpdateStructuredListElement(StructuredList, StructuredIndex, ResultExpr); - ++Index; + if (!CurEmbed) + ++Index; if (AggrDeductionCandidateParamTypes) AggrDeductionCandidateParamTypes->push_back(DeclType); } @@ -1946,6 +1992,30 @@ static bool checkDestructorReference(QualType ElementType, SourceLocation Loc, return SemaRef.DiagnoseUseOfDecl(Destructor, Loc); } +static bool canInitializeArrayWithEmbedDataString(ArrayRef ExprList, + QualType InitType, + ASTContext &Context) { + // Only one initializer, it's an embed and the types match; + EmbedExpr *EE = + ExprList.size() == 1 + ? dyn_cast_if_present(ExprList[0]->IgnoreParens()) + : nullptr; + if (!EE) + return false; + + if (InitType->isArrayType()) { + const ArrayType *InitArrayType = InitType->getAsArrayTypeUnsafe(); + QualType InitElementTy = InitArrayType->getElementType(); + QualType EmbedExprElementTy = EE->getType(); + const bool TypesMatch = + Context.typesAreCompatible(InitElementTy, EmbedExprElementTy) || + (InitElementTy->isCharType() && EmbedExprElementTy->isCharType()); + if (TypesMatch) + return true; + } + return false; +} + void InitListChecker::CheckArrayType(const InitializedEntity &Entity, InitListExpr *IList, QualType &DeclType, llvm::APSInt elementIndex, @@ -1963,6 +2033,12 @@ void InitListChecker::CheckArrayType(const InitializedEntity &Entity, } } + if (canInitializeArrayWithEmbedDataString(IList->inits(), DeclType, + SemaRef.Context)) { + EmbedExpr *Embed = cast(IList->inits()[0]); + IList->setInit(0, Embed->getDataStringLiteral()); + } + // Check for the special-case of initializing an array with a string. if (Index < IList->getNumInits()) { if (IsStringInit(IList->getInit(Index), arrayType, SemaRef.Context) == @@ -2065,13 +2141,24 @@ void InitListChecker::CheckArrayType(const InitializedEntity &Entity, if (maxElementsKnown && elementIndex == maxElements) break; - InitializedEntity ElementEntity = - InitializedEntity::InitializeElement(SemaRef.Context, StructuredIndex, - Entity); + InitializedEntity ElementEntity = InitializedEntity::InitializeElement( + SemaRef.Context, StructuredIndex, Entity); + + unsigned EmbedElementIndexBeforeInit = CurEmbedIndex; // Check this element. CheckSubElementType(ElementEntity, IList, elementType, Index, StructuredList, StructuredIndex); ++elementIndex; + if ((CurEmbed || isa(Init)) && elementType->isScalarType()) { + if (CurEmbed) { + elementIndex = + elementIndex + CurEmbedIndex - EmbedElementIndexBeforeInit - 1; + } else { + auto Embed = cast(Init); + elementIndex = elementIndex + Embed->getDataElementCount() - + EmbedElementIndexBeforeInit - 1; + } + } // If the array is of incomplete type, keep track of the number of // elements in the initializer. @@ -9077,19 +9164,18 @@ ExprResult InitializationSequence::Perform(Sema &S, } } } - + Expr *Init = CurInit.get(); CheckedConversionKind CCK = Kind.isCStyleCast() ? CheckedConversionKind::CStyleCast : Kind.isFunctionalCast() ? CheckedConversionKind::FunctionalCast : Kind.isExplicitCast() ? CheckedConversionKind::OtherCast : CheckedConversionKind::Implicit; - ExprResult CurInitExprRes = - S.PerformImplicitConversion(CurInit.get(), Step->Type, *Step->ICS, - getAssignmentAction(Entity), CCK); + ExprResult CurInitExprRes = S.PerformImplicitConversion( + Init, Step->Type, *Step->ICS, getAssignmentAction(Entity), CCK); if (CurInitExprRes.isInvalid()) return ExprError(); - S.DiscardMisalignedMemberAddress(Step->Type.getTypePtr(), CurInit.get()); + S.DiscardMisalignedMemberAddress(Step->Type.getTypePtr(), Init); CurInit = CurInitExprRes; @@ -9244,10 +9330,11 @@ ExprResult InitializationSequence::Perform(Sema &S, case SK_CAssignment: { QualType SourceType = CurInit.get()->getType(); + Expr *Init = CurInit.get(); // Save off the initial CurInit in case we need to emit a diagnostic - ExprResult InitialCurInit = CurInit; - ExprResult Result = CurInit; + ExprResult InitialCurInit = Init; + ExprResult Result = Init; Sema::AssignConvertType ConvTy = S.CheckSingleAssignmentConstraints(Step->Type, Result, true, Entity.getKind() == InitializedEntity::EK_Parameter_CF_Audited); @@ -9392,6 +9479,57 @@ ExprResult InitializationSequence::Perform(Sema &S, // Wrap it in a construction of a std::initializer_list. CurInit = new (S.Context) CXXStdInitializerListExpr(Step->Type, MTE); + if (!Step->Type->isDependentType()) { + QualType ElementType; + [[maybe_unused]] bool IsStdInitializerList = + S.isStdInitializerList(Step->Type, &ElementType); + assert(IsStdInitializerList && + "StdInitializerList step to non-std::initializer_list"); + const CXXRecordDecl *Record = + Step->Type->getAsCXXRecordDecl()->getDefinition(); + assert(Record && Record->isCompleteDefinition() && + "std::initializer_list should have already be " + "complete/instantiated by this point"); + + auto InvalidType = [&] { + S.Diag(Record->getLocation(), + diag::err_std_initializer_list_malformed) + << Step->Type.getUnqualifiedType(); + return ExprError(); + }; + + if (Record->isUnion() || Record->getNumBases() != 0 || + Record->isPolymorphic()) + return InvalidType(); + + RecordDecl::field_iterator Field = Record->field_begin(); + if (Field == Record->field_end()) + return InvalidType(); + + // Start pointer + if (!Field->getType()->isPointerType() || + !S.Context.hasSameType(Field->getType()->getPointeeType(), + ElementType.withConst())) + return InvalidType(); + + if (++Field == Record->field_end()) + return InvalidType(); + + // Size or end pointer + if (const auto *PT = Field->getType()->getAs()) { + if (!S.Context.hasSameType(PT->getPointeeType(), + ElementType.withConst())) + return InvalidType(); + } else { + if (Field->isBitField() || + !S.Context.hasSameType(Field->getType(), S.Context.getSizeType())) + return InvalidType(); + } + + if (++Field != Record->field_end()) + return InvalidType(); + } + // Bind the result, in case the library has given initializer_list a // non-trivial destructor. if (shouldBindAsTemporary(Entity)) diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 411e9af26f2b7b2..1bb86385333ef37 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -3355,7 +3355,7 @@ Sema::NamedReturnInfo Sema::getNamedReturnInfo(const VarDecl *VD) { // Variables with higher required alignment than their type's ABI // alignment cannot use NRVO. - if (!VD->hasDependentAlignment() && + if (!VD->hasDependentAlignment() && !VDType->isIncompleteType() && Context.getDeclAlign(VD) > Context.getTypeAlignInChars(VDType)) Info.S = NamedReturnInfo::MoveEligible; diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 94eee1cb3f07777..cf4e80399632b28 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -12939,6 +12939,11 @@ ExprResult TreeTransform::TransformSourceLocExpr(SourceLocExpr *E) { getSema().CurContext); } +template +ExprResult TreeTransform::TransformEmbedExpr(EmbedExpr *E) { + return E; +} + template ExprResult TreeTransform::TransformCUDAKernelCallExpr(CUDAKernelCallExpr *E) { diff --git a/clang/lib/Serialization/ASTCommon.cpp b/clang/lib/Serialization/ASTCommon.cpp index 3385cb8aad7e49c..444a8a3d3a5143d 100644 --- a/clang/lib/Serialization/ASTCommon.cpp +++ b/clang/lib/Serialization/ASTCommon.cpp @@ -283,7 +283,7 @@ serialization::TypeIdxFromBuiltin(const BuiltinType *BT) { break; } - return TypeIdx(ID); + return TypeIdx(0, ID); } unsigned serialization::ComputeHash(Selector Sel) { diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 43013ab61474e1d..c0b7db72fb60333 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -1201,7 +1201,7 @@ unsigned DeclarationNameKey::getHash() const { break; } - return ID.ComputeHash(); + return ID.computeStableHash(); } ModuleFile * @@ -2033,7 +2033,10 @@ const FileEntry *HeaderFileInfoTrait::getFile(const internal_key_type &Key) { } unsigned HeaderFileInfoTrait::ComputeHash(internal_key_ref ikey) { - return llvm::hash_combine(ikey.Size, ikey.ModTime); + uint8_t buf[sizeof(ikey.Size) + sizeof(ikey.ModTime)]; + memcpy(buf, &ikey.Size, sizeof(ikey.Size)); + memcpy(buf + sizeof(ikey.Size), &ikey.ModTime, sizeof(ikey.ModTime)); + return llvm::xxh3_64bits(buf); } HeaderFileInfoTrait::internal_key_type @@ -2640,8 +2643,7 @@ InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) { return OriginalChange; } - // FIXME: hash_value is not guaranteed to be stable! - auto ContentHash = hash_value(MemBuffOrError.get()->getBuffer()); + auto ContentHash = xxh3_64bits(MemBuffOrError.get()->getBuffer()); if (StoredContentHash == static_cast(ContentHash)) return Change{Change::None}; @@ -3395,20 +3397,11 @@ llvm::Error ASTReader::ReadASTBlock(ModuleFile &F, "duplicate TYPE_OFFSET record in AST file"); F.TypeOffsets = reinterpret_cast(Blob.data()); F.LocalNumTypes = Record[0]; - unsigned LocalBaseTypeIndex = Record[1]; F.BaseTypeIndex = getTotalNumTypes(); - if (F.LocalNumTypes > 0) { - // Introduce the global -> local mapping for types within this module. - GlobalTypeMap.insert(std::make_pair(getTotalNumTypes(), &F)); - - // Introduce the local -> global mapping for types within this module. - F.TypeRemap.insertOrReplace( - std::make_pair(LocalBaseTypeIndex, - F.BaseTypeIndex - LocalBaseTypeIndex)); - + if (F.LocalNumTypes > 0) TypesLoaded.resize(TypesLoaded.size() + F.LocalNumTypes); - } + break; } @@ -4084,7 +4077,6 @@ void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const { RemapBuilder PreprocessedEntityRemap(F.PreprocessedEntityRemap); RemapBuilder SubmoduleRemap(F.SubmoduleRemap); RemapBuilder SelectorRemap(F.SelectorRemap); - RemapBuilder TypeRemap(F.TypeRemap); auto &ImportedModuleVector = F.TransitiveImports; assert(ImportedModuleVector.empty()); @@ -4120,8 +4112,6 @@ void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const { endian::readNext(Data); uint32_t SelectorIDOffset = endian::readNext(Data); - uint32_t TypeIndexOffset = - endian::readNext(Data); auto mapOffset = [&](uint32_t Offset, uint32_t BaseOffset, RemapBuilder &Remap) { @@ -4136,7 +4126,6 @@ void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const { PreprocessedEntityRemap); mapOffset(SubmoduleIDOffset, OM->BaseSubmoduleID, SubmoduleRemap); mapOffset(SelectorIDOffset, OM->BaseSelectorID, SelectorRemap); - mapOffset(TypeIndexOffset, OM->BaseTypeIndex, TypeRemap); } } @@ -5115,12 +5104,12 @@ void ASTReader::InitializeContext() { // Load the special types. if (SpecialTypes.size() >= NumSpecialTypeIDs) { - if (unsigned String = SpecialTypes[SPECIAL_TYPE_CF_CONSTANT_STRING]) { + if (TypeID String = SpecialTypes[SPECIAL_TYPE_CF_CONSTANT_STRING]) { if (!Context.CFConstantStringTypeDecl) Context.setCFConstantStringType(GetType(String)); } - if (unsigned File = SpecialTypes[SPECIAL_TYPE_FILE]) { + if (TypeID File = SpecialTypes[SPECIAL_TYPE_FILE]) { QualType FileType = GetType(File); if (FileType.isNull()) { Error("FILE type is NULL"); @@ -5141,7 +5130,7 @@ void ASTReader::InitializeContext() { } } - if (unsigned Jmp_buf = SpecialTypes[SPECIAL_TYPE_JMP_BUF]) { + if (TypeID Jmp_buf = SpecialTypes[SPECIAL_TYPE_JMP_BUF]) { QualType Jmp_bufType = GetType(Jmp_buf); if (Jmp_bufType.isNull()) { Error("jmp_buf type is NULL"); @@ -5162,7 +5151,7 @@ void ASTReader::InitializeContext() { } } - if (unsigned Sigjmp_buf = SpecialTypes[SPECIAL_TYPE_SIGJMP_BUF]) { + if (TypeID Sigjmp_buf = SpecialTypes[SPECIAL_TYPE_SIGJMP_BUF]) { QualType Sigjmp_bufType = GetType(Sigjmp_buf); if (Sigjmp_bufType.isNull()) { Error("sigjmp_buf type is NULL"); @@ -5180,25 +5169,24 @@ void ASTReader::InitializeContext() { } } - if (unsigned ObjCIdRedef - = SpecialTypes[SPECIAL_TYPE_OBJC_ID_REDEFINITION]) { + if (TypeID ObjCIdRedef = SpecialTypes[SPECIAL_TYPE_OBJC_ID_REDEFINITION]) { if (Context.ObjCIdRedefinitionType.isNull()) Context.ObjCIdRedefinitionType = GetType(ObjCIdRedef); } - if (unsigned ObjCClassRedef - = SpecialTypes[SPECIAL_TYPE_OBJC_CLASS_REDEFINITION]) { + if (TypeID ObjCClassRedef = + SpecialTypes[SPECIAL_TYPE_OBJC_CLASS_REDEFINITION]) { if (Context.ObjCClassRedefinitionType.isNull()) Context.ObjCClassRedefinitionType = GetType(ObjCClassRedef); } - if (unsigned ObjCSelRedef - = SpecialTypes[SPECIAL_TYPE_OBJC_SEL_REDEFINITION]) { + if (TypeID ObjCSelRedef = + SpecialTypes[SPECIAL_TYPE_OBJC_SEL_REDEFINITION]) { if (Context.ObjCSelRedefinitionType.isNull()) Context.ObjCSelRedefinitionType = GetType(ObjCSelRedef); } - if (unsigned Ucontext_t = SpecialTypes[SPECIAL_TYPE_UCONTEXT_T]) { + if (TypeID Ucontext_t = SpecialTypes[SPECIAL_TYPE_UCONTEXT_T]) { QualType Ucontext_tType = GetType(Ucontext_t); if (Ucontext_tType.isNull()) { Error("ucontext_t type is NULL"); @@ -6683,10 +6671,8 @@ void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) { } /// Get the correct cursor and offset for loading a type. -ASTReader::RecordLocation ASTReader::TypeCursorForIndex(unsigned Index) { - GlobalTypeMapType::iterator I = GlobalTypeMap.find(Index); - assert(I != GlobalTypeMap.end() && "Corrupted global type map"); - ModuleFile *M = I->second; +ASTReader::RecordLocation ASTReader::TypeCursorForIndex(TypeID ID) { + auto [M, Index] = translateTypeIDToIndex(ID); return RecordLocation(M, M->TypeOffsets[Index - M->BaseTypeIndex].get() + M->DeclsBlockStartOffset); } @@ -6707,10 +6693,10 @@ static std::optional getTypeClassForCode(TypeCode code) { /// routine actually reads the record corresponding to the type at the given /// location. It is a helper routine for GetType, which deals with reading type /// IDs. -QualType ASTReader::readTypeRecord(unsigned Index) { +QualType ASTReader::readTypeRecord(TypeID ID) { assert(ContextObj && "reading type with no AST context"); ASTContext &Context = *ContextObj; - RecordLocation Loc = TypeCursorForIndex(Index); + RecordLocation Loc = TypeCursorForIndex(ID); BitstreamCursor &DeclsCursor = Loc.F->DeclsCursor; // Keep track of where we are in the stream, then jump back there @@ -7151,15 +7137,44 @@ TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() { return TInfo; } +static unsigned getIndexForTypeID(serialization::TypeID ID) { + return (ID & llvm::maskTrailingOnes(32)) >> Qualifiers::FastWidth; +} + +static unsigned getModuleFileIndexForTypeID(serialization::TypeID ID) { + return ID >> 32; +} + +static bool isPredefinedType(serialization::TypeID ID) { + // We don't need to erase the higher bits since if these bits are not 0, + // it must be larger than NUM_PREDEF_TYPE_IDS. + return (ID >> Qualifiers::FastWidth) < NUM_PREDEF_TYPE_IDS; +} + +std::pair +ASTReader::translateTypeIDToIndex(serialization::TypeID ID) const { + assert(!isPredefinedType(ID) && + "Predefined type shouldn't be in TypesLoaded"); + unsigned ModuleFileIndex = getModuleFileIndexForTypeID(ID); + assert(ModuleFileIndex && "Untranslated Local Decl?"); + + ModuleFile *OwningModuleFile = &getModuleManager()[ModuleFileIndex - 1]; + assert(OwningModuleFile && + "untranslated type ID or local type ID shouldn't be in TypesLoaded"); + + return {OwningModuleFile, + OwningModuleFile->BaseTypeIndex + getIndexForTypeID(ID)}; +} + QualType ASTReader::GetType(TypeID ID) { assert(ContextObj && "reading type with no AST context"); ASTContext &Context = *ContextObj; unsigned FastQuals = ID & Qualifiers::FastMask; - unsigned Index = ID >> Qualifiers::FastWidth; - if (Index < NUM_PREDEF_TYPE_IDS) { + if (isPredefinedType(ID)) { QualType T; + unsigned Index = getIndexForTypeID(ID); switch ((PredefinedTypeIDs)Index) { case PREDEF_TYPE_LAST_ID: // We should never use this one. @@ -7432,10 +7447,11 @@ QualType ASTReader::GetType(TypeID ID) { return T.withFastQualifiers(FastQuals); } - Index -= NUM_PREDEF_TYPE_IDS; + unsigned Index = translateTypeIDToIndex(ID).second; + assert(Index < TypesLoaded.size() && "Type index out-of-range"); if (TypesLoaded[Index].isNull()) { - TypesLoaded[Index] = readTypeRecord(Index); + TypesLoaded[Index] = readTypeRecord(ID); if (TypesLoaded[Index].isNull()) return QualType(); @@ -7448,27 +7464,28 @@ QualType ASTReader::GetType(TypeID ID) { return TypesLoaded[Index].withFastQualifiers(FastQuals); } -QualType ASTReader::getLocalType(ModuleFile &F, unsigned LocalID) { +QualType ASTReader::getLocalType(ModuleFile &F, LocalTypeID LocalID) { return GetType(getGlobalTypeID(F, LocalID)); } -serialization::TypeID -ASTReader::getGlobalTypeID(ModuleFile &F, unsigned LocalID) const { - unsigned FastQuals = LocalID & Qualifiers::FastMask; - unsigned LocalIndex = LocalID >> Qualifiers::FastWidth; - - if (LocalIndex < NUM_PREDEF_TYPE_IDS) +serialization::TypeID ASTReader::getGlobalTypeID(ModuleFile &F, + LocalTypeID LocalID) const { + if (isPredefinedType(LocalID)) return LocalID; if (!F.ModuleOffsetMap.empty()) ReadModuleOffsetMap(F); - ContinuousRangeMap::iterator I - = F.TypeRemap.find(LocalIndex - NUM_PREDEF_TYPE_IDS); - assert(I != F.TypeRemap.end() && "Invalid index into type index remap"); + unsigned ModuleFileIndex = getModuleFileIndexForTypeID(LocalID); + LocalID &= llvm::maskTrailingOnes(32); + + if (ModuleFileIndex == 0) + LocalID -= NUM_PREDEF_TYPE_IDS << Qualifiers::FastWidth; - unsigned GlobalIndex = LocalIndex + I->second; - return (GlobalIndex << Qualifiers::FastWidth) | FastQuals; + ModuleFile &MF = + ModuleFileIndex ? *F.TransitiveImports[ModuleFileIndex - 1] : F; + ModuleFileIndex = MF.Index + 1; + return ((uint64_t)ModuleFileIndex << 32) | LocalID; } TemplateArgumentLocInfo @@ -8224,7 +8241,6 @@ LLVM_DUMP_METHOD void ASTReader::dump() { llvm::errs() << "*** PCH/ModuleFile Remappings:\n"; dumpModuleIDMap("Global bit offset map", GlobalBitOffsetsMap); dumpModuleIDMap("Global source location entry map", GlobalSLocEntryMap); - dumpModuleIDMap("Global type map", GlobalTypeMap); dumpModuleIDMap("Global macro map", GlobalMacroMap); dumpModuleIDMap("Global submodule map", GlobalSubmoduleMap); dumpModuleIDMap("Global selector map", GlobalSelectorMap); diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 67ef170251914ea..e23ceffb10bfe66 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -1323,6 +1323,16 @@ void ASTStmtReader::VisitSourceLocExpr(SourceLocExpr *E) { E->SourceLocExprBits.Kind = Record.readInt(); } +void ASTStmtReader::VisitEmbedExpr(EmbedExpr *E) { + VisitExpr(E); + E->EmbedKeywordLoc = readSourceLocation(); + EmbedDataStorage *Data = new (Record.getContext()) EmbedDataStorage; + Data->BinaryData = cast(Record.readSubStmt()); + E->Data = Data; + E->Begin = Record.readInt(); + E->NumOfElements = Record.readInt(); +} + void ASTStmtReader::VisitAddrLabelExpr(AddrLabelExpr *E) { VisitExpr(E); E->setAmpAmpLoc(readSourceLocation()); @@ -3233,6 +3243,10 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { S = new (Context) SourceLocExpr(Empty); break; + case EXPR_BUILTIN_PP_EMBED: + S = new (Context) EmbedExpr(Empty); + break; + case EXPR_ADDR_LABEL: S = new (Context) AddrLabelExpr(Empty); break; diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 346bab34acb5e18..e6a58dcc61e3f85 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -1782,7 +1782,7 @@ void ASTWriter::WriteInputFiles(SourceManager &SourceMgr, .ValidateASTInputFilesContent) { auto MemBuff = Cache->getBufferIfLoaded(); if (MemBuff) - ContentHash = hash_value(MemBuff->getBuffer()); + ContentHash = xxh3_64bits(MemBuff->getBuffer()); else PP->Diag(SourceLocation(), diag::err_module_unable_to_hash_content) << Entry.File.getName(); @@ -1987,7 +1987,10 @@ namespace { // The hash is based only on size/time of the file, so that the reader can // match even when symlinking or excess path elements ("foo/../", "../") // change the form of the name. However, complete path is still the key. - return llvm::hash_combine(key.Size, key.ModTime); + uint8_t buf[sizeof(key.Size) + sizeof(key.ModTime)]; + memcpy(buf, &key.Size, sizeof(key.Size)); + memcpy(buf + sizeof(key.Size), &key.ModTime, sizeof(key.ModTime)); + return llvm::xxh3_64bits(buf); } std::pair @@ -3270,17 +3273,18 @@ void ASTWriter::WritePragmaDiagnosticMappings(const DiagnosticsEngine &Diag, /// Write the representation of a type to the AST stream. void ASTWriter::WriteType(QualType T) { TypeIdx &IdxRef = TypeIdxs[T]; - if (IdxRef.getIndex() == 0) // we haven't seen this type before. - IdxRef = TypeIdx(NextTypeID++); + if (IdxRef.getValue() == 0) // we haven't seen this type before. + IdxRef = TypeIdx(0, NextTypeID++); TypeIdx Idx = IdxRef; - assert(Idx.getIndex() >= FirstTypeID && "Re-writing a type from a prior AST"); + assert(Idx.getModuleFileIndex() == 0 && "Re-writing a type from a prior AST"); + assert(Idx.getValue() >= FirstTypeID && "Writing predefined type"); // Emit the type's representation. uint64_t Offset = ASTTypeWriter(*this).write(T) - DeclTypesBlockStartOffset; // Record the offset for this type. - unsigned Index = Idx.getIndex() - FirstTypeID; + uint64_t Index = Idx.getValue() - FirstTypeID; if (TypeOffsets.size() == Index) TypeOffsets.emplace_back(Offset); else if (TypeOffsets.size() < Index) { @@ -3353,12 +3357,10 @@ void ASTWriter::WriteTypeDeclOffsets() { auto Abbrev = std::make_shared(); Abbrev->Add(BitCodeAbbrevOp(TYPE_OFFSET)); Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // # of types - Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // base type index Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // types block unsigned TypeOffsetAbbrev = Stream.EmitAbbrev(std::move(Abbrev)); { - RecordData::value_type Record[] = {TYPE_OFFSET, TypeOffsets.size(), - FirstTypeID - NUM_PREDEF_TYPE_IDS}; + RecordData::value_type Record[] = {TYPE_OFFSET, TypeOffsets.size()}; Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, bytes(TypeOffsets)); } @@ -3726,6 +3728,29 @@ static NamedDecl *getDeclForLocalLookup(const LangOptions &LangOpts, namespace { +bool IsInterestingIdentifier(const IdentifierInfo *II, uint64_t MacroOffset, + bool IsModule, bool IsCPlusPlus) { + bool NeedDecls = !IsModule || !IsCPlusPlus; + + bool IsInteresting = + II->getNotableIdentifierID() != tok::NotableIdentifierKind::not_notable || + II->getBuiltinID() != Builtin::ID::NotBuiltin || + II->getObjCKeywordID() != tok::ObjCKeywordKind::objc_not_keyword; + if (MacroOffset || II->isPoisoned() || (!IsModule && IsInteresting) || + II->hasRevertedTokenIDToIdentifier() || + (NeedDecls && II->getFETokenInfo())) + return true; + + return false; +} + +bool IsInterestingNonMacroIdentifier(const IdentifierInfo *II, + ASTWriter &Writer) { + bool IsModule = Writer.isWritingModule(); + bool IsCPlusPlus = Writer.getLangOpts().CPlusPlus; + return IsInterestingIdentifier(II, /*MacroOffset=*/0, IsModule, IsCPlusPlus); +} + class ASTIdentifierTableTrait { ASTWriter &Writer; Preprocessor &PP; @@ -3739,17 +3764,8 @@ class ASTIdentifierTableTrait { /// doesn't check whether the name has macros defined; use PublicMacroIterator /// to check that. bool isInterestingIdentifier(const IdentifierInfo *II, uint64_t MacroOffset) { - bool IsInteresting = - II->getNotableIdentifierID() != - tok::NotableIdentifierKind::not_notable || - II->getBuiltinID() != Builtin::ID::NotBuiltin || - II->getObjCKeywordID() != tok::ObjCKeywordKind::objc_not_keyword; - if (MacroOffset || II->isPoisoned() || (!IsModule && IsInteresting) || - II->hasRevertedTokenIDToIdentifier() || - (NeedDecls && II->getFETokenInfo())) - return true; - - return false; + return IsInterestingIdentifier(II, MacroOffset, IsModule, + Writer.getLangOpts().CPlusPlus); } public: @@ -3780,10 +3796,6 @@ class ASTIdentifierTableTrait { return isInterestingIdentifier(II, MacroOffset); } - bool isInterestingNonMacroIdentifier(const IdentifierInfo *II) { - return isInterestingIdentifier(II, 0); - } - std::pair EmitKeyDataLength(raw_ostream &Out, const IdentifierInfo *II, IdentifierID ID) { // Record the location of the identifier data. This is used when generating @@ -3885,21 +3897,6 @@ void ASTWriter::WriteIdentifierTable(Preprocessor &PP, ASTIdentifierTableTrait Trait(*this, PP, IdResolver, IsModule, IsModule ? &InterestingIdents : nullptr); - // Look for any identifiers that were named while processing the - // headers, but are otherwise not needed. We add these to the hash - // table to enable checking of the predefines buffer in the case - // where the user adds new macro definitions when building the AST - // file. - SmallVector IIs; - for (const auto &ID : PP.getIdentifierTable()) - if (Trait.isInterestingNonMacroIdentifier(ID.second)) - IIs.push_back(ID.second); - // Sort the identifiers lexicographically before getting the references so - // that their order is stable. - llvm::sort(IIs, llvm::deref>()); - for (const IdentifierInfo *II : IIs) - getIdentifierRef(II); - // Create the on-disk hash table representation. We only store offsets // for identifiers that appear here for the first time. IdentifierOffsets.resize(NextIdentID - FirstIdentID); @@ -4123,16 +4120,24 @@ bool ASTWriter::isLookupResultExternal(StoredDeclsList &Result, DC->hasNeedToReconcileExternalVisibleStorage(); } -bool ASTWriter::isLookupResultEntirelyExternalOrUnreachable( - StoredDeclsList &Result, DeclContext *DC) { +/// Returns ture if all of the lookup result are either external, not emitted or +/// predefined. In such cases, the lookup result is not interesting and we don't +/// need to record the result in the current being written module. Return false +/// otherwise. +static bool isLookupResultNotInteresting(ASTWriter &Writer, + StoredDeclsList &Result) { for (auto *D : Result.getLookupResult()) { - auto *LocalD = getDeclForLocalLookup(getLangOpts(), D); + auto *LocalD = getDeclForLocalLookup(Writer.getLangOpts(), D); if (LocalD->isFromASTFile()) continue; // We can only be sure whether the local declaration is reachable // after we done writing the declarations and types. - if (DoneWritingDeclsAndTypes && !wasDeclEmitted(LocalD)) + if (Writer.getDoneWritingDeclsAndTypes() && !Writer.wasDeclEmitted(LocalD)) + continue; + + // We don't need to emit the predefined decls. + if (Writer.isDeclPredefined(LocalD)) continue; return false; @@ -4180,11 +4185,11 @@ ASTWriter::GenerateNameLookupTable(const DeclContext *ConstDC, // that entirely external or unreachable. // // FIMXE: It looks sufficient to test - // isLookupResultEntirelyExternalOrUnreachable here. But due to bug we have + // isLookupResultNotInteresting here. But due to bug we have // to test isLookupResultExternal here. See // https://github.com/llvm/llvm-project/issues/61065 for details. if ((GeneratingReducedBMI || isLookupResultExternal(Result, DC)) && - isLookupResultEntirelyExternalOrUnreachable(Result, DC)) + isLookupResultNotInteresting(*this, Result)) continue; // We also skip empty results. If any of the results could be external and @@ -5005,6 +5010,7 @@ void ASTWriter::PrepareWritingSpecialDecls(Sema &SemaRef) { if (D) { assert(D->isCanonicalDecl() && "predefined decl is not canonical"); DeclIDs[D] = ID; + PredefinedDecls.insert(D); } }; RegisterPredefDecl(Context.getTranslationUnitDecl(), @@ -5353,6 +5359,24 @@ ASTFileSignature ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, writeUnhashedControlBlock(PP, Context); + // Look for any identifiers that were named while processing the + // headers, but are otherwise not needed. We add these to the hash + // table to enable checking of the predefines buffer in the case + // where the user adds new macro definitions when building the AST + // file. + // + // We do this before emitting any Decl and Types to make sure the + // Identifier ID is stable. + SmallVector IIs; + for (const auto &ID : PP.getIdentifierTable()) + if (IsInterestingNonMacroIdentifier(ID.second, *this)) + IIs.push_back(ID.second); + // Sort the identifiers lexicographically before getting the references so + // that their order is stable. + llvm::sort(IIs, llvm::deref>()); + for (const IdentifierInfo *II : IIs) + getIdentifierRef(II); + // Write the set of weak, undeclared identifiers. We always write the // entire table, since later PCH files in a PCH chain are only interested in // the results at the end of the chain. @@ -5464,7 +5488,6 @@ ASTFileSignature ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, M.NumPreprocessedEntities); writeBaseIDOrNone(M.BaseSubmoduleID, M.LocalNumSubmodules); writeBaseIDOrNone(M.BaseSelectorID, M.LocalNumSelectors); - writeBaseIDOrNone(M.BaseTypeIndex, M.LocalNumTypes); } } RecordData::value_type Record[] = {MODULE_OFFSET_MAP}; @@ -6138,9 +6161,9 @@ static TypeID MakeTypeID(ASTContext &Context, QualType T, return TypeIdxFromBuiltin(BT).asTypeID(FastQuals); if (T == Context.AutoDeductTy) - return TypeIdx(PREDEF_TYPE_AUTO_DEDUCT).asTypeID(FastQuals); + return TypeIdx(0, PREDEF_TYPE_AUTO_DEDUCT).asTypeID(FastQuals); if (T == Context.AutoRRefDeductTy) - return TypeIdx(PREDEF_TYPE_AUTO_RREF_DEDUCT).asTypeID(FastQuals); + return TypeIdx(0, PREDEF_TYPE_AUTO_RREF_DEDUCT).asTypeID(FastQuals); return IdxForType(T).asTypeID(FastQuals); } @@ -6153,7 +6176,7 @@ TypeID ASTWriter::GetOrCreateTypeID(QualType T) { assert(!T.getLocalFastQualifiers()); TypeIdx &Idx = TypeIdxs[T]; - if (Idx.getIndex() == 0) { + if (Idx.getValue() == 0) { if (DoneWritingDeclsAndTypes) { assert(0 && "New type seen after serializing all the types to emit!"); return TypeIdx(); @@ -6161,7 +6184,7 @@ TypeID ASTWriter::GetOrCreateTypeID(QualType T) { // We haven't seen this type before. Assign it a new ID and put it // into the queue of types to emit. - Idx = TypeIdx(NextTypeID++); + Idx = TypeIdx(0, NextTypeID++); DeclTypesToEmit.push(T); } return Idx; @@ -6658,11 +6681,9 @@ void ASTWriter::ReaderInitialized(ASTReader *Reader) { // Note, this will get called multiple times, once one the reader starts up // and again each time it's done reading a PCH or module. - FirstTypeID = NUM_PREDEF_TYPE_IDS + Chain->getTotalNumTypes(); FirstMacroID = NUM_PREDEF_MACRO_IDS + Chain->getTotalNumMacros(); FirstSubmoduleID = NUM_PREDEF_SUBMODULE_IDS + Chain->getTotalNumSubmodules(); FirstSelectorID = NUM_PREDEF_SELECTOR_IDS + Chain->getTotalNumSelectors(); - NextTypeID = FirstTypeID; NextMacroID = FirstMacroID; NextSelectorID = FirstSelectorID; NextSubmoduleID = FirstSubmoduleID; @@ -6691,13 +6712,24 @@ void ASTWriter::MacroRead(serialization::MacroID ID, MacroInfo *MI) { } void ASTWriter::TypeRead(TypeIdx Idx, QualType T) { - // Always take the highest-numbered type index. This copes with an interesting + // Always take the type index that comes in later module files. + // This copes with an interesting // case for chained AST writing where we schedule writing the type and then, // later, deserialize the type from another AST. In this case, we want to - // keep the higher-numbered entry so that we can properly write it out to + // keep the entry from a later module so that we can properly write it out to // the AST file. TypeIdx &StoredIdx = TypeIdxs[T]; - if (Idx.getIndex() >= StoredIdx.getIndex()) + + // Ignore it if the type comes from the current being written module file. + // Since the current module file being written logically has the highest + // index. + unsigned ModuleFileIndex = StoredIdx.getModuleFileIndex(); + if (ModuleFileIndex == 0 && StoredIdx.getValue()) + return; + + // Otherwise, keep the highest ID since the module file comes later has + // higher module file indexes. + if (Idx.getModuleFileIndex() >= StoredIdx.getModuleFileIndex()) StoredIdx = Idx; } diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 1ba6d5501fd1025..ea499019c9d16c9 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -19,6 +19,7 @@ #include "clang/AST/ExprOpenMP.h" #include "clang/AST/StmtVisitor.h" #include "clang/Lex/Token.h" +#include "clang/Serialization/ASTReader.h" #include "clang/Serialization/ASTRecordWriter.h" #include "llvm/Bitstream/BitstreamWriter.h" using namespace clang; @@ -1262,6 +1263,16 @@ void ASTStmtWriter::VisitSourceLocExpr(SourceLocExpr *E) { Code = serialization::EXPR_SOURCE_LOC; } +void ASTStmtWriter::VisitEmbedExpr(EmbedExpr *E) { + VisitExpr(E); + Record.AddSourceLocation(E->getBeginLoc()); + Record.AddSourceLocation(E->getEndLoc()); + Record.AddStmt(E->getDataStringLiteral()); + Record.writeUInt32(E->getStartingElementPos()); + Record.writeUInt32(E->getDataElementCount()); + Code = serialization::EXPR_BUILTIN_PP_EMBED; +} + void ASTStmtWriter::VisitAddrLabelExpr(AddrLabelExpr *E) { VisitExpr(E); Record.AddSourceLocation(E->getAmpAmpLoc()); @@ -2089,6 +2100,22 @@ void ASTStmtWriter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { CurrentPackingBits.addBit(E->requiresADL()); Record.AddDeclRef(E->getNamingClass()); Code = serialization::EXPR_CXX_UNRESOLVED_LOOKUP; + + if (Writer.isWritingStdCXXNamedModules() && Writer.getChain()) { + // Referencing all the possible declarations to make sure the change get + // propagted. + DeclarationName Name = E->getName(); + for (auto *Found : + Writer.getASTContext().getTranslationUnitDecl()->lookup(Name)) + if (Found->isFromASTFile()) + Writer.GetDeclRef(Found); + + llvm::SmallVector ExternalNSs; + Writer.getChain()->ReadKnownNamespaces(ExternalNSs); + for (auto *NS : ExternalNSs) + for (auto *Found : NS->lookup(Name)) + Writer.GetDeclRef(Found); + } } void ASTStmtWriter::VisitTypeTraitExpr(TypeTraitExpr *E) { diff --git a/clang/lib/Serialization/ModuleFile.cpp b/clang/lib/Serialization/ModuleFile.cpp index 7976c28b2867192..4858cdbda55456d 100644 --- a/clang/lib/Serialization/ModuleFile.cpp +++ b/clang/lib/Serialization/ModuleFile.cpp @@ -84,7 +84,6 @@ LLVM_DUMP_METHOD void ModuleFile::dump() { llvm::errs() << " Base type index: " << BaseTypeIndex << '\n' << " Number of types: " << LocalNumTypes << '\n'; - dumpLocalRemap("Type index local -> global map", TypeRemap); llvm::errs() << " Base decl index: " << BaseDeclIndex << '\n' << " Number of decls: " << LocalNumDecls << '\n'; diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 487a3bd16b67410..4ff4f7de425ca7f 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -59,6 +59,7 @@ #include #include #include +#include #include #include diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 197d67310728519..c1a8aad83a90ba8 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -2422,6 +2422,10 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, Bldr.addNodes(Dst); break; } + + case Stmt::EmbedExprClass: + llvm::report_fatal_error("Support for EmbedExpr is not implemented."); + break; } } diff --git a/clang/test/AST/Interp/records.cpp b/clang/test/AST/Interp/records.cpp index 8a18f7a2a489018..9f341f5bc6d1d1d 100644 --- a/clang/test/AST/Interp/records.cpp +++ b/clang/test/AST/Interp/records.cpp @@ -468,19 +468,12 @@ namespace ConditionalInit { static_assert(getS(true).a == 12, ""); static_assert(getS(false).a == 13, ""); }; -/// FIXME: The following tests are broken. -/// They are using CXXDefaultInitExprs which contain a CXXThisExpr. The This pointer -/// in those refers to the declaration we are currently initializing, *not* the -/// This pointer of the current stack frame. This is something we haven't -/// implemented in the new interpreter yet. namespace DeclRefs { - struct A{ int m; const int &f = m; }; // expected-note {{implicit use of 'this'}} + struct A{ int m; const int &f = m; }; - constexpr A a{10}; // expected-error {{must be initialized by a constant expression}} \ - // expected-note {{declared here}} + constexpr A a{10}; static_assert(a.m == 10, ""); - static_assert(a.f == 10, ""); // expected-error {{not an integral constant expression}} \ - // expected-note {{initializer of 'a' is not a constant expression}} + static_assert(a.f == 10, ""); class Foo { public: @@ -499,12 +492,8 @@ namespace DeclRefs { A a = A{100}; }; constexpr B b; - /// FIXME: The following two lines don't work because we don't get the - /// pointers on the LHS correct. They make us run into an assertion - /// in CheckEvaluationResult. However, this may just be caused by the - /// problems in the previous examples. - //static_assert(b.a.m == 100, ""); - //static_assert(b.a.f == 100, ""); + static_assert(b.a.m == 100, ""); + static_assert(b.a.f == 100, ""); } namespace PointerArith { diff --git a/clang/test/AST/Interp/vectors.cpp b/clang/test/AST/Interp/vectors.cpp index 61c400b57b3f875..6991a348b07a948 100644 --- a/clang/test/AST/Interp/vectors.cpp +++ b/clang/test/AST/Interp/vectors.cpp @@ -81,3 +81,13 @@ namespace VectorElementExpr { static_assert(twoElts.x == 22, ""); // ref-error {{not an integral constant expression}} static_assert(twoElts.y == 33, ""); // ref-error {{not an integral constant expression}} } + +namespace Temporaries { + typedef __attribute__((vector_size(16))) int vi4a; + typedef __attribute__((ext_vector_type(4))) int vi4b; + struct S { + vi4a v; + vi4b w; + }; + int &&s = S().w[1]; +} diff --git a/clang/test/C/C2x/Inputs/bits.bin b/clang/test/C/C2x/Inputs/bits.bin new file mode 100644 index 000000000000000..ad471007bd7f598 --- /dev/null +++ b/clang/test/C/C2x/Inputs/bits.bin @@ -0,0 +1 @@ +0123456789 \ No newline at end of file diff --git a/clang/test/C/C2x/Inputs/boop.h b/clang/test/C/C2x/Inputs/boop.h new file mode 100644 index 000000000000000..d3e39674f19629f --- /dev/null +++ b/clang/test/C/C2x/Inputs/boop.h @@ -0,0 +1 @@ +*boop* \ No newline at end of file diff --git a/clang/test/C/C2x/Inputs/i.dat b/clang/test/C/C2x/Inputs/i.dat new file mode 100644 index 000000000000000..c227083464fb9af --- /dev/null +++ b/clang/test/C/C2x/Inputs/i.dat @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/clang/test/C/C2x/Inputs/jump.wav b/clang/test/C/C2x/Inputs/jump.wav new file mode 100644 index 000000000000000..a71100636e86751 --- /dev/null +++ b/clang/test/C/C2x/Inputs/jump.wav @@ -0,0 +1 @@ +RIFF \ No newline at end of file diff --git a/clang/test/C/C2x/Inputs/s.dat b/clang/test/C/C2x/Inputs/s.dat new file mode 100644 index 000000000000000..3a332e6bba38d30 --- /dev/null +++ b/clang/test/C/C2x/Inputs/s.dat @@ -0,0 +1 @@ +012345678 \ No newline at end of file diff --git a/clang/test/C/C2x/n3017.c b/clang/test/C/C2x/n3017.c new file mode 100644 index 000000000000000..0d22d31baa4b7db --- /dev/null +++ b/clang/test/C/C2x/n3017.c @@ -0,0 +1,216 @@ +// RUN: %clang_cc1 -verify -fsyntax-only --embed-dir=%S/Inputs -std=c2x %s -Wno-constant-logical-operand + +/* WG14 N3017: full + * #embed - a scannable, tooling-friendly binary resource inclusion mechanism + */ + +// C23 6.10p6 +char b1[] = { +#embed "boop.h" limit(5) +, +#embed "boop.h" __limit__(5) +}; + +// C23 6.10.1p19 +#if __has_embed(__FILE__ ext::token(0xB055)) +#error "Supports an extension parameter Clang never claimed to support?" +#endif + +#if !__has_embed(__FILE__ clang::offset(0)) +#error "Doesn't support an extension Clang claims to support?" +#endif + +// C23 6.10.1p20 +void parse_into_s(short* ptr, unsigned char* ptr_bytes, unsigned long long size); +int f() { +#if __has_embed ("bits.bin" ds9000::element_type(short)) + /* Implementation extension: create short integers from the */ + /* translation environment resource into */ + /* a sequence of integer constants */ + short meow[] = { +#embed "bits.bin" ds9000::element_type(short) + }; +#elif __has_embed ("bits.bin") + /* no support for implementation-specific */ + /* ds9000::element_type(short) parameter */ + unsigned char meow_bytes[] = { + #embed "bits.bin" + }; + short meow[sizeof(meow_bytes) / sizeof(short)] = {}; + /* parse meow_bytes into short values by-hand! */ + parse_into_s(meow, meow_bytes, sizeof(meow_bytes)); +#else +#error "cannot find bits.bin resource" +#endif + return (int)(meow[0] + meow[(sizeof(meow) / sizeof(*meow)) - 1]); +} + +// NOTE: we don't have a good way to test infinite resources from within lit. +int g() { +#if __has_embed( limit(0)) == 2 + // if exists, this + // token sequence is always taken. + return 0; +#else + // the ’infinite-resource’ resource does not exist + #error "The resource does not exist" +#endif + // expected-error@-2 {{"The resource does not exist"}} +} + +#include +void have_you_any_wool(const unsigned char*, size_t); +int h() { + static const unsigned char baa_baa[] = { +#embed __FILE__ + }; + have_you_any_wool(baa_baa, sizeof(baa_baa)); + return 0; +} + +// C23 6.10.3.1p17: not tested here because we do not currently support any +// platforms where CHAR_BIT != 8. + +// C23 6.10.3.1p18 +int i() { +/* Braces may be kept or elided as per normal initialization rules */ + int i = { +#embed "i.dat" + }; /* valid if i.dat produces 1 value, + i value is [0, 2(embed element width)) */ + int i2 = +#embed "i.dat" + ; /* valid if i.dat produces 1 value, + i2 value is [0, 2(embed element width)) */ + struct s { + double a, b, c; + struct { double e, f, g; }; + double h, i, j; + }; + struct s x = { + /* initializes each element in order according to initialization + rules with comma-separated list of integer constant expressions + inside of braces */ + #embed "s.dat" + }; + return 0; +} + +// C23 6.10.3.1p19: not tested here because it's a runtime test rather than one +// which can be handled at compile time (it validates file contents via fread). + +// C23 6.10.3.2p5 +int j() { + static const char sound_signature[] = { +#embed limit(2+2) + }; + static_assert((sizeof(sound_signature) / sizeof(*sound_signature)) == 4, + "There should only be 4 elements in this array."); + // verify PCM WAV resource + static_assert(sound_signature[0] == 'R'); + static_assert(sound_signature[1] == 'I'); + static_assert(sound_signature[2] == 'F'); + static_assert(sound_signature[3] == 'F'); + static_assert(sizeof(sound_signature) == 4); + return 0; +} + +// C23 6.10.3p6 +int k() { +#define TWO_PLUS_TWO 2+2 + static const char sound_signature[] = { +#embed limit(TWO_PLUS_TWO) + }; + static_assert((sizeof(sound_signature) / sizeof(*sound_signature)) == 4, + "There should only be 4 elements in this array."); + // verify PCM WAV resource + static_assert(sound_signature[0] == 'R'); + static_assert(sound_signature[1] == 'I'); + static_assert(sound_signature[2] == 'F'); + static_assert(sound_signature[3] == 'F'); + static_assert(sizeof(sound_signature) == 4); + return 0; +} + +// C23 6.10.3.2p7: not tested here because we do not currently support any +// platforms where CHAR_BIT != 8. + +// C23 6.10.3.2p8: not tested here because it requires access to an infinite +// resource like /dev/urandom. + +// C23 6.10.3.3p4 +char *strcpy(char *, const char *); +#ifndef SHADER_TARGET + #define SHADER_TARGET "bits.bin" +#endif +extern char* null_term_shader_data; +void fill_in_data () { + const char internal_data[] = { +#embed SHADER_TARGET \ + suffix(,) + 0 + }; + strcpy(null_term_shader_data, internal_data); +} + +// C23 6.10.3.4p4 +#ifndef SHADER_TARGET +#define SHADER_TARGET "bits.bin" +#endif +extern char* merp; +void init_data () { + const char whl[] = { +#embed SHADER_TARGET \ + prefix(0xEF, 0xBB, 0xBF, ) /* UTF-8 BOM */ \ + suffix(,) + 0 + }; + // always null terminated, + // contains BOM if not-empty + const int is_good = (sizeof(whl) == 1 && whl[0] == '\0') + || (whl[0] == '\xEF' && whl[1] == '\xBB' + && whl[2] == '\xBF' && whl[sizeof(whl) - 1] == '\0'); + static_assert(is_good); + strcpy(merp, whl); +} + +// C23 6.10.3.5p3 +int l() { + return +#embed limit(0) prefix(1) if_empty(0) + ; + // becomes: + // return 0; + + // Validating the assumption from the example in the standard. + static_assert( +#embed limit(0) prefix(1) if_empty(0) + == 0); +} + +// C23 6.10.3.5p4 +void fill_in_data_again() { + const char internal_data[] = { +#embed SHADER_TARGET \ + suffix(, 0) \ + if_empty(0) + }; + strcpy(null_term_shader_data, internal_data); +} + +// C23 6.10.3.5p5 +int m() { + return +#embed __FILE__ limit(0) if_empty(45540) + ; + + // Validating the assumption from the example in the standard. + static_assert( +#embed __FILE__ limit(0) if_empty(45540) + == 45540); +} + +// 6.10.9.1p1 +static_assert(__STDC_EMBED_NOT_FOUND__ == 0); +static_assert(__STDC_EMBED_FOUND__ == 1); +static_assert(__STDC_EMBED_EMPTY__ == 2); diff --git a/clang/test/C/C99/n448.c b/clang/test/C/C99/n448.c new file mode 100644 index 000000000000000..c9f97920b207987 --- /dev/null +++ b/clang/test/C/C99/n448.c @@ -0,0 +1,44 @@ +// RUN: %clang_cc1 -verify -std=c99 %s +// RUN: %clang_cc1 -verify -std=c23 %s + +/* WG14 N448: Partial + * Restricted pointers + * + * NB: we claim partial conformance only because LLVM does not attempt to apply + * the semantics on local variables or structure data members; it only + * considers function parameters. However, Clang itself is fully conforming for + * this feature. + */ + +// Restrict is only allowed on pointers. +int * restrict ipr; +int restrict ir; // expected-error {{restrict requires a pointer or reference ('int' is invalid)}} + +// Restrict only applies to object pointers. +void (* restrict fp)(void); // expected-error {{pointer to function type 'void (void)' may not be 'restrict' qualified}} + +typedef int *int_ptr; +int_ptr restrict ipr2; // okay, still applied to the pointer. + +// Show that the qualifer is dropped on lvalue conversion +_Static_assert( + _Generic(ipr, + int * : 1, + int * restrict : 0, // expected-warning {{due to lvalue conversion of the controlling expression, association of type 'int *restrict' will never be selected because it is qualified}} + default : 0), + ""); + +// Show that it's allowed as a qualifier for array parameters. +void f(int array[restrict]) { + int *ipnr = ipr; // okay to drop the top-level qualifier + + // Show that it's not okay to drop the qualifier when it's not at the top level. + int * restrict * restrict iprpr; + int **ipp = iprpr; // expected-warning {{initializing 'int **' with an expression of type 'int *restrict *restrict' discards qualifiers}} + int ** restrict ippr = iprpr; // expected-warning {{initializing 'int **restrict' with an expression of type 'int *restrict *restrict' discards qualifiers}} +} + +#if __STDC_VERSION__ >= 202311L +// C23 doesn't allow constexpr to mix with restrict. See C23 6.7.2p5. +constexpr int * restrict ip; // expected-error {{constexpr variable cannot have type 'int *const restrict'}} +#endif // __STDC_VERSION__ >= 202311L diff --git a/clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp b/clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp index 506232ebacc4ccb..6614003fb93ddf1 100644 --- a/clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp +++ b/clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp @@ -16,9 +16,9 @@ int main(int argc, char **argv) = delete; // expected-error {{'main' is not allowed to be deleted}} #else { - int (*pmain)(int, char**) = &main; // expected-error {{ISO C++ does not allow 'main' to be used by a program}} + int (*pmain)(int, char**) = &main; // expected-error {{referring to 'main' within an expression is a Clang extension}} if (argc) - main(0, 0); // expected-error {{ISO C++ does not allow 'main' to be used by a program}} + main(0, 0); // expected-error {{referring to 'main' within an expression is a Clang extension}} } #endif diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp index bf1b3092e08e86a..cad42014802e7b3 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp @@ -43,7 +43,7 @@ struct S { const int S::b; const auto S::c = 0; -namespace std { template struct initializer_list { initializer_list(); }; } +namespace std { template struct initializer_list { const T *a, *b; initializer_list(); }; } // In an initializer of the form ( expression-list ), the expression-list // shall be a single assigment-expression. diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp index 97e860f91dcd37e..89fa6ec670a6526 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp @@ -4,9 +4,7 @@ namespace std { template struct initializer_list { - const T *p; - unsigned long n; - initializer_list(const T *p, unsigned long n); + const T *a, *b; }; } diff --git a/clang/test/CXX/drs/cwg26xx.cpp b/clang/test/CXX/drs/cwg26xx.cpp index 2b17c8101438d14..e180c93011a7e4d 100644 --- a/clang/test/CXX/drs/cwg26xx.cpp +++ b/clang/test/CXX/drs/cwg26xx.cpp @@ -7,7 +7,7 @@ // RUN: %clang_cc1 -std=c++2c -triple x86_64-unknown-unknown -pedantic-errors %s -verify=expected,since-cxx11,since-cxx20,since-cxx23 -namespace cwg2621 { // cwg2621: 16 +namespace cwg2621 { // cwg2621: sup 2877 #if __cplusplus >= 202002L enum class E { a }; namespace One { @@ -17,9 +17,8 @@ auto v = a; } namespace Two { using cwg2621::E; -int E; // we see this +int E; // ignored by type-only lookup using enum E; -// since-cxx20-error@-1 {{unknown type name E}} } #endif } diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp index da81eccc8dc222c..c77bd433d8e2102 100644 --- a/clang/test/CXX/drs/cwg28xx.cpp +++ b/clang/test/CXX/drs/cwg28xx.cpp @@ -6,6 +6,30 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,since-cxx20,since-cxx23 %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected,since-cxx20,since-cxx23,since-cxx26 %s + +int main() {} // required for cwg2811 + +namespace cwg2811 { // cwg2811: 3.5 +#if __cplusplus >= 201103L +void f() { + (void)[&] { + using T = decltype(main); + // expected-error@-1 {{referring to 'main' within an expression is a Clang extension}} + }; + using T2 = decltype(main); + // expected-error@-1 {{referring to 'main' within an expression is a Clang extension}} +} + +using T = decltype(main); +// expected-error@-1 {{referring to 'main' within an expression is a Clang extension}} + +int main(); + +using U = decltype(main); +using U2 = decltype(&main); +#endif +} // namespace cwg2811 + namespace cwg2819 { // cwg2819: 19 tentatively ready 2023-12-01 #if __cpp_constexpr >= 202306L constexpr void* p = nullptr; @@ -110,22 +134,18 @@ struct A { } // namespace cwg2858 -namespace cwg2877 { // cwg2877: no tentatively ready 2024-05-31 +namespace cwg2877 { // cwg2877: 19 tentatively ready 2024-05-31 #if __cplusplus >= 202002L enum E { x }; void f() { int E; - // FIXME: OK, names ::E - using enum E; - // since-cxx20-error@-1 {{unknown type name E}} + using enum E; // OK, names ::E } using F = E; using enum F; // OK, designates ::E template using EE = T; void g() { - // FIXME: OK, designates ::E - using enum EE; - // since-cxx20-error@-1 {{using enum requires an enum or typedef name}} + using enum EE; // OK, designates ::E } #endif } // namespace cwg2877 diff --git a/clang/test/CXX/drs/cwg2xx.cpp b/clang/test/CXX/drs/cwg2xx.cpp index 99916dea9a9120b..926cb19596026b4 100644 --- a/clang/test/CXX/drs/cwg2xx.cpp +++ b/clang/test/CXX/drs/cwg2xx.cpp @@ -41,7 +41,7 @@ namespace cwg202 { // cwg202: 3.1 template struct X; } -// FIXME (export) cwg204: no +// cwg204: sup 820 namespace cwg206 { // cwg206: yes struct S; // #cwg206-S diff --git a/clang/test/CXX/drs/cwg3xx.cpp b/clang/test/CXX/drs/cwg3xx.cpp index 94227dc031c6ab7..a10ed95941ba4a4 100644 --- a/clang/test/CXX/drs/cwg3xx.cpp +++ b/clang/test/CXX/drs/cwg3xx.cpp @@ -377,7 +377,7 @@ namespace cwg322 { // cwg322: 2.8 int &s = a; } -// cwg323: no +// cwg323: sup 820 namespace cwg324 { // cwg324: 3.6 struct S { int n : 1; } s; // #cwg324-n @@ -587,7 +587,7 @@ namespace cwg334 { // cwg334: yes template void f(); } -// cwg335: no +// cwg335: sup 820 namespace cwg336 { // cwg336: yes namespace Pre { diff --git a/clang/test/CXX/drs/cwg8xx.cpp b/clang/test/CXX/drs/cwg8xx.cpp index eba601300584d85..c8cbdfcee3f4d7a 100644 --- a/clang/test/CXX/drs/cwg8xx.cpp +++ b/clang/test/CXX/drs/cwg8xx.cpp @@ -1,14 +1,19 @@ -// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++2c -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected,cxx98-17 -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify=expected,cxx98-17,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -verify=expected,cxx98-17,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown %s -verify=expected,cxx98-17,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx20,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx20,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++2c -triple x86_64-unknown-unknown %s -verify=expected,since-cxx20,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors -#if __cplusplus == 199711L -// expected-no-diagnostics -#endif +namespace cwg820 { // cwg820: 2.7 +export template struct B {}; +// cxx98-17-warning@-1 {{exported templates are unsupported}} +// since-cxx20-error@-2 {{export declaration can only be used within a module purview}} +export template void f() {} +// cxx98-17-warning@-1 {{exported templates are unsupported}} +// since-cxx20-error@-2 {{export declaration can only be used within a module purview}} +} namespace cwg873 { // cwg873: 3.0 #if __cplusplus >= 201103L diff --git a/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2-0x.cpp b/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2-0x.cpp index 11dd5194192bee9..a63ffa92d726aac 100644 --- a/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2-0x.cpp +++ b/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -std=c++11 -verify %s -fexperimental-new-constant-interpreter template struct S; // expected-note 3{{here}} diff --git a/clang/test/CodeCompletion/ctor-signature.cpp b/clang/test/CodeCompletion/ctor-signature.cpp index d9bb2e566c51b75..556fc4db0136f89 100644 --- a/clang/test/CodeCompletion/ctor-signature.cpp +++ b/clang/test/CodeCompletion/ctor-signature.cpp @@ -17,7 +17,7 @@ void foo() { } namespace std { -template struct initializer_list {}; +template struct initializer_list { const E *a, *b; }; } // namespace std struct Bar { diff --git a/clang/test/CodeGen/RISCV/riscv-func-attr-target.c b/clang/test/CodeGen/RISCV/riscv-func-attr-target.c index 1f8682179ea8138..aeddbc4ebf68952 100644 --- a/clang/test/CodeGen/RISCV/riscv-func-attr-target.c +++ b/clang/test/CodeGen/RISCV/riscv-func-attr-target.c @@ -66,16 +66,16 @@ void test_rvv_f64_type_w_zve64d() { } //. -// CHECK: attributes #0 = { {{.*}}"target-features"="+64bit,+a,+m,+save-restore,+zifencei,-relax,-zbb,-zfa" } -// CHECK: attributes #1 = { {{.*}}"target-cpu"="rocket-rv64" "target-features"="+64bit,+a,+d,+f,+m,+save-restore,+v,+zicsr,+zifencei,+zve32f,+zve32x,+zve64d,+zve64f,+zve64x,+zvl128b,+zvl32b,+zvl64b,-relax,-zbb,-zfa" "tune-cpu"="generic-rv64" } -// CHECK: attributes #2 = { {{.*}}"target-features"="+64bit,+a,+m,+save-restore,+zbb,+zifencei,-relax,-zfa" } -// CHECK: attributes #3 = { {{.*}}"target-features"="+64bit,+a,+d,+f,+m,+save-restore,+v,+zbb,+zicond,+zicsr,+zifencei,+zve32f,+zve32x,+zve64d,+zve64f,+zve64x,+zvl128b,+zvl32b,+zvl64b,-relax,-zfa" } +// CHECK: attributes #0 = { {{.*}}"target-features"="+64bit,+a,+m,+save-restore,+zifencei,+zmmul,-relax,-zbb,-zfa" } +// CHECK: attributes #1 = { {{.*}}"target-cpu"="rocket-rv64" "target-features"="+64bit,+a,+d,+f,+m,+save-restore,+v,+zicsr,+zifencei,+zmmul,+zve32f,+zve32x,+zve64d,+zve64f,+zve64x,+zvl128b,+zvl32b,+zvl64b,-relax,-zbb,-zfa" "tune-cpu"="generic-rv64" } +// CHECK: attributes #2 = { {{.*}}"target-features"="+64bit,+a,+m,+save-restore,+zbb,+zifencei,+zmmul,-relax,-zfa" } +// CHECK: attributes #3 = { {{.*}}"target-features"="+64bit,+a,+d,+f,+m,+save-restore,+v,+zbb,+zicond,+zicsr,+zifencei,+zmmul,+zve32f,+zve32x,+zve64d,+zve64f,+zve64x,+zvl128b,+zvl32b,+zvl64b,-relax,-zfa" } // Make sure we append negative features if we override the arch -// CHECK: attributes #4 = { {{.*}}"target-features"="+64bit,+a,+c,+d,+f,+m,+save-restore,+zbb,+zicsr,+zifencei,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } -// CHECK: attributes #5 = { {{.*}}"target-features"="+64bit,+m,+save-restore,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } -// CHECK: attributes #6 = { {{.*}}"target-cpu"="sifive-u54" "target-features"="+64bit,+a,+m,+save-restore,+zbb,+zifencei,-relax,-zfa" } -// CHECK: attributes #7 = { {{.*}}"target-cpu"="sifive-u54" "target-features"="+64bit,+m,+save-restore,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } -// CHECK: attributes #8 = { {{.*}}"target-cpu"="sifive-u54" "target-features"="+64bit,+a,+c,+d,+f,+m,+save-restore,+zicsr,+zifencei,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } -// CHECK: attributes #9 = { {{.*}}"target-features"="+64bit,+a,+m,+save-restore,+zicsr,+zifencei,+zve32x,+zvl32b,-relax,-zbb,-zfa" } -// CHECK: attributes #11 = { {{.*}}"target-features"="+64bit,+a,+f,+m,+save-restore,+zicsr,+zifencei,+zve32f,+zve32x,+zvl32b,-relax,-zbb,-zfa" } -// CHECK: attributes #12 = { {{.*}}"target-features"="+64bit,+a,+d,+f,+m,+save-restore,+zicsr,+zifencei,+zve32f,+zve32x,+zve64d,+zve64f,+zve64x,+zvl32b,+zvl64b,-relax,-zbb,-zfa" } +// CHECK: attributes #4 = { {{.*}}"target-features"="+64bit,+a,+c,+d,+f,+m,+save-restore,+zbb,+zicsr,+zifencei,+zmmul,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } +// CHECK: attributes #5 = { {{.*}}"target-features"="+64bit,+m,+save-restore,+zmmul,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } +// CHECK: attributes #6 = { {{.*}}"target-cpu"="sifive-u54" "target-features"="+64bit,+a,+m,+save-restore,+zbb,+zifencei,+zmmul,-relax,-zfa" } +// CHECK: attributes #7 = { {{.*}}"target-cpu"="sifive-u54" "target-features"="+64bit,+m,+save-restore,+zmmul,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } +// CHECK: attributes #8 = { {{.*}}"target-cpu"="sifive-u54" "target-features"="+64bit,+a,+c,+d,+f,+m,+save-restore,+zicsr,+zifencei,+zmmul,{{(-[[:alnum:]-]+)(,-[[:alnum:]-]+)*}}" } +// CHECK: attributes #9 = { {{.*}}"target-features"="+64bit,+a,+m,+save-restore,+zicsr,+zifencei,+zmmul,+zve32x,+zvl32b,-relax,-zbb,-zfa" } +// CHECK: attributes #11 = { {{.*}}"target-features"="+64bit,+a,+f,+m,+save-restore,+zicsr,+zifencei,+zmmul,+zve32f,+zve32x,+zvl32b,-relax,-zbb,-zfa" } +// CHECK: attributes #12 = { {{.*}}"target-features"="+64bit,+a,+d,+f,+m,+save-restore,+zicsr,+zifencei,+zmmul,+zve32f,+zve32x,+zve64d,+zve64f,+zve64x,+zvl32b,+zvl64b,-relax,-zbb,-zfa" } diff --git a/clang/test/CodeGen/X86/ms-x86-intrinsics.c b/clang/test/CodeGen/X86/ms-x86-intrinsics.c index 9566951b44d2d87..b90e2679e26d27d 100644 --- a/clang/test/CodeGen/X86/ms-x86-intrinsics.c +++ b/clang/test/CodeGen/X86/ms-x86-intrinsics.c @@ -64,30 +64,54 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: ret i64 [[RES]] -int test_inp(unsigned short port) { - return _inp(port); +unsigned char test_inbyte(unsigned short port) { + return __inbyte(port); } -// CHECK-LABEL: i32 @test_inp(i16 noundef +// CHECK-LABEL: i8 @test_inbyte(i16 noundef // CHECK-SAME: [[PORT:%.*]]) -// CHECK: [[TMP0:%.*]] = tail call i32 asm sideeffect "inb ${1:w}, ${0:b}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]]) -// CHECK-NEXT: ret i32 [[TMP0]] +// CHECK: [[TMP0:%.*]] = tail call i8 asm sideeffect "inb ${1:w}, ${0:b}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]]) +// CHECK-NEXT: ret i8 [[TMP0]] -unsigned short test_inpw(unsigned short port) { - return _inpw(port); +unsigned short test_inword(unsigned short port) { + return __inword(port); } -// CHECK-LABEL: i16 @test_inpw(i16 noundef +// CHECK-LABEL: i16 @test_inword(i16 noundef // CHECK-SAME: [[PORT:%.*]]) // CHECK: [[TMP0:%.*]] = tail call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]]) // CHECK-NEXT: ret i16 [[TMP0]] -unsigned long test_inpd(unsigned short port) { - return _inpd(port); +unsigned long test_indword(unsigned short port) { + return __indword(port); } -// CHECK-LABEL: i32 @test_inpd(i16 noundef +// CHECK-LABEL: i32 @test_indword(i16 noundef // CHECK-SAME: [[PORT:%.*]]) // CHECK: [[TMP0:%.*]] = tail call i32 asm sideeffect "inl ${1:w}, ${0:k}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]]) // CHECK-NEXT: ret i32 [[TMP0]] +void test_outbyte(unsigned short port, unsigned char data) { + return __outbyte(port, data); +} +// CHECK-LABEL: void @test_outbyte( +// CHECK-SAME: [[PORT:%.*]], +// CHECK-SAME: [[DATA:%.*]]) +// CHECK: tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 [[DATA]], i16 [[PORT]]) + +void test_outword(unsigned short port, unsigned short data) { + return __outword(port, data); +} +// CHECK-LABEL: void @test_outword( +// CHECK-SAME: [[PORT:%.*]], +// CHECK-SAME: [[DATA:%.*]]) +// CHECK: tail call void asm sideeffect "outw ${0:w}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[DATA]], i16 [[PORT]]) + +void test_outdword(unsigned short port, unsigned long data) { + return __outdword(port, data); +} +// CHECK-LABEL: void @test_outdword( +// CHECK-SAME: [[PORT:%.*]], +// CHECK-SAME: [[DATA:%.*]]) +// CHECK: tail call void asm sideeffect "outl ${0:k}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 [[DATA]], i16 [[PORT]]) + #if defined(__x86_64__) char test__readgsbyte(unsigned long Offset) { diff --git a/clang/test/CodeGen/aarch64-fmv-dependencies.c b/clang/test/CodeGen/aarch64-fmv-dependencies.c index ec599e1b3fa7636..e39c7adbe4a9b08 100644 --- a/clang/test/CodeGen/aarch64-fmv-dependencies.c +++ b/clang/test/CodeGen/aarch64-fmv-dependencies.c @@ -192,49 +192,49 @@ int caller() { return fmv(); } -// CHECK: attributes #[[ATTR0:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[bf16_ebf16:[0-9]+]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[bti:[0-9]+]] = { {{.*}} "target-features"="+bti,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[crc:[0-9]+]] = { {{.*}} "target-features"="+crc,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[dit:[0-9]+]] = { {{.*}} "target-features"="+dit,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[dotprod:[0-9]+]] = { {{.*}} "target-features"="+dotprod,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[dpb:[0-9]+]] = { {{.*}} "target-features"="+ccpp,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[dpb2:[0-9]+]] = { {{.*}} "target-features"="+ccdp,+ccpp,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[f32mm:[0-9]+]] = { {{.*}} "target-features"="+f32mm,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" -// CHECK: attributes #[[f64mm:[0-9]+]] = { {{.*}} "target-features"="+f64mm,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" -// CHECK: attributes #[[fcma:[0-9]+]] = { {{.*}} "target-features"="+complxnum,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[flagm:[0-9]+]] = { {{.*}} "target-features"="+flagm,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[flagm2:[0-9]+]] = { {{.*}} "target-features"="+altnzcv,+flagm,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[fp16:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[fp16fml:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fp16fml,+fullfp16,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[frintts:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fptoint,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[i8mm:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+i8mm,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[jscvt:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+jsconv,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[ls64_accdata:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+ls64,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[lse:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+lse,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[memtag2:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+mte,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[mops:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+mops,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[pmull:[0-9]+]] = { {{.*}} "target-features"="+aes,+fp-armv8,+neon,+outline-atomics,+v8a" -// CHECK: attributes #[[predres:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+predres,+v8a" -// CHECK: attributes #[[rcpc:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rcpc,+v8a" -// CHECK: attributes #[[rcpc3:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rcpc,+rcpc3,+v8a" -// CHECK: attributes #[[rdm:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rdm,+v8a" -// CHECK: attributes #[[rng:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rand,+v8a" -// CHECK: attributes #[[sb:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sb,+v8a" -// CHECK: attributes #[[sha2:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sha2,+v8a" -// CHECK: attributes #[[sha3:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sha2,+sha3,+v8a" -// CHECK: attributes #[[sm4:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sm4,+v8a" -// CHECK: attributes #[[sme:[0-9]+]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+v8a" -// CHECK: attributes #[[sme_f64f64:[0-9]+]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+sme-f64f64,+v8a" -// CHECK: attributes #[[sme_i16i64:[0-9]+]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+sme-i16i64,+v8a" -// CHECK: attributes #[[sme2:[0-9]+]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+sme2,+v8a" -// CHECK: attributes #[[ssbs2:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+ssbs,+v8a" -// CHECK: attributes #[[sve:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" -// CHECK: attributes #[[sve_bf16_ebf16:[0-9]+]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" -// CHECK: attributes #[[sve_i8mm:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+i8mm,+neon,+outline-atomics,+sve,+v8a" -// CHECK: attributes #[[sve2:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+v8a" -// CHECK: attributes #[[sve2_aes_sve2_pmull128:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-aes,+v8a" -// CHECK: attributes #[[sve2_bitperm:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-bitperm,+v8a" -// CHECK: attributes #[[sve2_sha3:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-sha3,+v8a" -// CHECK: attributes #[[sve2_sm4:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-sm4,+v8a" -// CHECK: attributes #[[wfxt:[0-9]+]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+v8a,+wfxt" +// CHECK: attributes #[[ATTR0]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[bf16_ebf16]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[bti]] = { {{.*}} "target-features"="+bti,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[crc]] = { {{.*}} "target-features"="+crc,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[dit]] = { {{.*}} "target-features"="+dit,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[dotprod]] = { {{.*}} "target-features"="+dotprod,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[dpb]] = { {{.*}} "target-features"="+ccpp,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[dpb2]] = { {{.*}} "target-features"="+ccdp,+ccpp,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[f32mm]] = { {{.*}} "target-features"="+f32mm,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" +// CHECK: attributes #[[f64mm]] = { {{.*}} "target-features"="+f64mm,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" +// CHECK: attributes #[[fcma]] = { {{.*}} "target-features"="+complxnum,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[flagm]] = { {{.*}} "target-features"="+flagm,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[flagm2]] = { {{.*}} "target-features"="+altnzcv,+flagm,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[fp16]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[fp16fml]] = { {{.*}} "target-features"="+fp-armv8,+fp16fml,+fullfp16,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[frintts]] = { {{.*}} "target-features"="+fp-armv8,+fptoint,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[i8mm]] = { {{.*}} "target-features"="+fp-armv8,+i8mm,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[jscvt]] = { {{.*}} "target-features"="+fp-armv8,+jsconv,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[ls64_accdata]] = { {{.*}} "target-features"="+fp-armv8,+ls64,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[lse]] = { {{.*}} "target-features"="+fp-armv8,+lse,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[memtag2]] = { {{.*}} "target-features"="+fp-armv8,+mte,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[mops]] = { {{.*}} "target-features"="+fp-armv8,+mops,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[pmull]] = { {{.*}} "target-features"="+aes,+fp-armv8,+neon,+outline-atomics,+v8a" +// CHECK: attributes #[[predres]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+predres,+v8a" +// CHECK: attributes #[[rcpc]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rcpc,+v8a" +// CHECK: attributes #[[rcpc3]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rcpc,+rcpc3,+v8a" +// CHECK: attributes #[[rdm]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rdm,+v8a" +// CHECK: attributes #[[rng]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+rand,+v8a" +// CHECK: attributes #[[sb]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sb,+v8a" +// CHECK: attributes #[[sha2]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sha2,+v8a" +// CHECK: attributes #[[sha3]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sha2,+sha3,+v8a" +// CHECK: attributes #[[sm4]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+sm4,+v8a" +// CHECK: attributes #[[sme]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+v8a" +// CHECK: attributes #[[sme_f64f64]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+sme-f64f64,+v8a" +// CHECK: attributes #[[sme_i16i64]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+sme-i16i64,+v8a" +// CHECK: attributes #[[sme2]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+neon,+outline-atomics,+sme,+sme2,+v8a" +// CHECK: attributes #[[ssbs2]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+ssbs,+v8a" +// CHECK: attributes #[[sve]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" +// CHECK: attributes #[[sve_bf16_ebf16]] = { {{.*}} "target-features"="+bf16,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a" +// CHECK: attributes #[[sve_i8mm]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+i8mm,+neon,+outline-atomics,+sve,+v8a" +// CHECK: attributes #[[sve2]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+v8a" +// CHECK: attributes #[[sve2_aes_sve2_pmull128]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-aes,+v8a" +// CHECK: attributes #[[sve2_bitperm]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-bitperm,+v8a" +// CHECK: attributes #[[sve2_sha3]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-sha3,+v8a" +// CHECK: attributes #[[sve2_sm4]] = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-sm4,+v8a" +// CHECK: attributes #[[wfxt]] = { {{.*}} "target-features"="+fp-armv8,+neon,+outline-atomics,+v8a,+wfxt" diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abd.c index 18ef16feff3ec9c..f4ae472c9f82c04 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abd.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svabd_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svabd_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svabd_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svabd_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svabd_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svabd_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svabd_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svabd_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svabd_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svabd_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svabd_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svabd_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svabd_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svabd_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svabd_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svabd_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svabd_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svabd_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svabd_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svabd_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svabd_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svabd_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svabd_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svabd_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svabd_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svabd_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svabd_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svabd_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svabd_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svabd_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svabd_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svabd_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svabd_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svabd_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svabd_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svabd_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svabd_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svabd_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svabd_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svabd_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svabd_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svabd_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svabd_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svabd_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svabd_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svabd_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svabd_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svabd_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svabd_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svabd_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svabd_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svabd_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svabd_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svabd_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svabd_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svabd_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svabd_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svabd_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svabd_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svabd_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svabd_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svabd_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svabd_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svabd_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svabd_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svabd_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svabd_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svabd_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svabd_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svabd_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svabd_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svabd_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svabd_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svabd_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svabd_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svabd_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svabd_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svabd_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svabd_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svabd_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svabd_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svabd_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svabd_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svabd_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svabd_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svabd_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svabd_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svabd_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svabd_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svabd_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svabd_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svabd_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svabd_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svabd_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svabd_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svabd_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svabd_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svabd_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svabd_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svabd_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svabd_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svabd_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svabd_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svabd_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svabd_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svabd_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svabd_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svabd_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svabd_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svabd_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svabd_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svabd_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svabd_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svabd_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svabd_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svabd_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svabd_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svabd_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svabd_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svabd_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svabd_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svabd_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svabd_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svabd_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svabd_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svabd_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svabd_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svabd_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svabd_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sabd.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svabd_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svabd_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svabd_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svabd_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svabd_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svabd_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svabd_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svabd_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svabd_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svabd_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svabd_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svabd_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uabd.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svabd_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svabd_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_u64,_x,)(pg, op1, op2); } @@ -948,7 +956,7 @@ svuint64_t test_svabd_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svabd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svabd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f16,_z,)(pg, op1, op2); } @@ -967,7 +975,7 @@ svfloat16_t test_svabd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svabd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svabd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f32,_z,)(pg, op1, op2); } @@ -986,7 +994,7 @@ svfloat32_t test_svabd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svabd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svabd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f64,_z,)(pg, op1, op2); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svabd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svabd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svabd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f16,_m,)(pg, op1, op2); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svabd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svabd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svabd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f32,_m,)(pg, op1, op2); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svabd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svabd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svabd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f64,_m,)(pg, op1, op2); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svabd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svabd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svabd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f16,_x,)(pg, op1, op2); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svabd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svabd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svabd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f32,_x,)(pg, op1, op2); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svabd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svabd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svabd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_f64,_x,)(pg, op1, op2); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svabd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svabd_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svabd_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f16,_z,)(pg, op1, op2); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svabd_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svabd_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svabd_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f32,_z,)(pg, op1, op2); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svabd_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svabd_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svabd_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f64,_z,)(pg, op1, op2); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svabd_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svabd_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svabd_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f16,_m,)(pg, op1, op2); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svabd_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svabd_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svabd_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f32,_m,)(pg, op1, op2); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svabd_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svabd_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svabd_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f64,_m,)(pg, op1, op2); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svabd_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svabd_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svabd_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f16,_x,)(pg, op1, op2); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svabd_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svabd_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svabd_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f32,_x,)(pg, op1, op2); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svabd_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabd.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svabd_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svabd_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svabd,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abs.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abs.c index fab20023844e472..d4125fa3ac99577 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abs.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abs.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.abs.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svabs_s8_z(svbool_t pg, svint8_t op) +svint8_t test_svabs_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svint8_t test_svabs_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svabs_s16_z(svbool_t pg, svint16_t op) +svint16_t test_svabs_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svint16_t test_svabs_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svabs_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svabs_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svint32_t test_svabs_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svabs_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svabs_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svint64_t test_svabs_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.abs.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svabs_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) +svint8_t test_svabs_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s8,_m,)(inactive, pg, op); } @@ -107,7 +115,7 @@ svint8_t test_svabs_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svabs_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) +svint16_t test_svabs_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s16,_m,)(inactive, pg, op); } @@ -124,7 +132,7 @@ svint16_t test_svabs_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svabs_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svabs_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s32,_m,)(inactive, pg, op); } @@ -141,7 +149,7 @@ svint32_t test_svabs_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svabs_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svabs_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s64,_m,)(inactive, pg, op); } @@ -156,7 +164,7 @@ svint64_t test_svabs_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.abs.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svabs_s8_x(svbool_t pg, svint8_t op) +svint8_t test_svabs_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s8,_x,)(pg, op); } @@ -173,7 +181,7 @@ svint8_t test_svabs_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svabs_s16_x(svbool_t pg, svint16_t op) +svint16_t test_svabs_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s16,_x,)(pg, op); } @@ -190,7 +198,7 @@ svint16_t test_svabs_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svabs_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svabs_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s32,_x,)(pg, op); } @@ -207,7 +215,7 @@ svint32_t test_svabs_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.abs.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svabs_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svabs_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_s64,_x,)(pg, op); } @@ -224,7 +232,7 @@ svint64_t test_svabs_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svabs_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svabs_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f16,_z,)(pg, op); } @@ -241,7 +249,7 @@ svfloat16_t test_svabs_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svabs_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svabs_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f32,_z,)(pg, op); } @@ -258,7 +266,7 @@ svfloat32_t test_svabs_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svabs_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svabs_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f64,_z,)(pg, op); } @@ -275,7 +283,7 @@ svfloat64_t test_svabs_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svabs_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svabs_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f16,_m,)(inactive, pg, op); } @@ -292,7 +300,7 @@ svfloat16_t test_svabs_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svabs_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svabs_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f32,_m,)(inactive, pg, op); } @@ -309,7 +317,7 @@ svfloat32_t test_svabs_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svabs_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svabs_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f64,_m,)(inactive, pg, op); } @@ -326,7 +334,7 @@ svfloat64_t test_svabs_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svabs_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svabs_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f16,_x,)(pg, op); } @@ -343,7 +351,7 @@ svfloat16_t test_svabs_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svabs_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svabs_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f32,_x,)(pg, op); } @@ -360,7 +368,7 @@ svfloat32_t test_svabs_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fabs.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svabs_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svabs_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svabs,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acge.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acge.c index 0133223fb43e41a..d51e8e0a946c70e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acge.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acge.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacge_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svacge_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacge,_f16,,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svbool_t test_svacge_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacge_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svacge_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacge,_f32,,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svbool_t test_svacge_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacge_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svacge_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacge,_f64,,)(pg, op1, op2); } @@ -89,7 +97,7 @@ svbool_t test_svacge_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacge_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svacge_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacge,_n_f32,,)(pg, op1, op2); } @@ -112,7 +120,7 @@ svbool_t test_svacge_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacge_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svacge_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacge,_n_f64,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acgt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acgt.c index 1b1e6cbca8598fd..d1c780c50a1d294 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acgt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acgt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacgt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svacgt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacgt,_f16,,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svbool_t test_svacgt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacgt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svacgt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacgt,_f32,,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svbool_t test_svacgt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacgt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svacgt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacgt,_f64,,)(pg, op1, op2); } @@ -89,7 +97,7 @@ svbool_t test_svacgt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacgt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svacgt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacgt,_n_f32,,)(pg, op1, op2); } @@ -112,7 +120,7 @@ svbool_t test_svacgt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacgt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svacgt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacgt,_n_f64,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acle.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acle.c index 9cfb26eef2069af..f1de4d195d5c4b6 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acle.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_acle.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacle_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svacle_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacle,_f16,,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svbool_t test_svacle_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacle_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svacle_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacle,_f32,,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svbool_t test_svacle_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacle_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svacle_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacle,_f64,,)(pg, op1, op2); } @@ -89,7 +97,7 @@ svbool_t test_svacle_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacle_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svacle_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacle,_n_f32,,)(pg, op1, op2); } @@ -112,7 +120,7 @@ svbool_t test_svacle_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svacle_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svacle_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svacle,_n_f64,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_aclt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_aclt.c index 8c901d14a26fc57..df3101f565e91fe 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_aclt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_aclt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svaclt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svaclt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svaclt,_f16,,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svbool_t test_svaclt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svaclt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svaclt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svaclt,_f32,,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svbool_t test_svaclt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svaclt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svaclt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svaclt,_f64,,)(pg, op1, op2); } @@ -89,7 +97,7 @@ svbool_t test_svaclt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svaclt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svaclt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svaclt,_n_f32,,)(pg, op1, op2); } @@ -112,7 +120,7 @@ svbool_t test_svaclt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svaclt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svaclt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svaclt,_n_f64,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_add.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_add.c index 8844297ff9d8831..f671a2f23ca3dab 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_add.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_add.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svadd_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svadd_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svadd_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svadd_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svadd_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svadd_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svadd_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svadd_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svadd_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svadd_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svadd_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svadd_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svadd_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svadd_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svadd_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svadd_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svadd_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svadd_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svadd_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svadd_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svadd_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svadd_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svadd_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svadd_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svadd_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svadd_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svadd_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svadd_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svadd_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svadd_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svadd_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svadd_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svadd_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svadd_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svadd_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svadd_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svadd_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svadd_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svadd_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svadd_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svadd_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svadd_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svadd_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svadd_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svadd_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svadd_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svadd_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svadd_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svadd_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svadd_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svadd_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svadd_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svadd_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svadd_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svadd_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svadd_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svadd_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svadd_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svadd_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svadd_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svadd_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svadd_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svadd_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svadd_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svadd_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svadd_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svadd_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svadd_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svadd_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svadd_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svadd_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svadd_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svadd_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svadd_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svadd_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svadd_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svadd_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svadd_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svadd_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svadd_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svadd_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svadd_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svadd_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svadd_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svadd_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svadd_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svadd_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svadd_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svadd_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svadd_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svadd_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svadd_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svadd_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svadd_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svadd_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svadd_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svadd_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svadd_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svadd_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svadd_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svadd_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svadd_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svadd_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svadd_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svadd_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svadd_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svadd_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svadd_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svadd_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svadd_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svadd_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svadd_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svadd_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svadd_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svadd_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svadd_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svadd_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svadd_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svadd_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svadd_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svadd_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svadd_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svadd_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svadd_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svadd_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svadd_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svadd_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svadd_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svadd_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svadd_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svadd_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svadd_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svadd_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svadd_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svadd_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svadd_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svadd_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svadd_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svadd_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svadd_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svadd_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.add.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svadd_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svadd_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_u64,_x,)(pg, op1, op2); } @@ -948,7 +956,7 @@ svuint64_t test_svadd_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svadd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svadd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f16,_z,)(pg, op1, op2); } @@ -967,7 +975,7 @@ svfloat16_t test_svadd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svadd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svadd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f32,_z,)(pg, op1, op2); } @@ -986,7 +994,7 @@ svfloat32_t test_svadd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svadd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svadd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f64,_z,)(pg, op1, op2); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svadd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svadd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svadd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f16,_m,)(pg, op1, op2); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svadd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svadd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svadd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f32,_m,)(pg, op1, op2); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svadd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svadd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svadd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f64,_m,)(pg, op1, op2); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svadd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svadd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svadd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f16,_x,)(pg, op1, op2); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svadd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svadd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svadd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f32,_x,)(pg, op1, op2); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svadd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svadd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svadd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_f64,_x,)(pg, op1, op2); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svadd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svadd_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svadd_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f16,_z,)(pg, op1, op2); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svadd_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svadd_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svadd_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f32,_z,)(pg, op1, op2); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svadd_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svadd_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svadd_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f64,_z,)(pg, op1, op2); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svadd_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svadd_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svadd_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f16,_m,)(pg, op1, op2); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svadd_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svadd_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svadd_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f32,_m,)(pg, op1, op2); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svadd_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svadd_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svadd_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f64,_m,)(pg, op1, op2); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svadd_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svadd_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svadd_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f16,_x,)(pg, op1, op2); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svadd_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svadd_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svadd_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f32,_x,)(pg, op1, op2); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svadd_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fadd.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svadd_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svadd_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svadd,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_addv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_addv.c index fdac8aafe2a1d7d..efd004699895787 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_addv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_addv.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.saddv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svaddv_s8(svbool_t pg, svint8_t op) +int64_t test_svaddv_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_s8,,)(pg, op); } @@ -41,7 +49,7 @@ int64_t test_svaddv_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.saddv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svaddv_s16(svbool_t pg, svint16_t op) +int64_t test_svaddv_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_s16,,)(pg, op); } @@ -58,7 +66,7 @@ int64_t test_svaddv_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.saddv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svaddv_s32(svbool_t pg, svint32_t op) +int64_t test_svaddv_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_s32,,)(pg, op); } @@ -75,7 +83,7 @@ int64_t test_svaddv_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.saddv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svaddv_s64(svbool_t pg, svint64_t op) +int64_t test_svaddv_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_s64,,)(pg, op); } @@ -90,7 +98,7 @@ int64_t test_svaddv_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uaddv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svaddv_u8(svbool_t pg, svuint8_t op) +uint64_t test_svaddv_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_u8,,)(pg, op); } @@ -107,7 +115,7 @@ uint64_t test_svaddv_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uaddv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svaddv_u16(svbool_t pg, svuint16_t op) +uint64_t test_svaddv_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_u16,,)(pg, op); } @@ -124,7 +132,7 @@ uint64_t test_svaddv_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uaddv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svaddv_u32(svbool_t pg, svuint32_t op) +uint64_t test_svaddv_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_u32,,)(pg, op); } @@ -141,7 +149,7 @@ uint64_t test_svaddv_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uaddv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svaddv_u64(svbool_t pg, svuint64_t op) +uint64_t test_svaddv_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_u64,,)(pg, op); } @@ -158,7 +166,7 @@ uint64_t test_svaddv_u64(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.faddv.nxv8f16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svaddv_f16(svbool_t pg, svfloat16_t op) +float16_t test_svaddv_f16(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_f16,,)(pg, op); } @@ -175,7 +183,7 @@ float16_t test_svaddv_f16(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.faddv.nxv4f32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svaddv_f32(svbool_t pg, svfloat32_t op) +float32_t test_svaddv_f32(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_f32,,)(pg, op); } @@ -192,7 +200,7 @@ float32_t test_svaddv_f32(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.faddv.nxv2f64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svaddv_f64(svbool_t pg, svfloat64_t op) +float64_t test_svaddv_f64(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svaddv,_f64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_and.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_and.c index 6e02b018834f529..ccb8d6259a65658 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_and.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_and.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svand_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svand_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svand_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svand_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svand_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svand_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svand_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svand_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svand_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svand_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svand_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svand_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svand_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svand_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svand_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svand_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svand_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svand_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svand_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svand_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svand_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svand_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svand_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svand_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svand_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svand_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svand_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svand_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svand_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svand_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svand_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svand_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svand_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svand_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svand_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svand_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svand_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svand_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svand_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svand_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svand_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svand_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svand_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svand_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svand_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svand_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svand_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svand_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svand_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svand_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svand_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svand_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svand_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svand_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svand_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svand_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svand_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svand_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svand_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svand_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svand_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svand_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svand_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svand_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svand_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svand_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svand_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svand_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svand_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svand_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svand_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svand_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svand_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svand_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svand_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svand_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svand_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svand_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svand_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svand_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svand_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svand_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svand_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svand_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svand_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svand_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svand_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svand_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svand_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svand_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svand_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svand_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svand_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svand_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svand_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svand_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svand_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svand_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svand_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svand_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svand_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svand_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svand_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svand_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svand_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svand_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svand_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svand_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svand_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svand_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svand_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svand_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svand_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svand_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svand_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svand_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svand_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svand_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svand_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svand_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svand_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svand_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svand_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svand_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svand_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svand_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svand_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svand_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svand_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svand_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svand_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svand_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svand_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svand_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svand_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svand_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svand_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svand_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svand_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svand_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svand_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.and.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svand_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svand_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_n_u64,_x,)(pg, op1, op2); } @@ -944,7 +952,7 @@ svuint64_t test_svand_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svand_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svand_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svand,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_andv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_andv.c index ed5c9da5a47ccb0..73e7267c24ee844 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_andv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_andv.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.andv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svandv_s8(svbool_t pg, svint8_t op) +int8_t test_svandv_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_s8,,)(pg, op); } @@ -41,7 +49,7 @@ int8_t test_svandv_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.andv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -int16_t test_svandv_s16(svbool_t pg, svint16_t op) +int16_t test_svandv_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_s16,,)(pg, op); } @@ -58,7 +66,7 @@ int16_t test_svandv_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.andv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svandv_s32(svbool_t pg, svint32_t op) +int32_t test_svandv_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_s32,,)(pg, op); } @@ -75,7 +83,7 @@ int32_t test_svandv_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.andv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svandv_s64(svbool_t pg, svint64_t op) +int64_t test_svandv_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_s64,,)(pg, op); } @@ -90,7 +98,7 @@ int64_t test_svandv_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.andv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svandv_u8(svbool_t pg, svuint8_t op) +uint8_t test_svandv_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_u8,,)(pg, op); } @@ -107,7 +115,7 @@ uint8_t test_svandv_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.andv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -uint16_t test_svandv_u16(svbool_t pg, svuint16_t op) +uint16_t test_svandv_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_u16,,)(pg, op); } @@ -124,7 +132,7 @@ uint16_t test_svandv_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.andv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svandv_u32(svbool_t pg, svuint32_t op) +uint32_t test_svandv_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_u32,,)(pg, op); } @@ -141,7 +149,7 @@ uint32_t test_svandv_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.andv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svandv_u64(svbool_t pg, svuint64_t op) +uint64_t test_svandv_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svandv,_u64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asr.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asr.c index 073d3bb52c7195f..d68b5274c3f3aef 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asr.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asr.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svasr_s8_z(svbool_t pg, svint8_t op1, svuint8_t op2) +svint8_t test_svasr_s8_z(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svasr_s8_z(svbool_t pg, svint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svasr_s16_z(svbool_t pg, svint16_t op1, svuint16_t op2) +svint16_t test_svasr_s16_z(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svasr_s16_z(svbool_t pg, svint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svasr_s32_z(svbool_t pg, svint32_t op1, svuint32_t op2) +svint32_t test_svasr_s32_z(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svasr_s32_z(svbool_t pg, svint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svasr_s64_z(svbool_t pg, svint64_t op1, svuint64_t op2) +svint64_t test_svasr_s64_z(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s64,_z,)(pg, op1, op2); } @@ -98,7 +106,7 @@ svint64_t test_svasr_s64_z(svbool_t pg, svint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_s8_m(svbool_t pg, svint8_t op1, svuint8_t op2) +svint8_t test_svasr_s8_m(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s8,_m,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svint8_t test_svasr_s8_m(svbool_t pg, svint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_s16_m(svbool_t pg, svint16_t op1, svuint16_t op2) +svint16_t test_svasr_s16_m(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s16,_m,)(pg, op1, op2); } @@ -132,7 +140,7 @@ svint16_t test_svasr_s16_m(svbool_t pg, svint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_s32_m(svbool_t pg, svint32_t op1, svuint32_t op2) +svint32_t test_svasr_s32_m(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s32,_m,)(pg, op1, op2); } @@ -149,7 +157,7 @@ svint32_t test_svasr_s32_m(svbool_t pg, svint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svasr_s64_m(svbool_t pg, svint64_t op1, svuint64_t op2) +svint64_t test_svasr_s64_m(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s64,_m,)(pg, op1, op2); } @@ -164,7 +172,7 @@ svint64_t test_svasr_s64_m(svbool_t pg, svint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_s8_x(svbool_t pg, svint8_t op1, svuint8_t op2) +svint8_t test_svasr_s8_x(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s8,_x,)(pg, op1, op2); } @@ -181,7 +189,7 @@ svint8_t test_svasr_s8_x(svbool_t pg, svint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_s16_x(svbool_t pg, svint16_t op1, svuint16_t op2) +svint16_t test_svasr_s16_x(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s16,_x,)(pg, op1, op2); } @@ -198,7 +206,7 @@ svint16_t test_svasr_s16_x(svbool_t pg, svint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_s32_x(svbool_t pg, svint32_t op1, svuint32_t op2) +svint32_t test_svasr_s32_x(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s32,_x,)(pg, op1, op2); } @@ -215,7 +223,7 @@ svint32_t test_svasr_s32_x(svbool_t pg, svint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svasr_s64_x(svbool_t pg, svint64_t op1, svuint64_t op2) +svint64_t test_svasr_s64_x(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_s64,_x,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svasr_s64_x(svbool_t pg, svint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svasr_n_s64_z(svbool_t pg, svint64_t op1, uint64_t op2) +svint64_t test_svasr_n_s64_z(svbool_t pg, svint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s64,_z,)(pg, op1, op2); } @@ -259,7 +267,7 @@ svint64_t test_svasr_n_s64_z(svbool_t pg, svint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svasr_n_s64_m(svbool_t pg, svint64_t op1, uint64_t op2) +svint64_t test_svasr_n_s64_m(svbool_t pg, svint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s64,_m,)(pg, op1, op2); } @@ -280,7 +288,7 @@ svint64_t test_svasr_n_s64_m(svbool_t pg, svint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svasr_n_s64_x(svbool_t pg, svint64_t op1, uint64_t op2) +svint64_t test_svasr_n_s64_x(svbool_t pg, svint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s64,_x,)(pg, op1, op2); } @@ -297,7 +305,7 @@ svint64_t test_svasr_n_s64_x(svbool_t pg, svint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svasr_wide_s8_z(svbool_t pg, svint8_t op1, svuint64_t op2) +svint8_t test_svasr_wide_s8_z(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s8,_z,)(pg, op1, op2); } @@ -316,7 +324,7 @@ svint8_t test_svasr_wide_s8_z(svbool_t pg, svint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svasr_wide_s16_z(svbool_t pg, svint16_t op1, svuint64_t op2) +svint16_t test_svasr_wide_s16_z(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s16,_z,)(pg, op1, op2); } @@ -335,7 +343,7 @@ svint16_t test_svasr_wide_s16_z(svbool_t pg, svint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svasr_wide_s32_z(svbool_t pg, svint32_t op1, svuint64_t op2) +svint32_t test_svasr_wide_s32_z(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s32,_z,)(pg, op1, op2); } @@ -350,7 +358,7 @@ svint32_t test_svasr_wide_s32_z(svbool_t pg, svint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_wide_s8_m(svbool_t pg, svint8_t op1, svuint64_t op2) +svint8_t test_svasr_wide_s8_m(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s8,_m,)(pg, op1, op2); } @@ -367,7 +375,7 @@ svint8_t test_svasr_wide_s8_m(svbool_t pg, svint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_wide_s16_m(svbool_t pg, svint16_t op1, svuint64_t op2) +svint16_t test_svasr_wide_s16_m(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s16,_m,)(pg, op1, op2); } @@ -384,7 +392,7 @@ svint16_t test_svasr_wide_s16_m(svbool_t pg, svint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_wide_s32_m(svbool_t pg, svint32_t op1, svuint64_t op2) +svint32_t test_svasr_wide_s32_m(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s32,_m,)(pg, op1, op2); } @@ -399,7 +407,7 @@ svint32_t test_svasr_wide_s32_m(svbool_t pg, svint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_wide_s8_x(svbool_t pg, svint8_t op1, svuint64_t op2) +svint8_t test_svasr_wide_s8_x(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s8,_x,)(pg, op1, op2); } @@ -416,7 +424,7 @@ svint8_t test_svasr_wide_s8_x(svbool_t pg, svint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_wide_s16_x(svbool_t pg, svint16_t op1, svuint64_t op2) +svint16_t test_svasr_wide_s16_x(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s16,_x,)(pg, op1, op2); } @@ -433,7 +441,7 @@ svint16_t test_svasr_wide_s16_x(svbool_t pg, svint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_wide_s32_x(svbool_t pg, svint32_t op1, svuint64_t op2) +svint32_t test_svasr_wide_s32_x(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_s32,_x,)(pg, op1, op2); } @@ -454,7 +462,7 @@ svint32_t test_svasr_wide_s32_x(svbool_t pg, svint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svasr_n_s8_z(svbool_t pg, svint8_t op1, uint8_t op2) +svint8_t test_svasr_n_s8_z(svbool_t pg, svint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s8,_z,)(pg, op1, op2); } @@ -477,7 +485,7 @@ svint8_t test_svasr_n_s8_z(svbool_t pg, svint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svasr_n_s16_z(svbool_t pg, svint16_t op1, uint16_t op2) +svint16_t test_svasr_n_s16_z(svbool_t pg, svint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s16,_z,)(pg, op1, op2); } @@ -500,7 +508,7 @@ svint16_t test_svasr_n_s16_z(svbool_t pg, svint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svasr_n_s32_z(svbool_t pg, svint32_t op1, uint32_t op2) +svint32_t test_svasr_n_s32_z(svbool_t pg, svint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s32,_z,)(pg, op1, op2); } @@ -519,7 +527,7 @@ svint32_t test_svasr_n_s32_z(svbool_t pg, svint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_n_s8_m(svbool_t pg, svint8_t op1, uint8_t op2) +svint8_t test_svasr_n_s8_m(svbool_t pg, svint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s8,_m,)(pg, op1, op2); } @@ -540,7 +548,7 @@ svint8_t test_svasr_n_s8_m(svbool_t pg, svint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_n_s16_m(svbool_t pg, svint16_t op1, uint16_t op2) +svint16_t test_svasr_n_s16_m(svbool_t pg, svint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s16,_m,)(pg, op1, op2); } @@ -561,7 +569,7 @@ svint16_t test_svasr_n_s16_m(svbool_t pg, svint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_n_s32_m(svbool_t pg, svint32_t op1, uint32_t op2) +svint32_t test_svasr_n_s32_m(svbool_t pg, svint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s32,_m,)(pg, op1, op2); } @@ -580,7 +588,7 @@ svint32_t test_svasr_n_s32_m(svbool_t pg, svint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_n_s8_x(svbool_t pg, svint8_t op1, uint8_t op2) +svint8_t test_svasr_n_s8_x(svbool_t pg, svint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s8,_x,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svint8_t test_svasr_n_s8_x(svbool_t pg, svint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_n_s16_x(svbool_t pg, svint16_t op1, uint16_t op2) +svint16_t test_svasr_n_s16_x(svbool_t pg, svint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s16,_x,)(pg, op1, op2); } @@ -622,7 +630,7 @@ svint16_t test_svasr_n_s16_x(svbool_t pg, svint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_n_s32_x(svbool_t pg, svint32_t op1, uint32_t op2) +svint32_t test_svasr_n_s32_x(svbool_t pg, svint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr,_n_s32,_x,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint32_t test_svasr_n_s32_x(svbool_t pg, svint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_wide_n_s8_m(svbool_t pg, svint8_t op1, uint64_t op2) +svint8_t test_svasr_wide_n_s8_m(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s8,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint8_t test_svasr_wide_n_s8_m(svbool_t pg, svint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_wide_n_s16_m(svbool_t pg, svint16_t op1, uint64_t op2) +svint16_t test_svasr_wide_n_s16_m(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s16,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint16_t test_svasr_wide_n_s16_m(svbool_t pg, svint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_wide_n_s32_m(svbool_t pg, svint32_t op1, uint64_t op2) +svint32_t test_svasr_wide_n_s32_m(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s32,_m,)(pg, op1, op2); } @@ -704,7 +712,7 @@ svint32_t test_svasr_wide_n_s32_m(svbool_t pg, svint32_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svasr_wide_n_s8_z(svbool_t pg, svint8_t op1, uint64_t op2) +svint8_t test_svasr_wide_n_s8_z(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s8,_z,)(pg, op1, op2); } @@ -727,7 +735,7 @@ svint8_t test_svasr_wide_n_s8_z(svbool_t pg, svint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svasr_wide_n_s16_z(svbool_t pg, svint16_t op1, uint64_t op2) +svint16_t test_svasr_wide_n_s16_z(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s16,_z,)(pg, op1, op2); } @@ -750,7 +758,7 @@ svint16_t test_svasr_wide_n_s16_z(svbool_t pg, svint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svasr_wide_n_s32_z(svbool_t pg, svint32_t op1, uint64_t op2) +svint32_t test_svasr_wide_n_s32_z(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s32,_z,)(pg, op1, op2); } @@ -769,7 +777,7 @@ svint32_t test_svasr_wide_n_s32_z(svbool_t pg, svint32_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasr_wide_n_s8_x(svbool_t pg, svint8_t op1, uint64_t op2) +svint8_t test_svasr_wide_n_s8_x(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s8,_x,)(pg, op1, op2); } @@ -790,7 +798,7 @@ svint8_t test_svasr_wide_n_s8_x(svbool_t pg, svint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasr_wide_n_s16_x(svbool_t pg, svint16_t op1, uint64_t op2) +svint16_t test_svasr_wide_n_s16_x(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s16,_x,)(pg, op1, op2); } @@ -811,7 +819,7 @@ svint16_t test_svasr_wide_n_s16_x(svbool_t pg, svint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasr_wide_n_s32_x(svbool_t pg, svint32_t op1, uint64_t op2) +svint32_t test_svasr_wide_n_s32_x(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svasr_wide,_n_s32,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asrd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asrd.c index 87091eebe851c49..4532f77cb4677eb 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asrd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_asrd.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv16i8( [[PG]], [[TMP0]], i32 1) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svasrd_n_s8_z(svbool_t pg, svint8_t op1) +svint8_t test_svasrd_n_s8_z(svbool_t pg, svint8_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s8,_z,)(pg, op1, 1); } @@ -43,7 +51,7 @@ svint8_t test_svasrd_n_s8_z(svbool_t pg, svint8_t op1) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv16i8( [[PG]], [[TMP0]], i32 8) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svasrd_n_s8_z_1(svbool_t pg, svint8_t op1) +svint8_t test_svasrd_n_s8_z_1(svbool_t pg, svint8_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s8,_z,)(pg, op1, 8); } @@ -62,7 +70,7 @@ svint8_t test_svasrd_n_s8_z_1(svbool_t pg, svint8_t op1) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv8i16( [[TMP0]], [[TMP1]], i32 1) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svasrd_n_s16_z(svbool_t pg, svint16_t op1) +svint16_t test_svasrd_n_s16_z(svbool_t pg, svint16_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s16,_z,)(pg, op1, 1); } @@ -81,7 +89,7 @@ svint16_t test_svasrd_n_s16_z(svbool_t pg, svint16_t op1) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv8i16( [[TMP0]], [[TMP1]], i32 16) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svasrd_n_s16_z_1(svbool_t pg, svint16_t op1) +svint16_t test_svasrd_n_s16_z_1(svbool_t pg, svint16_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s16,_z,)(pg, op1, 16); } @@ -100,7 +108,7 @@ svint16_t test_svasrd_n_s16_z_1(svbool_t pg, svint16_t op1) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv4i32( [[TMP0]], [[TMP1]], i32 1) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svasrd_n_s32_z(svbool_t pg, svint32_t op1) +svint32_t test_svasrd_n_s32_z(svbool_t pg, svint32_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s32,_z,)(pg, op1, 1); } @@ -119,7 +127,7 @@ svint32_t test_svasrd_n_s32_z(svbool_t pg, svint32_t op1) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv4i32( [[TMP0]], [[TMP1]], i32 32) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svasrd_n_s32_z_1(svbool_t pg, svint32_t op1) +svint32_t test_svasrd_n_s32_z_1(svbool_t pg, svint32_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s32,_z,)(pg, op1, 32); } @@ -138,7 +146,7 @@ svint32_t test_svasrd_n_s32_z_1(svbool_t pg, svint32_t op1) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv2i64( [[TMP0]], [[TMP1]], i32 1) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svasrd_n_s64_z(svbool_t pg, svint64_t op1) +svint64_t test_svasrd_n_s64_z(svbool_t pg, svint64_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s64,_z,)(pg, op1, 1); } @@ -157,7 +165,7 @@ svint64_t test_svasrd_n_s64_z(svbool_t pg, svint64_t op1) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv2i64( [[TMP0]], [[TMP1]], i32 64) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svasrd_n_s64_z_1(svbool_t pg, svint64_t op1) +svint64_t test_svasrd_n_s64_z_1(svbool_t pg, svint64_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s64,_z,)(pg, op1, 64); } @@ -172,7 +180,7 @@ svint64_t test_svasrd_n_s64_z_1(svbool_t pg, svint64_t op1) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv16i8( [[PG:%.*]], [[OP1:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasrd_n_s8_m(svbool_t pg, svint8_t op1) +svint8_t test_svasrd_n_s8_m(svbool_t pg, svint8_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s8,_m,)(pg, op1, 1); } @@ -189,7 +197,7 @@ svint8_t test_svasrd_n_s8_m(svbool_t pg, svint8_t op1) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv8i16( [[TMP0]], [[OP1:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasrd_n_s16_m(svbool_t pg, svint16_t op1) +svint16_t test_svasrd_n_s16_m(svbool_t pg, svint16_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s16,_m,)(pg, op1, 1); } @@ -206,7 +214,7 @@ svint16_t test_svasrd_n_s16_m(svbool_t pg, svint16_t op1) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv4i32( [[TMP0]], [[OP1:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasrd_n_s32_m(svbool_t pg, svint32_t op1) +svint32_t test_svasrd_n_s32_m(svbool_t pg, svint32_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s32,_m,)(pg, op1, 1); } @@ -223,7 +231,7 @@ svint32_t test_svasrd_n_s32_m(svbool_t pg, svint32_t op1) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv2i64( [[TMP0]], [[OP1:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svasrd_n_s64_m(svbool_t pg, svint64_t op1) +svint64_t test_svasrd_n_s64_m(svbool_t pg, svint64_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s64,_m,)(pg, op1, 1); } @@ -238,7 +246,7 @@ svint64_t test_svasrd_n_s64_m(svbool_t pg, svint64_t op1) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv16i8( [[PG:%.*]], [[OP1:%.*]], i32 8) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svasrd_n_s8_x(svbool_t pg, svint8_t op1) +svint8_t test_svasrd_n_s8_x(svbool_t pg, svint8_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s8,_x,)(pg, op1, 8); } @@ -255,7 +263,7 @@ svint8_t test_svasrd_n_s8_x(svbool_t pg, svint8_t op1) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv8i16( [[TMP0]], [[OP1:%.*]], i32 16) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svasrd_n_s16_x(svbool_t pg, svint16_t op1) +svint16_t test_svasrd_n_s16_x(svbool_t pg, svint16_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s16,_x,)(pg, op1, 16); } @@ -272,7 +280,7 @@ svint16_t test_svasrd_n_s16_x(svbool_t pg, svint16_t op1) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv4i32( [[TMP0]], [[OP1:%.*]], i32 32) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svasrd_n_s32_x(svbool_t pg, svint32_t op1) +svint32_t test_svasrd_n_s32_x(svbool_t pg, svint32_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s32,_x,)(pg, op1, 32); } @@ -289,7 +297,7 @@ svint32_t test_svasrd_n_s32_x(svbool_t pg, svint32_t op1) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.asrd.nxv2i64( [[TMP0]], [[OP1:%.*]], i32 64) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svasrd_n_s64_x(svbool_t pg, svint64_t op1) +svint64_t test_svasrd_n_s64_x(svbool_t pg, svint64_t op1) MODE_ATTR { return SVE_ACLE_FUNC(svasrd,_n_s64,_x,)(pg, op1, 64); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfdot.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfdot.c index 6424c5fd6d03c40..bbbd612507bcb62 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfdot.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfdot.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target - // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfdot( [[X:%.*]], [[Y:%.*]], [[Z:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfdot_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_bfdot_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfdot, _f32, , )(x, y, z); } @@ -39,7 +46,7 @@ svfloat32_t test_bfdot_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfdot.lane.v2( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfdot_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_bfdot_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfdot_lane, _f32, , )(x, y, z, 0); } @@ -53,7 +60,7 @@ svfloat32_t test_bfdot_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfdot.lane.v2( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfdot_lane_3_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_bfdot_lane_3_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfdot_lane, _f32, , )(x, y, z, 3); } @@ -71,6 +78,6 @@ svfloat32_t test_bfdot_lane_3_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfdot( [[X:%.*]], [[Y:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfdot_n_f32(svfloat32_t x, svbfloat16_t y, bfloat16_t z) { +svfloat32_t test_bfdot_n_f32(svfloat32_t x, svbfloat16_t y, bfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfdot, _n_f32, , )(x, y, z); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalb.c index 57c121742af6acb..d0c9166a725bb81 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalb.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target - // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalb( [[X:%.*]], [[Y:%.*]], [[Z:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svbfmlalb_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_svbfmlalb_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalb, _f32, , )(x, y, z); } @@ -39,7 +46,7 @@ svfloat32_t test_svbfmlalb_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalb.lane.v2( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfmlalb_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_bfmlalb_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalb_lane, _f32, , )(x, y, z, 0); } @@ -53,7 +60,7 @@ svfloat32_t test_bfmlalb_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalb.lane.v2( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 7) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfmlalb_lane_7_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_bfmlalb_lane_7_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalb_lane, _f32, , )(x, y, z, 7); } @@ -71,6 +78,6 @@ svfloat32_t test_bfmlalb_lane_7_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalb( [[X:%.*]], [[Y:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfmlalb_n_f32(svfloat32_t x, svbfloat16_t y, bfloat16_t z) { +svfloat32_t test_bfmlalb_n_f32(svfloat32_t x, svbfloat16_t y, bfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalb, _n_f32, , )(x, y, z); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalt.c index b1904ae4c0469e6..f7f9a9fef4925d7 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalt.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target - // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalt( [[X:%.*]], [[Y:%.*]], [[Z:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svbfmlalt_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_svbfmlalt_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalt, _f32, , )(x, y, z); } @@ -39,7 +46,7 @@ svfloat32_t test_svbfmlalt_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalt.lane.v2( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfmlalt_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_bfmlalt_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalt_lane, _f32, , )(x, y, z, 0); } @@ -53,7 +60,7 @@ svfloat32_t test_bfmlalt_lane_0_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalt.lane.v2( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 7) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfmlalt_lane_7_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) { +svfloat32_t test_bfmlalt_lane_7_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalt_lane, _f32, , )(x, y, z, 7); } @@ -71,6 +78,6 @@ svfloat32_t test_bfmlalt_lane_7_f32(svfloat32_t x, svbfloat16_t y, svbfloat16_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bfmlalt( [[X:%.*]], [[Y:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_bfmlalt_n_f32(svfloat32_t x, svbfloat16_t y, bfloat16_t z) { +svfloat32_t test_bfmlalt_n_f32(svfloat32_t x, svbfloat16_t y, bfloat16_t z) MODE_ATTR { return SVE_ACLE_FUNC(svbfmlalt, _n_f32, , )(x, y, z); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bic.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bic.c index bf5cf17dafa6d8e..597a130a16afc94 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bic.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bic.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svbic_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svbic_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svbic_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svbic_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svbic_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svbic_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svbic_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svbic_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svbic_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svbic_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svbic_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svbic_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svbic_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svbic_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svbic_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svbic_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svbic_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svbic_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svbic_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svbic_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svbic_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svbic_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svbic_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svbic_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svbic_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svbic_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svbic_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svbic_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svbic_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svbic_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svbic_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svbic_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svbic_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svbic_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svbic_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svbic_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svbic_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svbic_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svbic_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svbic_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svbic_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svbic_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svbic_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svbic_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svbic_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svbic_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svbic_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svbic_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svbic_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svbic_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svbic_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svbic_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svbic_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svbic_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svbic_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svbic_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svbic_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svbic_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svbic_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svbic_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svbic_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svbic_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svbic_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svbic_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svbic_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svbic_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svbic_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svbic_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svbic_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svbic_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svbic_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svbic_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svbic_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svbic_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svbic_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svbic_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svbic_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svbic_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svbic_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svbic_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svbic_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svbic_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svbic_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svbic_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svbic_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svbic_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svbic_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svbic_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svbic_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svbic_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svbic_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svbic_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svbic_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svbic_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svbic_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svbic_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svbic_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svbic_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svbic_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svbic_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svbic_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svbic_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svbic_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svbic_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svbic_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svbic_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svbic_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svbic_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svbic_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svbic_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svbic_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svbic_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svbic_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svbic_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svbic_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svbic_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svbic_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svbic_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svbic_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svbic_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svbic_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svbic_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svbic_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svbic_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svbic_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svbic_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svbic_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svbic_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svbic_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svbic_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svbic_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svbic_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svbic_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svbic_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svbic_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svbic_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svbic_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svbic_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svbic_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svbic_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svbic_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.bic.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svbic_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svbic_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_n_u64,_x,)(pg, op1, op2); } @@ -944,7 +952,7 @@ svuint64_t test_svbic_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.bic.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbic_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svbic_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbic,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brka.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brka.c index c07325f769dbf68..15cc2b0d2608442 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brka.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brka.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.brka.z.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbrka_b_z(svbool_t pg, svbool_t op) +svbool_t test_svbrka_b_z(svbool_t pg, svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svbrka,_b,_z,)(pg, op); } @@ -39,7 +47,7 @@ svbool_t test_svbrka_b_z(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.brka.nxv16i1( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbrka_b_m(svbool_t inactive, svbool_t pg, svbool_t op) +svbool_t test_svbrka_b_m(svbool_t inactive, svbool_t pg, svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svbrka,_b,_m,)(inactive, pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkb.c index 0dbc7474bd3e6db..50a9a1770edf605 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.brkb.z.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbrkb_b_z(svbool_t pg, svbool_t op) +svbool_t test_svbrkb_b_z(svbool_t pg, svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svbrkb,_b,_z,)(pg, op); } @@ -39,7 +47,7 @@ svbool_t test_svbrkb_b_z(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.brkb.nxv16i1( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbrkb_b_m(svbool_t inactive, svbool_t pg, svbool_t op) +svbool_t test_svbrkb_b_m(svbool_t inactive, svbool_t pg, svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svbrkb,_b,_m,)(inactive, pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkn.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkn.c index 75fb8bf38eab207..f8d32d15d8f1ed2 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkn.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkn.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.brkn.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbrkn_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svbrkn_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbrkn,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpa.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpa.c index d48a63f27499100..6dcb5c699af2c39 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpa.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpa.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.brkpa.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbrkpa_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svbrkpa_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbrkpa,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpb.c index bbe7963555d8030..232b2aed5fcc333 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_brkpb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.brkpb.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svbrkpb_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svbrkpb_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svbrkpb,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cadd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cadd.c index 35da7a47bab82e6..b588816a63ffc5c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cadd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cadd.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svcadd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svcadd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f16,_z,)(pg, op1, op2, 90); } @@ -47,7 +55,7 @@ svfloat16_t test_svcadd_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], i32 270) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svcadd_f16_z_1(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svcadd_f16_z_1(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f16,_z,)(pg, op1, op2, 270); } @@ -66,7 +74,7 @@ svfloat16_t test_svcadd_f16_z_1(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svcadd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svcadd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f32,_z,)(pg, op1, op2, 90); } @@ -85,7 +93,7 @@ svfloat32_t test_svcadd_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svcadd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svcadd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f64,_z,)(pg, op1, op2, 90); } @@ -102,7 +110,7 @@ svfloat64_t test_svcadd_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcadd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svcadd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f16,_m,)(pg, op1, op2, 90); } @@ -119,7 +127,7 @@ svfloat16_t test_svcadd_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcadd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svcadd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f32,_m,)(pg, op1, op2, 90); } @@ -136,7 +144,7 @@ svfloat32_t test_svcadd_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcadd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svcadd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f64,_m,)(pg, op1, op2, 90); } @@ -153,7 +161,7 @@ svfloat64_t test_svcadd_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcadd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svcadd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f16,_x,)(pg, op1, op2, 90); } @@ -170,7 +178,7 @@ svfloat16_t test_svcadd_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcadd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svcadd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f32,_x,)(pg, op1, op2, 90); } @@ -187,7 +195,7 @@ svfloat32_t test_svcadd_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcadd.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcadd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svcadd_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcadd,_f64,_x,)(pg, op1, op2, 90); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta-bfloat.c index 66478f8bd002752..51f035906b21e88 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv8bf16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svclasta_bf16(svbool_t pg, svbfloat16_t fallback, svbfloat16_t data) { +svbfloat16_t test_svclasta_bf16(svbool_t pg, svbfloat16_t fallback, svbfloat16_t data) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svclasta_bf16'}} return SVE_ACLE_FUNC(svclasta, _bf16, , )(pg, fallback, data); } @@ -44,7 +52,7 @@ svbfloat16_t test_svclasta_bf16(svbool_t pg, svbfloat16_t fallback, svbfloat16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call bfloat @llvm.aarch64.sve.clasta.n.nxv8bf16( [[TMP0]], bfloat [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret bfloat [[TMP1]] // -bfloat16_t test_svclasta_n_bf16(svbool_t pg, bfloat16_t fallback, svbfloat16_t data) { +bfloat16_t test_svclasta_n_bf16(svbool_t pg, bfloat16_t fallback, svbfloat16_t data) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svclasta_n_bf16'}} return SVE_ACLE_FUNC(svclasta, _n_bf16, , )(pg, fallback, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta.c index 2c53197a37a180d..4712d57be729b62 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clasta.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv16i8( [[PG:%.*]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svclasta_s8(svbool_t pg, svint8_t fallback, svint8_t data) +svint8_t test_svclasta_s8(svbool_t pg, svint8_t fallback, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_s8,,)(pg, fallback, data); } @@ -41,7 +49,7 @@ svint8_t test_svclasta_s8(svbool_t pg, svint8_t fallback, svint8_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv8i16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svclasta_s16(svbool_t pg, svint16_t fallback, svint16_t data) +svint16_t test_svclasta_s16(svbool_t pg, svint16_t fallback, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_s16,,)(pg, fallback, data); } @@ -58,7 +66,7 @@ svint16_t test_svclasta_s16(svbool_t pg, svint16_t fallback, svint16_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv4i32( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svclasta_s32(svbool_t pg, svint32_t fallback, svint32_t data) +svint32_t test_svclasta_s32(svbool_t pg, svint32_t fallback, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_s32,,)(pg, fallback, data); } @@ -75,7 +83,7 @@ svint32_t test_svclasta_s32(svbool_t pg, svint32_t fallback, svint32_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv2i64( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svclasta_s64(svbool_t pg, svint64_t fallback, svint64_t data) +svint64_t test_svclasta_s64(svbool_t pg, svint64_t fallback, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_s64,,)(pg, fallback, data); } @@ -90,7 +98,7 @@ svint64_t test_svclasta_s64(svbool_t pg, svint64_t fallback, svint64_t data) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv16i8( [[PG:%.*]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclasta_u8(svbool_t pg, svuint8_t fallback, svuint8_t data) +svuint8_t test_svclasta_u8(svbool_t pg, svuint8_t fallback, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_u8,,)(pg, fallback, data); } @@ -107,7 +115,7 @@ svuint8_t test_svclasta_u8(svbool_t pg, svuint8_t fallback, svuint8_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv8i16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclasta_u16(svbool_t pg, svuint16_t fallback, svuint16_t data) +svuint16_t test_svclasta_u16(svbool_t pg, svuint16_t fallback, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_u16,,)(pg, fallback, data); } @@ -124,7 +132,7 @@ svuint16_t test_svclasta_u16(svbool_t pg, svuint16_t fallback, svuint16_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv4i32( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclasta_u32(svbool_t pg, svuint32_t fallback, svuint32_t data) +svuint32_t test_svclasta_u32(svbool_t pg, svuint32_t fallback, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_u32,,)(pg, fallback, data); } @@ -141,7 +149,7 @@ svuint32_t test_svclasta_u32(svbool_t pg, svuint32_t fallback, svuint32_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv2i64( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclasta_u64(svbool_t pg, svuint64_t fallback, svuint64_t data) +svuint64_t test_svclasta_u64(svbool_t pg, svuint64_t fallback, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_u64,,)(pg, fallback, data); } @@ -158,7 +166,7 @@ svuint64_t test_svclasta_u64(svbool_t pg, svuint64_t fallback, svuint64_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv8f16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svclasta_f16(svbool_t pg, svfloat16_t fallback, svfloat16_t data) +svfloat16_t test_svclasta_f16(svbool_t pg, svfloat16_t fallback, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_f16,,)(pg, fallback, data); } @@ -175,7 +183,7 @@ svfloat16_t test_svclasta_f16(svbool_t pg, svfloat16_t fallback, svfloat16_t dat // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv4f32( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svclasta_f32(svbool_t pg, svfloat32_t fallback, svfloat32_t data) +svfloat32_t test_svclasta_f32(svbool_t pg, svfloat32_t fallback, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_f32,,)(pg, fallback, data); } @@ -192,7 +200,7 @@ svfloat32_t test_svclasta_f32(svbool_t pg, svfloat32_t fallback, svfloat32_t dat // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clasta.nxv2f64( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svclasta_f64(svbool_t pg, svfloat64_t fallback, svfloat64_t data) +svfloat64_t test_svclasta_f64(svbool_t pg, svfloat64_t fallback, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_f64,,)(pg, fallback, data); } @@ -207,7 +215,7 @@ svfloat64_t test_svclasta_f64(svbool_t pg, svfloat64_t fallback, svfloat64_t dat // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.clasta.n.nxv16i8( [[PG:%.*]], i8 [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svclasta_n_s8(svbool_t pg, int8_t fallback, svint8_t data) +int8_t test_svclasta_n_s8(svbool_t pg, int8_t fallback, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_s8,,)(pg, fallback, data); } @@ -230,7 +238,7 @@ int8_t test_svclasta_n_s8(svbool_t pg, int8_t fallback, svint8_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast half [[TMP3]] to i16 // CPP-CHECK-NEXT: ret i16 [[TMP4]] // -int16_t test_svclasta_n_s16(svbool_t pg, int16_t fallback, svint16_t data) +int16_t test_svclasta_n_s16(svbool_t pg, int16_t fallback, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_s16,,)(pg, fallback, data); } @@ -253,7 +261,7 @@ int16_t test_svclasta_n_s16(svbool_t pg, int16_t fallback, svint16_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast float [[TMP3]] to i32 // CPP-CHECK-NEXT: ret i32 [[TMP4]] // -int32_t test_svclasta_n_s32(svbool_t pg, int32_t fallback, svint32_t data) +int32_t test_svclasta_n_s32(svbool_t pg, int32_t fallback, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_s32,,)(pg, fallback, data); } @@ -276,7 +284,7 @@ int32_t test_svclasta_n_s32(svbool_t pg, int32_t fallback, svint32_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast double [[TMP3]] to i64 // CPP-CHECK-NEXT: ret i64 [[TMP4]] // -int64_t test_svclasta_n_s64(svbool_t pg, int64_t fallback, svint64_t data) +int64_t test_svclasta_n_s64(svbool_t pg, int64_t fallback, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_s64,,)(pg, fallback, data); } @@ -291,7 +299,7 @@ int64_t test_svclasta_n_s64(svbool_t pg, int64_t fallback, svint64_t data) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.clasta.n.nxv16i8( [[PG:%.*]], i8 [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svclasta_n_u8(svbool_t pg, uint8_t fallback, svuint8_t data) +uint8_t test_svclasta_n_u8(svbool_t pg, uint8_t fallback, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_u8,,)(pg, fallback, data); } @@ -314,7 +322,7 @@ uint8_t test_svclasta_n_u8(svbool_t pg, uint8_t fallback, svuint8_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast half [[TMP3]] to i16 // CPP-CHECK-NEXT: ret i16 [[TMP4]] // -uint16_t test_svclasta_n_u16(svbool_t pg, uint16_t fallback, svuint16_t data) +uint16_t test_svclasta_n_u16(svbool_t pg, uint16_t fallback, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_u16,,)(pg, fallback, data); } @@ -337,7 +345,7 @@ uint16_t test_svclasta_n_u16(svbool_t pg, uint16_t fallback, svuint16_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast float [[TMP3]] to i32 // CPP-CHECK-NEXT: ret i32 [[TMP4]] // -uint32_t test_svclasta_n_u32(svbool_t pg, uint32_t fallback, svuint32_t data) +uint32_t test_svclasta_n_u32(svbool_t pg, uint32_t fallback, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_u32,,)(pg, fallback, data); } @@ -360,7 +368,7 @@ uint32_t test_svclasta_n_u32(svbool_t pg, uint32_t fallback, svuint32_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast double [[TMP3]] to i64 // CPP-CHECK-NEXT: ret i64 [[TMP4]] // -uint64_t test_svclasta_n_u64(svbool_t pg, uint64_t fallback, svuint64_t data) +uint64_t test_svclasta_n_u64(svbool_t pg, uint64_t fallback, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_u64,,)(pg, fallback, data); } @@ -377,7 +385,7 @@ uint64_t test_svclasta_n_u64(svbool_t pg, uint64_t fallback, svuint64_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.clasta.n.nxv8f16( [[TMP0]], half [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svclasta_n_f16(svbool_t pg, float16_t fallback, svfloat16_t data) +float16_t test_svclasta_n_f16(svbool_t pg, float16_t fallback, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_f16,,)(pg, fallback, data); } @@ -394,7 +402,7 @@ float16_t test_svclasta_n_f16(svbool_t pg, float16_t fallback, svfloat16_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.clasta.n.nxv4f32( [[TMP0]], float [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svclasta_n_f32(svbool_t pg, float32_t fallback, svfloat32_t data) +float32_t test_svclasta_n_f32(svbool_t pg, float32_t fallback, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_f32,,)(pg, fallback, data); } @@ -411,7 +419,7 @@ float32_t test_svclasta_n_f32(svbool_t pg, float32_t fallback, svfloat32_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.clasta.n.nxv2f64( [[TMP0]], double [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svclasta_n_f64(svbool_t pg, float64_t fallback, svfloat64_t data) +float64_t test_svclasta_n_f64(svbool_t pg, float64_t fallback, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclasta,_n_f64,,)(pg, fallback, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb-bfloat.c index 5c78db73e6ccbea..2ee31baf476a056 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv8bf16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svclastb_bf16(svbool_t pg, svbfloat16_t fallback, svbfloat16_t data) { +svbfloat16_t test_svclastb_bf16(svbool_t pg, svbfloat16_t fallback, svbfloat16_t data) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svclastb_bf16'}} return SVE_ACLE_FUNC(svclastb, _bf16, , )(pg, fallback, data); } @@ -44,7 +52,7 @@ svbfloat16_t test_svclastb_bf16(svbool_t pg, svbfloat16_t fallback, svbfloat16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call bfloat @llvm.aarch64.sve.clastb.n.nxv8bf16( [[TMP0]], bfloat [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret bfloat [[TMP1]] // -bfloat16_t test_svclastb_n_bf16(svbool_t pg, bfloat16_t fallback, svbfloat16_t data) { +bfloat16_t test_svclastb_n_bf16(svbool_t pg, bfloat16_t fallback, svbfloat16_t data) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svclastb_n_bf16'}} return SVE_ACLE_FUNC(svclastb, _n_bf16, , )(pg, fallback, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb.c index 0d123f75e221819..caa5dd9381ab240 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clastb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv16i8( [[PG:%.*]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svclastb_s8(svbool_t pg, svint8_t fallback, svint8_t data) +svint8_t test_svclastb_s8(svbool_t pg, svint8_t fallback, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_s8,,)(pg, fallback, data); } @@ -41,7 +49,7 @@ svint8_t test_svclastb_s8(svbool_t pg, svint8_t fallback, svint8_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv8i16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svclastb_s16(svbool_t pg, svint16_t fallback, svint16_t data) +svint16_t test_svclastb_s16(svbool_t pg, svint16_t fallback, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_s16,,)(pg, fallback, data); } @@ -58,7 +66,7 @@ svint16_t test_svclastb_s16(svbool_t pg, svint16_t fallback, svint16_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv4i32( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svclastb_s32(svbool_t pg, svint32_t fallback, svint32_t data) +svint32_t test_svclastb_s32(svbool_t pg, svint32_t fallback, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_s32,,)(pg, fallback, data); } @@ -75,7 +83,7 @@ svint32_t test_svclastb_s32(svbool_t pg, svint32_t fallback, svint32_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv2i64( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svclastb_s64(svbool_t pg, svint64_t fallback, svint64_t data) +svint64_t test_svclastb_s64(svbool_t pg, svint64_t fallback, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_s64,,)(pg, fallback, data); } @@ -90,7 +98,7 @@ svint64_t test_svclastb_s64(svbool_t pg, svint64_t fallback, svint64_t data) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv16i8( [[PG:%.*]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclastb_u8(svbool_t pg, svuint8_t fallback, svuint8_t data) +svuint8_t test_svclastb_u8(svbool_t pg, svuint8_t fallback, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_u8,,)(pg, fallback, data); } @@ -107,7 +115,7 @@ svuint8_t test_svclastb_u8(svbool_t pg, svuint8_t fallback, svuint8_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv8i16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclastb_u16(svbool_t pg, svuint16_t fallback, svuint16_t data) +svuint16_t test_svclastb_u16(svbool_t pg, svuint16_t fallback, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_u16,,)(pg, fallback, data); } @@ -124,7 +132,7 @@ svuint16_t test_svclastb_u16(svbool_t pg, svuint16_t fallback, svuint16_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv4i32( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclastb_u32(svbool_t pg, svuint32_t fallback, svuint32_t data) +svuint32_t test_svclastb_u32(svbool_t pg, svuint32_t fallback, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_u32,,)(pg, fallback, data); } @@ -141,7 +149,7 @@ svuint32_t test_svclastb_u32(svbool_t pg, svuint32_t fallback, svuint32_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv2i64( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclastb_u64(svbool_t pg, svuint64_t fallback, svuint64_t data) +svuint64_t test_svclastb_u64(svbool_t pg, svuint64_t fallback, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_u64,,)(pg, fallback, data); } @@ -158,7 +166,7 @@ svuint64_t test_svclastb_u64(svbool_t pg, svuint64_t fallback, svuint64_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv8f16( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svclastb_f16(svbool_t pg, svfloat16_t fallback, svfloat16_t data) +svfloat16_t test_svclastb_f16(svbool_t pg, svfloat16_t fallback, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_f16,,)(pg, fallback, data); } @@ -175,7 +183,7 @@ svfloat16_t test_svclastb_f16(svbool_t pg, svfloat16_t fallback, svfloat16_t dat // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv4f32( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svclastb_f32(svbool_t pg, svfloat32_t fallback, svfloat32_t data) +svfloat32_t test_svclastb_f32(svbool_t pg, svfloat32_t fallback, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_f32,,)(pg, fallback, data); } @@ -192,7 +200,7 @@ svfloat32_t test_svclastb_f32(svbool_t pg, svfloat32_t fallback, svfloat32_t dat // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clastb.nxv2f64( [[TMP0]], [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svclastb_f64(svbool_t pg, svfloat64_t fallback, svfloat64_t data) +svfloat64_t test_svclastb_f64(svbool_t pg, svfloat64_t fallback, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_f64,,)(pg, fallback, data); } @@ -207,7 +215,7 @@ svfloat64_t test_svclastb_f64(svbool_t pg, svfloat64_t fallback, svfloat64_t dat // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.clastb.n.nxv16i8( [[PG:%.*]], i8 [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svclastb_n_s8(svbool_t pg, int8_t fallback, svint8_t data) +int8_t test_svclastb_n_s8(svbool_t pg, int8_t fallback, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_s8,,)(pg, fallback, data); } @@ -230,7 +238,7 @@ int8_t test_svclastb_n_s8(svbool_t pg, int8_t fallback, svint8_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast half [[TMP3]] to i16 // CPP-CHECK-NEXT: ret i16 [[TMP4]] // -int16_t test_svclastb_n_s16(svbool_t pg, int16_t fallback, svint16_t data) +int16_t test_svclastb_n_s16(svbool_t pg, int16_t fallback, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_s16,,)(pg, fallback, data); } @@ -253,7 +261,7 @@ int16_t test_svclastb_n_s16(svbool_t pg, int16_t fallback, svint16_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast float [[TMP3]] to i32 // CPP-CHECK-NEXT: ret i32 [[TMP4]] // -int32_t test_svclastb_n_s32(svbool_t pg, int32_t fallback, svint32_t data) +int32_t test_svclastb_n_s32(svbool_t pg, int32_t fallback, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_s32,,)(pg, fallback, data); } @@ -276,7 +284,7 @@ int32_t test_svclastb_n_s32(svbool_t pg, int32_t fallback, svint32_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast double [[TMP3]] to i64 // CPP-CHECK-NEXT: ret i64 [[TMP4]] // -int64_t test_svclastb_n_s64(svbool_t pg, int64_t fallback, svint64_t data) +int64_t test_svclastb_n_s64(svbool_t pg, int64_t fallback, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_s64,,)(pg, fallback, data); } @@ -291,7 +299,7 @@ int64_t test_svclastb_n_s64(svbool_t pg, int64_t fallback, svint64_t data) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.clastb.n.nxv16i8( [[PG:%.*]], i8 [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svclastb_n_u8(svbool_t pg, uint8_t fallback, svuint8_t data) +uint8_t test_svclastb_n_u8(svbool_t pg, uint8_t fallback, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_u8,,)(pg, fallback, data); } @@ -314,7 +322,7 @@ uint8_t test_svclastb_n_u8(svbool_t pg, uint8_t fallback, svuint8_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast half [[TMP3]] to i16 // CPP-CHECK-NEXT: ret i16 [[TMP4]] // -uint16_t test_svclastb_n_u16(svbool_t pg, uint16_t fallback, svuint16_t data) +uint16_t test_svclastb_n_u16(svbool_t pg, uint16_t fallback, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_u16,,)(pg, fallback, data); } @@ -337,7 +345,7 @@ uint16_t test_svclastb_n_u16(svbool_t pg, uint16_t fallback, svuint16_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast float [[TMP3]] to i32 // CPP-CHECK-NEXT: ret i32 [[TMP4]] // -uint32_t test_svclastb_n_u32(svbool_t pg, uint32_t fallback, svuint32_t data) +uint32_t test_svclastb_n_u32(svbool_t pg, uint32_t fallback, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_u32,,)(pg, fallback, data); } @@ -360,7 +368,7 @@ uint32_t test_svclastb_n_u32(svbool_t pg, uint32_t fallback, svuint32_t data) // CPP-CHECK-NEXT: [[TMP4:%.*]] = bitcast double [[TMP3]] to i64 // CPP-CHECK-NEXT: ret i64 [[TMP4]] // -uint64_t test_svclastb_n_u64(svbool_t pg, uint64_t fallback, svuint64_t data) +uint64_t test_svclastb_n_u64(svbool_t pg, uint64_t fallback, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_u64,,)(pg, fallback, data); } @@ -377,7 +385,7 @@ uint64_t test_svclastb_n_u64(svbool_t pg, uint64_t fallback, svuint64_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.clastb.n.nxv8f16( [[TMP0]], half [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svclastb_n_f16(svbool_t pg, float16_t fallback, svfloat16_t data) +float16_t test_svclastb_n_f16(svbool_t pg, float16_t fallback, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_f16,,)(pg, fallback, data); } @@ -394,7 +402,7 @@ float16_t test_svclastb_n_f16(svbool_t pg, float16_t fallback, svfloat16_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.clastb.n.nxv4f32( [[TMP0]], float [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svclastb_n_f32(svbool_t pg, float32_t fallback, svfloat32_t data) +float32_t test_svclastb_n_f32(svbool_t pg, float32_t fallback, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_f32,,)(pg, fallback, data); } @@ -411,7 +419,7 @@ float32_t test_svclastb_n_f32(svbool_t pg, float32_t fallback, svfloat32_t data) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.clastb.n.nxv2f64( [[TMP0]], double [[FALLBACK:%.*]], [[DATA:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svclastb_n_f64(svbool_t pg, float64_t fallback, svfloat64_t data) +float64_t test_svclastb_n_f64(svbool_t pg, float64_t fallback, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svclastb,_n_f64,,)(pg, fallback, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cls.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cls.c index 5936b976e0ac592..7546593cc1f24e9 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cls.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cls.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cls.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcls_s8_z(svbool_t pg, svint8_t op) +svuint8_t test_svcls_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svuint8_t test_svcls_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcls_s16_z(svbool_t pg, svint16_t op) +svuint16_t test_svcls_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svuint16_t test_svcls_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcls_s32_z(svbool_t pg, svint32_t op) +svuint32_t test_svcls_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svuint32_t test_svcls_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcls_s64_z(svbool_t pg, svint64_t op) +svuint64_t test_svcls_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svuint64_t test_svcls_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cls.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcls_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) +svuint8_t test_svcls_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s8,_m,)(inactive, pg, op); } @@ -107,7 +115,7 @@ svuint8_t test_svcls_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcls_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) +svuint16_t test_svcls_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s16,_m,)(inactive, pg, op); } @@ -124,7 +132,7 @@ svuint16_t test_svcls_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcls_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) +svuint32_t test_svcls_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s32,_m,)(inactive, pg, op); } @@ -141,7 +149,7 @@ svuint32_t test_svcls_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcls_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) +svuint64_t test_svcls_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s64,_m,)(inactive, pg, op); } @@ -156,7 +164,7 @@ svuint64_t test_svcls_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cls.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcls_s8_x(svbool_t pg, svint8_t op) +svuint8_t test_svcls_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s8,_x,)(pg, op); } @@ -173,7 +181,7 @@ svuint8_t test_svcls_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcls_s16_x(svbool_t pg, svint16_t op) +svuint16_t test_svcls_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s16,_x,)(pg, op); } @@ -190,7 +198,7 @@ svuint16_t test_svcls_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcls_s32_x(svbool_t pg, svint32_t op) +svuint32_t test_svcls_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s32,_x,)(pg, op); } @@ -207,7 +215,7 @@ svuint32_t test_svcls_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cls.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcls_s64_x(svbool_t pg, svint64_t op) +svuint64_t test_svcls_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcls,_s64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clz.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clz.c index 239e6ad5584bfeb..833d9ddc61bae3c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clz.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_clz.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clz.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclz_s8_z(svbool_t pg, svint8_t op) +svuint8_t test_svclz_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svuint8_t test_svclz_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclz_s16_z(svbool_t pg, svint16_t op) +svuint16_t test_svclz_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svuint16_t test_svclz_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclz_s32_z(svbool_t pg, svint32_t op) +svuint32_t test_svclz_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svuint32_t test_svclz_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclz_s64_z(svbool_t pg, svint64_t op) +svuint64_t test_svclz_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svuint64_t test_svclz_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clz.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclz_u8_z(svbool_t pg, svuint8_t op) +svuint8_t test_svclz_u8_z(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u8,_z,)(pg, op); } @@ -107,7 +115,7 @@ svuint8_t test_svclz_u8_z(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclz_u16_z(svbool_t pg, svuint16_t op) +svuint16_t test_svclz_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u16,_z,)(pg, op); } @@ -124,7 +132,7 @@ svuint16_t test_svclz_u16_z(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclz_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svclz_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u32,_z,)(pg, op); } @@ -141,7 +149,7 @@ svuint32_t test_svclz_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclz_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svclz_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u64,_z,)(pg, op); } @@ -156,7 +164,7 @@ svuint64_t test_svclz_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clz.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclz_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) +svuint8_t test_svclz_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s8,_m,)(inactive, pg, op); } @@ -173,7 +181,7 @@ svuint8_t test_svclz_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclz_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) +svuint16_t test_svclz_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s16,_m,)(inactive, pg, op); } @@ -190,7 +198,7 @@ svuint16_t test_svclz_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclz_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) +svuint32_t test_svclz_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s32,_m,)(inactive, pg, op); } @@ -207,7 +215,7 @@ svuint32_t test_svclz_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclz_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) +svuint64_t test_svclz_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s64,_m,)(inactive, pg, op); } @@ -222,7 +230,7 @@ svuint64_t test_svclz_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clz.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclz_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) +svuint8_t test_svclz_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u8,_m,)(inactive, pg, op); } @@ -239,7 +247,7 @@ svuint8_t test_svclz_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclz_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) +svuint16_t test_svclz_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u16,_m,)(inactive, pg, op); } @@ -256,7 +264,7 @@ svuint16_t test_svclz_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclz_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svclz_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u32,_m,)(inactive, pg, op); } @@ -273,7 +281,7 @@ svuint32_t test_svclz_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclz_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svclz_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u64,_m,)(inactive, pg, op); } @@ -288,7 +296,7 @@ svuint64_t test_svclz_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clz.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclz_s8_x(svbool_t pg, svint8_t op) +svuint8_t test_svclz_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s8,_x,)(pg, op); } @@ -305,7 +313,7 @@ svuint8_t test_svclz_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclz_s16_x(svbool_t pg, svint16_t op) +svuint16_t test_svclz_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s16,_x,)(pg, op); } @@ -322,7 +330,7 @@ svuint16_t test_svclz_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclz_s32_x(svbool_t pg, svint32_t op) +svuint32_t test_svclz_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s32,_x,)(pg, op); } @@ -339,7 +347,7 @@ svuint32_t test_svclz_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclz_s64_x(svbool_t pg, svint64_t op) +svuint64_t test_svclz_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_s64,_x,)(pg, op); } @@ -354,7 +362,7 @@ svuint64_t test_svclz_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.clz.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svclz_u8_x(svbool_t pg, svuint8_t op) +svuint8_t test_svclz_u8_x(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u8,_x,)(pg, op); } @@ -371,7 +379,7 @@ svuint8_t test_svclz_u8_x(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svclz_u16_x(svbool_t pg, svuint16_t op) +svuint16_t test_svclz_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u16,_x,)(pg, op); } @@ -388,7 +396,7 @@ svuint16_t test_svclz_u16_x(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svclz_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svclz_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u32,_x,)(pg, op); } @@ -405,7 +413,7 @@ svuint32_t test_svclz_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.clz.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svclz_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svclz_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svclz,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmla.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmla.c index 4dc2c79cdb89be9..fc61b6f8ff9f8d8 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmla.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmla.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svcmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f16,_z,)(pg, op1, op2, op3, 0); } @@ -47,7 +55,7 @@ svfloat16_t test_svcmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svcmla_f16_z_1(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_f16_z_1(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f16,_z,)(pg, op1, op2, op3, 90); } @@ -66,7 +74,7 @@ svfloat16_t test_svcmla_f16_z_1(svbool_t pg, svfloat16_t op1, svfloat16_t op2, s // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]], i32 180) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svcmla_f16_z_2(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_f16_z_2(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f16,_z,)(pg, op1, op2, op3, 180); } @@ -85,7 +93,7 @@ svfloat16_t test_svcmla_f16_z_2(svbool_t pg, svfloat16_t op1, svfloat16_t op2, s // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]], i32 270) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svcmla_f16_z_3(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_f16_z_3(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f16,_z,)(pg, op1, op2, op3, 270); } @@ -104,7 +112,7 @@ svfloat16_t test_svcmla_f16_z_3(svbool_t pg, svfloat16_t op1, svfloat16_t op2, s // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svcmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svcmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f32,_z,)(pg, op1, op2, op3, 0); } @@ -123,7 +131,7 @@ svfloat32_t test_svcmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svcmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svcmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f64,_z,)(pg, op1, op2, op3, 90); } @@ -140,7 +148,7 @@ svfloat64_t test_svcmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 180) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f16,_m,)(pg, op1, op2, op3, 180); } @@ -157,7 +165,7 @@ svfloat16_t test_svcmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 270) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svcmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f32,_m,)(pg, op1, op2, op3, 270); } @@ -174,7 +182,7 @@ svfloat32_t test_svcmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svcmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f64,_m,)(pg, op1, op2, op3, 0); } @@ -191,7 +199,7 @@ svfloat64_t test_svcmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 90) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f16,_x,)(pg, op1, op2, op3, 90); } @@ -208,7 +216,7 @@ svfloat16_t test_svcmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 180) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svcmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f32,_x,)(pg, op1, op2, op3, 180); } @@ -225,7 +233,7 @@ svfloat32_t test_svcmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcmla.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 270) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svcmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla,_f64,_x,)(pg, op1, op2, op3, 270); } @@ -240,7 +248,7 @@ svfloat64_t test_svcmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fcmla.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0, i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svcmla_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla_lane,_f16,,)(op1, op2, op3, 0, 0); } @@ -255,7 +263,7 @@ svfloat16_t test_svcmla_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t o // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fcmla.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 3, i32 90) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svcmla_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svcmla_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla_lane,_f16,,)(op1, op2, op3, 3, 90); } @@ -270,7 +278,7 @@ svfloat16_t test_svcmla_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fcmla.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0, i32 180) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svcmla_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svcmla_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla_lane,_f32,,)(op1, op2, op3, 0, 180); } @@ -285,7 +293,7 @@ svfloat32_t test_svcmla_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t o // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fcmla.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 1, i32 270) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svcmla_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svcmla_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svcmla_lane,_f32,,)(op1, op2, op3, 1, 270); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpeq.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpeq.c index fa80e58a9e375ef..ee96d2b8fbc6563 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpeq.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpeq.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpeq.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpeq_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svbool_t test_svcmpeq_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_s8,,)(pg, op1, op2); } @@ -43,7 +51,7 @@ svbool_t test_svcmpeq_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svbool_t test_svcmpeq_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_s16,,)(pg, op1, op2); } @@ -62,7 +70,7 @@ svbool_t test_svcmpeq_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svbool_t test_svcmpeq_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_s32,,)(pg, op1, op2); } @@ -81,7 +89,7 @@ svbool_t test_svcmpeq_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svbool_t test_svcmpeq_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_s64,,)(pg, op1, op2); } @@ -96,7 +104,7 @@ svbool_t test_svcmpeq_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpeq.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpeq_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svbool_t test_svcmpeq_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_u8,,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svbool_t test_svcmpeq_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svbool_t test_svcmpeq_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_u16,,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svbool_t test_svcmpeq_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svbool_t test_svcmpeq_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_u32,,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svbool_t test_svcmpeq_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svbool_t test_svcmpeq_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_u64,,)(pg, op1, op2); } @@ -176,7 +184,7 @@ svbool_t test_svcmpeq_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_s64(svbool_t pg, svint64_t op1, int64_t op2) +svbool_t test_svcmpeq_n_s64(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_s64,,)(pg, op1, op2); } @@ -199,7 +207,7 @@ svbool_t test_svcmpeq_n_s64(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) +svbool_t test_svcmpeq_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_u64,,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svbool_t test_svcmpeq_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpeq.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpeq_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) +svbool_t test_svcmpeq_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq_wide,_s8,,)(pg, op1, op2); } @@ -233,7 +241,7 @@ svbool_t test_svcmpeq_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) +svbool_t test_svcmpeq_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq_wide,_s16,,)(pg, op1, op2); } @@ -252,7 +260,7 @@ svbool_t test_svcmpeq_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) +svbool_t test_svcmpeq_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq_wide,_s32,,)(pg, op1, op2); } @@ -271,7 +279,7 @@ svbool_t test_svcmpeq_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpeq.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpeq_n_s8(svbool_t pg, svint8_t op1, int8_t op2) +svbool_t test_svcmpeq_n_s8(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_s8,,)(pg, op1, op2); } @@ -294,7 +302,7 @@ svbool_t test_svcmpeq_n_s8(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_s16(svbool_t pg, svint16_t op1, int16_t op2) +svbool_t test_svcmpeq_n_s16(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_s16,,)(pg, op1, op2); } @@ -317,7 +325,7 @@ svbool_t test_svcmpeq_n_s16(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_s32(svbool_t pg, svint32_t op1, int32_t op2) +svbool_t test_svcmpeq_n_s32(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_s32,,)(pg, op1, op2); } @@ -336,7 +344,7 @@ svbool_t test_svcmpeq_n_s32(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpeq.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpeq_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) +svbool_t test_svcmpeq_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_u8,,)(pg, op1, op2); } @@ -359,7 +367,7 @@ svbool_t test_svcmpeq_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) +svbool_t test_svcmpeq_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_u16,,)(pg, op1, op2); } @@ -382,7 +390,7 @@ svbool_t test_svcmpeq_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) +svbool_t test_svcmpeq_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_u32,,)(pg, op1, op2); } @@ -401,7 +409,7 @@ svbool_t test_svcmpeq_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svcmpeq_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_f16,,)(pg, op1, op2); } @@ -420,7 +428,7 @@ svbool_t test_svcmpeq_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svcmpeq_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_f32,,)(pg, op1, op2); } @@ -439,7 +447,7 @@ svbool_t test_svcmpeq_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svcmpeq_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_f64,,)(pg, op1, op2); } @@ -462,7 +470,7 @@ svbool_t test_svcmpeq_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) +svbool_t test_svcmpeq_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_f16,,)(pg, op1, op2); } @@ -485,7 +493,7 @@ svbool_t test_svcmpeq_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svcmpeq_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_f32,,)(pg, op1, op2); } @@ -508,7 +516,7 @@ svbool_t test_svcmpeq_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svcmpeq_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq,_n_f64,,)(pg, op1, op2); } @@ -527,7 +535,7 @@ svbool_t test_svcmpeq_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpeq.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpeq_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) +svbool_t test_svcmpeq_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq_wide,_n_s8,,)(pg, op1, op2); } @@ -550,7 +558,7 @@ svbool_t test_svcmpeq_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) +svbool_t test_svcmpeq_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq_wide,_n_s16,,)(pg, op1, op2); } @@ -573,7 +581,7 @@ svbool_t test_svcmpeq_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpeq_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) +svbool_t test_svcmpeq_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpeq_wide,_n_s32,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpge.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpge.c index 478fb34f8cebf7f..92d28e064a6d1b7 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpge.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpge.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpge.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svbool_t test_svcmpge_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_s8,,)(pg, op1, op2); } @@ -43,7 +51,7 @@ svbool_t test_svcmpge_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svbool_t test_svcmpge_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_s16,,)(pg, op1, op2); } @@ -62,7 +70,7 @@ svbool_t test_svcmpge_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svbool_t test_svcmpge_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_s32,,)(pg, op1, op2); } @@ -81,7 +89,7 @@ svbool_t test_svcmpge_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svbool_t test_svcmpge_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_s64,,)(pg, op1, op2); } @@ -96,7 +104,7 @@ svbool_t test_svcmpge_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphs.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svbool_t test_svcmpge_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_u8,,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svbool_t test_svcmpge_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svbool_t test_svcmpge_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_u16,,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svbool_t test_svcmpge_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svbool_t test_svcmpge_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_u32,,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svbool_t test_svcmpge_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svbool_t test_svcmpge_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_u64,,)(pg, op1, op2); } @@ -176,7 +184,7 @@ svbool_t test_svcmpge_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_s64(svbool_t pg, svint64_t op1, int64_t op2) +svbool_t test_svcmpge_n_s64(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_s64,,)(pg, op1, op2); } @@ -199,7 +207,7 @@ svbool_t test_svcmpge_n_s64(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) +svbool_t test_svcmpge_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_u64,,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svbool_t test_svcmpge_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpge.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) +svbool_t test_svcmpge_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_s8,,)(pg, op1, op2); } @@ -233,7 +241,7 @@ svbool_t test_svcmpge_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) +svbool_t test_svcmpge_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_s16,,)(pg, op1, op2); } @@ -252,7 +260,7 @@ svbool_t test_svcmpge_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) +svbool_t test_svcmpge_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_s32,,)(pg, op1, op2); } @@ -267,7 +275,7 @@ svbool_t test_svcmpge_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphs.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) +svbool_t test_svcmpge_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_u8,,)(pg, op1, op2); } @@ -286,7 +294,7 @@ svbool_t test_svcmpge_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) +svbool_t test_svcmpge_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_u16,,)(pg, op1, op2); } @@ -305,7 +313,7 @@ svbool_t test_svcmpge_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) +svbool_t test_svcmpge_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_u32,,)(pg, op1, op2); } @@ -324,7 +332,7 @@ svbool_t test_svcmpge_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpge.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_n_s8(svbool_t pg, svint8_t op1, int8_t op2) +svbool_t test_svcmpge_n_s8(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_s8,,)(pg, op1, op2); } @@ -347,7 +355,7 @@ svbool_t test_svcmpge_n_s8(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_s16(svbool_t pg, svint16_t op1, int16_t op2) +svbool_t test_svcmpge_n_s16(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_s16,,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svbool_t test_svcmpge_n_s16(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_s32(svbool_t pg, svint32_t op1, int32_t op2) +svbool_t test_svcmpge_n_s32(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_s32,,)(pg, op1, op2); } @@ -389,7 +397,7 @@ svbool_t test_svcmpge_n_s32(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphs.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) +svbool_t test_svcmpge_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_u8,,)(pg, op1, op2); } @@ -412,7 +420,7 @@ svbool_t test_svcmpge_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) +svbool_t test_svcmpge_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_u16,,)(pg, op1, op2); } @@ -435,7 +443,7 @@ svbool_t test_svcmpge_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) +svbool_t test_svcmpge_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_u32,,)(pg, op1, op2); } @@ -454,7 +462,7 @@ svbool_t test_svcmpge_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svcmpge_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_f16,,)(pg, op1, op2); } @@ -473,7 +481,7 @@ svbool_t test_svcmpge_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svcmpge_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_f32,,)(pg, op1, op2); } @@ -492,7 +500,7 @@ svbool_t test_svcmpge_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svcmpge_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_f64,,)(pg, op1, op2); } @@ -515,7 +523,7 @@ svbool_t test_svcmpge_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) +svbool_t test_svcmpge_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_f16,,)(pg, op1, op2); } @@ -538,7 +546,7 @@ svbool_t test_svcmpge_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svcmpge_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_f32,,)(pg, op1, op2); } @@ -561,7 +569,7 @@ svbool_t test_svcmpge_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svcmpge_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge,_n_f64,,)(pg, op1, op2); } @@ -580,7 +588,7 @@ svbool_t test_svcmpge_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpge.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) +svbool_t test_svcmpge_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_n_s8,,)(pg, op1, op2); } @@ -603,7 +611,7 @@ svbool_t test_svcmpge_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) +svbool_t test_svcmpge_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_n_s16,,)(pg, op1, op2); } @@ -626,7 +634,7 @@ svbool_t test_svcmpge_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) +svbool_t test_svcmpge_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_n_s32,,)(pg, op1, op2); } @@ -645,7 +653,7 @@ svbool_t test_svcmpge_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphs.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpge_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) +svbool_t test_svcmpge_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_n_u8,,)(pg, op1, op2); } @@ -668,7 +676,7 @@ svbool_t test_svcmpge_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) +svbool_t test_svcmpge_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_n_u16,,)(pg, op1, op2); } @@ -691,7 +699,7 @@ svbool_t test_svcmpge_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpge_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) +svbool_t test_svcmpge_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpge_wide,_n_u32,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpgt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpgt.c index 8721acdfd3fda9c..8c0c61c32e85c61 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpgt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpgt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpgt.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svbool_t test_svcmpgt_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_s8,,)(pg, op1, op2); } @@ -43,7 +51,7 @@ svbool_t test_svcmpgt_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svbool_t test_svcmpgt_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_s16,,)(pg, op1, op2); } @@ -62,7 +70,7 @@ svbool_t test_svcmpgt_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svbool_t test_svcmpgt_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_s32,,)(pg, op1, op2); } @@ -81,7 +89,7 @@ svbool_t test_svcmpgt_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svbool_t test_svcmpgt_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_s64,,)(pg, op1, op2); } @@ -96,7 +104,7 @@ svbool_t test_svcmpgt_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphi.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svbool_t test_svcmpgt_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_u8,,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svbool_t test_svcmpgt_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svbool_t test_svcmpgt_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_u16,,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svbool_t test_svcmpgt_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svbool_t test_svcmpgt_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_u32,,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svbool_t test_svcmpgt_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svbool_t test_svcmpgt_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_u64,,)(pg, op1, op2); } @@ -176,7 +184,7 @@ svbool_t test_svcmpgt_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_s64(svbool_t pg, svint64_t op1, int64_t op2) +svbool_t test_svcmpgt_n_s64(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_s64,,)(pg, op1, op2); } @@ -199,7 +207,7 @@ svbool_t test_svcmpgt_n_s64(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) +svbool_t test_svcmpgt_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_u64,,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svbool_t test_svcmpgt_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpgt.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) +svbool_t test_svcmpgt_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_s8,,)(pg, op1, op2); } @@ -233,7 +241,7 @@ svbool_t test_svcmpgt_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) +svbool_t test_svcmpgt_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_s16,,)(pg, op1, op2); } @@ -252,7 +260,7 @@ svbool_t test_svcmpgt_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) +svbool_t test_svcmpgt_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_s32,,)(pg, op1, op2); } @@ -267,7 +275,7 @@ svbool_t test_svcmpgt_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphi.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) +svbool_t test_svcmpgt_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_u8,,)(pg, op1, op2); } @@ -286,7 +294,7 @@ svbool_t test_svcmpgt_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) +svbool_t test_svcmpgt_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_u16,,)(pg, op1, op2); } @@ -305,7 +313,7 @@ svbool_t test_svcmpgt_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) +svbool_t test_svcmpgt_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_u32,,)(pg, op1, op2); } @@ -324,7 +332,7 @@ svbool_t test_svcmpgt_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpgt.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_n_s8(svbool_t pg, svint8_t op1, int8_t op2) +svbool_t test_svcmpgt_n_s8(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_s8,,)(pg, op1, op2); } @@ -347,7 +355,7 @@ svbool_t test_svcmpgt_n_s8(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_s16(svbool_t pg, svint16_t op1, int16_t op2) +svbool_t test_svcmpgt_n_s16(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_s16,,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svbool_t test_svcmpgt_n_s16(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_s32(svbool_t pg, svint32_t op1, int32_t op2) +svbool_t test_svcmpgt_n_s32(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_s32,,)(pg, op1, op2); } @@ -389,7 +397,7 @@ svbool_t test_svcmpgt_n_s32(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphi.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) +svbool_t test_svcmpgt_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_u8,,)(pg, op1, op2); } @@ -412,7 +420,7 @@ svbool_t test_svcmpgt_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) +svbool_t test_svcmpgt_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_u16,,)(pg, op1, op2); } @@ -435,7 +443,7 @@ svbool_t test_svcmpgt_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) +svbool_t test_svcmpgt_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_u32,,)(pg, op1, op2); } @@ -454,7 +462,7 @@ svbool_t test_svcmpgt_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svcmpgt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_f16,,)(pg, op1, op2); } @@ -473,7 +481,7 @@ svbool_t test_svcmpgt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svcmpgt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_f32,,)(pg, op1, op2); } @@ -492,7 +500,7 @@ svbool_t test_svcmpgt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svcmpgt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_f64,,)(pg, op1, op2); } @@ -515,7 +523,7 @@ svbool_t test_svcmpgt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) +svbool_t test_svcmpgt_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_f16,,)(pg, op1, op2); } @@ -538,7 +546,7 @@ svbool_t test_svcmpgt_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svcmpgt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_f32,,)(pg, op1, op2); } @@ -561,7 +569,7 @@ svbool_t test_svcmpgt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svcmpgt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt,_n_f64,,)(pg, op1, op2); } @@ -580,7 +588,7 @@ svbool_t test_svcmpgt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpgt.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) +svbool_t test_svcmpgt_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_n_s8,,)(pg, op1, op2); } @@ -603,7 +611,7 @@ svbool_t test_svcmpgt_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) +svbool_t test_svcmpgt_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_n_s16,,)(pg, op1, op2); } @@ -626,7 +634,7 @@ svbool_t test_svcmpgt_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) +svbool_t test_svcmpgt_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_n_s32,,)(pg, op1, op2); } @@ -645,7 +653,7 @@ svbool_t test_svcmpgt_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphi.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpgt_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) +svbool_t test_svcmpgt_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_n_u8,,)(pg, op1, op2); } @@ -668,7 +676,7 @@ svbool_t test_svcmpgt_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) +svbool_t test_svcmpgt_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_n_u16,,)(pg, op1, op2); } @@ -691,7 +699,7 @@ svbool_t test_svcmpgt_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpgt_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) +svbool_t test_svcmpgt_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpgt_wide,_n_u32,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmple.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmple.c index 688ea57cc732305..b982ed16d213a92 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmple.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmple.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpge.nxv16i8( [[PG:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svbool_t test_svcmple_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_s8,,)(pg, op1, op2); } @@ -43,7 +51,7 @@ svbool_t test_svcmple_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svbool_t test_svcmple_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_s16,,)(pg, op1, op2); } @@ -62,7 +70,7 @@ svbool_t test_svcmple_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svbool_t test_svcmple_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_s32,,)(pg, op1, op2); } @@ -81,7 +89,7 @@ svbool_t test_svcmple_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svbool_t test_svcmple_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_s64,,)(pg, op1, op2); } @@ -96,7 +104,7 @@ svbool_t test_svcmple_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphs.nxv16i8( [[PG:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svbool_t test_svcmple_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_u8,,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svbool_t test_svcmple_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svbool_t test_svcmple_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_u16,,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svbool_t test_svcmple_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svbool_t test_svcmple_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_u32,,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svbool_t test_svcmple_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svbool_t test_svcmple_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_u64,,)(pg, op1, op2); } @@ -176,7 +184,7 @@ svbool_t test_svcmple_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_s64(svbool_t pg, svint64_t op1, int64_t op2) +svbool_t test_svcmple_n_s64(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_s64,,)(pg, op1, op2); } @@ -199,7 +207,7 @@ svbool_t test_svcmple_n_s64(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) +svbool_t test_svcmple_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_u64,,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svbool_t test_svcmple_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmple.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) +svbool_t test_svcmple_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_s8,,)(pg, op1, op2); } @@ -233,7 +241,7 @@ svbool_t test_svcmple_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) +svbool_t test_svcmple_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_s16,,)(pg, op1, op2); } @@ -252,7 +260,7 @@ svbool_t test_svcmple_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) +svbool_t test_svcmple_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_s32,,)(pg, op1, op2); } @@ -267,7 +275,7 @@ svbool_t test_svcmple_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpls.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) +svbool_t test_svcmple_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_u8,,)(pg, op1, op2); } @@ -286,7 +294,7 @@ svbool_t test_svcmple_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) +svbool_t test_svcmple_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_u16,,)(pg, op1, op2); } @@ -305,7 +313,7 @@ svbool_t test_svcmple_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) +svbool_t test_svcmple_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_u32,,)(pg, op1, op2); } @@ -324,7 +332,7 @@ svbool_t test_svcmple_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpge.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_n_s8(svbool_t pg, svint8_t op1, int8_t op2) +svbool_t test_svcmple_n_s8(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_s8,,)(pg, op1, op2); } @@ -347,7 +355,7 @@ svbool_t test_svcmple_n_s8(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_s16(svbool_t pg, svint16_t op1, int16_t op2) +svbool_t test_svcmple_n_s16(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_s16,,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svbool_t test_svcmple_n_s16(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_s32(svbool_t pg, svint32_t op1, int32_t op2) +svbool_t test_svcmple_n_s32(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_s32,,)(pg, op1, op2); } @@ -389,7 +397,7 @@ svbool_t test_svcmple_n_s32(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphs.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) +svbool_t test_svcmple_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_u8,,)(pg, op1, op2); } @@ -412,7 +420,7 @@ svbool_t test_svcmple_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) +svbool_t test_svcmple_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_u16,,)(pg, op1, op2); } @@ -435,7 +443,7 @@ svbool_t test_svcmple_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) +svbool_t test_svcmple_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_u32,,)(pg, op1, op2); } @@ -454,7 +462,7 @@ svbool_t test_svcmple_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svcmple_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_f16,,)(pg, op1, op2); } @@ -473,7 +481,7 @@ svbool_t test_svcmple_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svcmple_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_f32,,)(pg, op1, op2); } @@ -492,7 +500,7 @@ svbool_t test_svcmple_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svcmple_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_f64,,)(pg, op1, op2); } @@ -515,7 +523,7 @@ svbool_t test_svcmple_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) +svbool_t test_svcmple_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_f16,,)(pg, op1, op2); } @@ -538,7 +546,7 @@ svbool_t test_svcmple_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svcmple_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_f32,,)(pg, op1, op2); } @@ -561,7 +569,7 @@ svbool_t test_svcmple_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svcmple_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple,_n_f64,,)(pg, op1, op2); } @@ -580,7 +588,7 @@ svbool_t test_svcmple_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmple.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) +svbool_t test_svcmple_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_n_s8,,)(pg, op1, op2); } @@ -603,7 +611,7 @@ svbool_t test_svcmple_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) +svbool_t test_svcmple_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_n_s16,,)(pg, op1, op2); } @@ -626,7 +634,7 @@ svbool_t test_svcmple_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) +svbool_t test_svcmple_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_n_s32,,)(pg, op1, op2); } @@ -645,7 +653,7 @@ svbool_t test_svcmple_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpls.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmple_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) +svbool_t test_svcmple_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_n_u8,,)(pg, op1, op2); } @@ -668,7 +676,7 @@ svbool_t test_svcmple_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) +svbool_t test_svcmple_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_n_u16,,)(pg, op1, op2); } @@ -691,7 +699,7 @@ svbool_t test_svcmple_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmple_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) +svbool_t test_svcmple_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmple_wide,_n_u32,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmplt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmplt.c index 5919ba72a3901b9..38612a10a80917b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmplt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmplt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpgt.nxv16i8( [[PG:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svbool_t test_svcmplt_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_s8,,)(pg, op1, op2); } @@ -43,7 +51,7 @@ svbool_t test_svcmplt_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svbool_t test_svcmplt_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_s16,,)(pg, op1, op2); } @@ -62,7 +70,7 @@ svbool_t test_svcmplt_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svbool_t test_svcmplt_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_s32,,)(pg, op1, op2); } @@ -81,7 +89,7 @@ svbool_t test_svcmplt_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svbool_t test_svcmplt_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_s64,,)(pg, op1, op2); } @@ -96,7 +104,7 @@ svbool_t test_svcmplt_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphi.nxv16i8( [[PG:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svbool_t test_svcmplt_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_u8,,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svbool_t test_svcmplt_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svbool_t test_svcmplt_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_u16,,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svbool_t test_svcmplt_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svbool_t test_svcmplt_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_u32,,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svbool_t test_svcmplt_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svbool_t test_svcmplt_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_u64,,)(pg, op1, op2); } @@ -176,7 +184,7 @@ svbool_t test_svcmplt_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_s64(svbool_t pg, svint64_t op1, int64_t op2) +svbool_t test_svcmplt_n_s64(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_s64,,)(pg, op1, op2); } @@ -199,7 +207,7 @@ svbool_t test_svcmplt_n_s64(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) +svbool_t test_svcmplt_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_u64,,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svbool_t test_svcmplt_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmplt.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) +svbool_t test_svcmplt_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_s8,,)(pg, op1, op2); } @@ -233,7 +241,7 @@ svbool_t test_svcmplt_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) +svbool_t test_svcmplt_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_s16,,)(pg, op1, op2); } @@ -252,7 +260,7 @@ svbool_t test_svcmplt_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) +svbool_t test_svcmplt_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_s32,,)(pg, op1, op2); } @@ -267,7 +275,7 @@ svbool_t test_svcmplt_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmplo.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) +svbool_t test_svcmplt_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_u8,,)(pg, op1, op2); } @@ -286,7 +294,7 @@ svbool_t test_svcmplt_wide_u8(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) +svbool_t test_svcmplt_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_u16,,)(pg, op1, op2); } @@ -305,7 +313,7 @@ svbool_t test_svcmplt_wide_u16(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) +svbool_t test_svcmplt_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_u32,,)(pg, op1, op2); } @@ -324,7 +332,7 @@ svbool_t test_svcmplt_wide_u32(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpgt.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_n_s8(svbool_t pg, svint8_t op1, int8_t op2) +svbool_t test_svcmplt_n_s8(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_s8,,)(pg, op1, op2); } @@ -347,7 +355,7 @@ svbool_t test_svcmplt_n_s8(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_s16(svbool_t pg, svint16_t op1, int16_t op2) +svbool_t test_svcmplt_n_s16(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_s16,,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svbool_t test_svcmplt_n_s16(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_s32(svbool_t pg, svint32_t op1, int32_t op2) +svbool_t test_svcmplt_n_s32(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_s32,,)(pg, op1, op2); } @@ -389,7 +397,7 @@ svbool_t test_svcmplt_n_s32(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmphi.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) +svbool_t test_svcmplt_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_u8,,)(pg, op1, op2); } @@ -412,7 +420,7 @@ svbool_t test_svcmplt_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) +svbool_t test_svcmplt_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_u16,,)(pg, op1, op2); } @@ -435,7 +443,7 @@ svbool_t test_svcmplt_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) +svbool_t test_svcmplt_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_u32,,)(pg, op1, op2); } @@ -454,7 +462,7 @@ svbool_t test_svcmplt_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svcmplt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_f16,,)(pg, op1, op2); } @@ -473,7 +481,7 @@ svbool_t test_svcmplt_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svcmplt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_f32,,)(pg, op1, op2); } @@ -492,7 +500,7 @@ svbool_t test_svcmplt_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svcmplt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_f64,,)(pg, op1, op2); } @@ -515,7 +523,7 @@ svbool_t test_svcmplt_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) +svbool_t test_svcmplt_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_f16,,)(pg, op1, op2); } @@ -538,7 +546,7 @@ svbool_t test_svcmplt_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svcmplt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_f32,,)(pg, op1, op2); } @@ -561,7 +569,7 @@ svbool_t test_svcmplt_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svcmplt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt,_n_f64,,)(pg, op1, op2); } @@ -580,7 +588,7 @@ svbool_t test_svcmplt_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmplt.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) +svbool_t test_svcmplt_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_n_s8,,)(pg, op1, op2); } @@ -603,7 +611,7 @@ svbool_t test_svcmplt_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) +svbool_t test_svcmplt_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_n_s16,,)(pg, op1, op2); } @@ -626,7 +634,7 @@ svbool_t test_svcmplt_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) +svbool_t test_svcmplt_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_n_s32,,)(pg, op1, op2); } @@ -645,7 +653,7 @@ svbool_t test_svcmplt_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmplo.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmplt_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) +svbool_t test_svcmplt_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_n_u8,,)(pg, op1, op2); } @@ -668,7 +676,7 @@ svbool_t test_svcmplt_wide_n_u8(svbool_t pg, svuint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) +svbool_t test_svcmplt_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_n_u16,,)(pg, op1, op2); } @@ -691,7 +699,7 @@ svbool_t test_svcmplt_wide_n_u16(svbool_t pg, svuint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmplt_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) +svbool_t test_svcmplt_wide_n_u32(svbool_t pg, svuint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmplt_wide,_n_u32,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpne.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpne.c index 5cedc1c71e3b3f0..d41541ca8cc0eee 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpne.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpne.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpne.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpne_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svbool_t test_svcmpne_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_s8,,)(pg, op1, op2); } @@ -43,7 +51,7 @@ svbool_t test_svcmpne_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svbool_t test_svcmpne_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_s16,,)(pg, op1, op2); } @@ -62,7 +70,7 @@ svbool_t test_svcmpne_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svbool_t test_svcmpne_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_s32,,)(pg, op1, op2); } @@ -81,7 +89,7 @@ svbool_t test_svcmpne_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svbool_t test_svcmpne_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_s64,,)(pg, op1, op2); } @@ -96,7 +104,7 @@ svbool_t test_svcmpne_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpne.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpne_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svbool_t test_svcmpne_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_u8,,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svbool_t test_svcmpne_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svbool_t test_svcmpne_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_u16,,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svbool_t test_svcmpne_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svbool_t test_svcmpne_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_u32,,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svbool_t test_svcmpne_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svbool_t test_svcmpne_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_u64,,)(pg, op1, op2); } @@ -176,7 +184,7 @@ svbool_t test_svcmpne_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_s64(svbool_t pg, svint64_t op1, int64_t op2) +svbool_t test_svcmpne_n_s64(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_s64,,)(pg, op1, op2); } @@ -199,7 +207,7 @@ svbool_t test_svcmpne_n_s64(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) +svbool_t test_svcmpne_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_u64,,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svbool_t test_svcmpne_n_u64(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpne.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpne_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) +svbool_t test_svcmpne_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne_wide,_s8,,)(pg, op1, op2); } @@ -233,7 +241,7 @@ svbool_t test_svcmpne_wide_s8(svbool_t pg, svint8_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) +svbool_t test_svcmpne_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne_wide,_s16,,)(pg, op1, op2); } @@ -252,7 +260,7 @@ svbool_t test_svcmpne_wide_s16(svbool_t pg, svint16_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) +svbool_t test_svcmpne_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne_wide,_s32,,)(pg, op1, op2); } @@ -271,7 +279,7 @@ svbool_t test_svcmpne_wide_s32(svbool_t pg, svint32_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpne.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpne_n_s8(svbool_t pg, svint8_t op1, int8_t op2) +svbool_t test_svcmpne_n_s8(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_s8,,)(pg, op1, op2); } @@ -294,7 +302,7 @@ svbool_t test_svcmpne_n_s8(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_s16(svbool_t pg, svint16_t op1, int16_t op2) +svbool_t test_svcmpne_n_s16(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_s16,,)(pg, op1, op2); } @@ -317,7 +325,7 @@ svbool_t test_svcmpne_n_s16(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_s32(svbool_t pg, svint32_t op1, int32_t op2) +svbool_t test_svcmpne_n_s32(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_s32,,)(pg, op1, op2); } @@ -336,7 +344,7 @@ svbool_t test_svcmpne_n_s32(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpne.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpne_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) +svbool_t test_svcmpne_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_u8,,)(pg, op1, op2); } @@ -359,7 +367,7 @@ svbool_t test_svcmpne_n_u8(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) +svbool_t test_svcmpne_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_u16,,)(pg, op1, op2); } @@ -382,7 +390,7 @@ svbool_t test_svcmpne_n_u16(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) +svbool_t test_svcmpne_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_u32,,)(pg, op1, op2); } @@ -401,7 +409,7 @@ svbool_t test_svcmpne_n_u32(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svcmpne_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_f16,,)(pg, op1, op2); } @@ -420,7 +428,7 @@ svbool_t test_svcmpne_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svcmpne_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_f32,,)(pg, op1, op2); } @@ -439,7 +447,7 @@ svbool_t test_svcmpne_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svcmpne_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_f64,,)(pg, op1, op2); } @@ -462,7 +470,7 @@ svbool_t test_svcmpne_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) +svbool_t test_svcmpne_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_f16,,)(pg, op1, op2); } @@ -485,7 +493,7 @@ svbool_t test_svcmpne_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svcmpne_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_f32,,)(pg, op1, op2); } @@ -508,7 +516,7 @@ svbool_t test_svcmpne_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svcmpne_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne,_n_f64,,)(pg, op1, op2); } @@ -527,7 +535,7 @@ svbool_t test_svcmpne_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cmpne.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svcmpne_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) +svbool_t test_svcmpne_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne_wide,_n_s8,,)(pg, op1, op2); } @@ -550,7 +558,7 @@ svbool_t test_svcmpne_wide_n_s8(svbool_t pg, svint8_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) +svbool_t test_svcmpne_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne_wide,_n_s16,,)(pg, op1, op2); } @@ -573,7 +581,7 @@ svbool_t test_svcmpne_wide_n_s16(svbool_t pg, svint16_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpne_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) +svbool_t test_svcmpne_wide_n_s32(svbool_t pg, svint32_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpne_wide,_n_s32,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpuo.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpuo.c index 98f0e0442936975..02014b099d6f598 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpuo.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cmpuo.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpuo_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svbool_t test_svcmpuo_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpuo,_f16,,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svbool_t test_svcmpuo_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpuo_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svbool_t test_svcmpuo_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpuo,_f32,,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svbool_t test_svcmpuo_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpuo_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svbool_t test_svcmpuo_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpuo,_f64,,)(pg, op1, op2); } @@ -89,7 +97,7 @@ svbool_t test_svcmpuo_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpuo_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) +svbool_t test_svcmpuo_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpuo,_n_f16,,)(pg, op1, op2); } @@ -112,7 +120,7 @@ svbool_t test_svcmpuo_n_f16(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpuo_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) +svbool_t test_svcmpuo_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpuo,_n_f32,,)(pg, op1, op2); } @@ -135,7 +143,7 @@ svbool_t test_svcmpuo_n_f32(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbool_t test_svcmpuo_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) +svbool_t test_svcmpuo_n_f64(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svcmpuo,_n_f64,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnot.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnot.c index eb80d68eeae30bb..367fda709d82b61 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnot.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnot.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svcnot_s8_z(svbool_t pg, svint8_t op) +svint8_t test_svcnot_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svint8_t test_svcnot_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svcnot_s16_z(svbool_t pg, svint16_t op) +svint16_t test_svcnot_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svint16_t test_svcnot_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcnot_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svcnot_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svint32_t test_svcnot_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcnot_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svcnot_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svint64_t test_svcnot_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnot_u8_z(svbool_t pg, svuint8_t op) +svuint8_t test_svcnot_u8_z(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u8,_z,)(pg, op); } @@ -107,7 +115,7 @@ svuint8_t test_svcnot_u8_z(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnot_u16_z(svbool_t pg, svuint16_t op) +svuint16_t test_svcnot_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u16,_z,)(pg, op); } @@ -124,7 +132,7 @@ svuint16_t test_svcnot_u16_z(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnot_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svcnot_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u32,_z,)(pg, op); } @@ -141,7 +149,7 @@ svuint32_t test_svcnot_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnot_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svcnot_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u64,_z,)(pg, op); } @@ -156,7 +164,7 @@ svuint64_t test_svcnot_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svcnot_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) +svint8_t test_svcnot_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s8,_m,)(inactive, pg, op); } @@ -173,7 +181,7 @@ svint8_t test_svcnot_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svcnot_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) +svint16_t test_svcnot_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s16,_m,)(inactive, pg, op); } @@ -190,7 +198,7 @@ svint16_t test_svcnot_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcnot_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svcnot_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s32,_m,)(inactive, pg, op); } @@ -207,7 +215,7 @@ svint32_t test_svcnot_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcnot_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svcnot_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s64,_m,)(inactive, pg, op); } @@ -222,7 +230,7 @@ svint64_t test_svcnot_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnot_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) +svuint8_t test_svcnot_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u8,_m,)(inactive, pg, op); } @@ -239,7 +247,7 @@ svuint8_t test_svcnot_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnot_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) +svuint16_t test_svcnot_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u16,_m,)(inactive, pg, op); } @@ -256,7 +264,7 @@ svuint16_t test_svcnot_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnot_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svcnot_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u32,_m,)(inactive, pg, op); } @@ -273,7 +281,7 @@ svuint32_t test_svcnot_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnot_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svcnot_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u64,_m,)(inactive, pg, op); } @@ -288,7 +296,7 @@ svuint64_t test_svcnot_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svcnot_s8_x(svbool_t pg, svint8_t op) +svint8_t test_svcnot_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s8,_x,)(pg, op); } @@ -305,7 +313,7 @@ svint8_t test_svcnot_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svcnot_s16_x(svbool_t pg, svint16_t op) +svint16_t test_svcnot_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s16,_x,)(pg, op); } @@ -322,7 +330,7 @@ svint16_t test_svcnot_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcnot_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svcnot_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s32,_x,)(pg, op); } @@ -339,7 +347,7 @@ svint32_t test_svcnot_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcnot_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svcnot_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_s64,_x,)(pg, op); } @@ -354,7 +362,7 @@ svint64_t test_svcnot_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnot_u8_x(svbool_t pg, svuint8_t op) +svuint8_t test_svcnot_u8_x(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u8,_x,)(pg, op); } @@ -371,7 +379,7 @@ svuint8_t test_svcnot_u8_x(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnot_u16_x(svbool_t pg, svuint16_t op) +svuint16_t test_svcnot_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u16,_x,)(pg, op); } @@ -388,7 +396,7 @@ svuint16_t test_svcnot_u16_x(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnot_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svcnot_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u32,_x,)(pg, op); } @@ -405,7 +413,7 @@ svuint32_t test_svcnot_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnot.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnot_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svcnot_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnot,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt-bfloat.c index 0d164fe76393b8f..9c281821667028d 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8bf16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_bf16_z(svbool_t pg, svbfloat16_t op) { +svuint16_t test_svcnt_bf16_z(svbool_t pg, svbfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svcnt_bf16_z'}} return SVE_ACLE_FUNC(svcnt, _bf16, _z, )(pg, op); } @@ -44,7 +52,7 @@ svuint16_t test_svcnt_bf16_z(svbool_t pg, svbfloat16_t op) { // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8bf16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_bf16_m(svuint16_t inactive, svbool_t pg, svbfloat16_t op) { +svuint16_t test_svcnt_bf16_m(svuint16_t inactive, svbool_t pg, svbfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svcnt_bf16_m'}} return SVE_ACLE_FUNC(svcnt, _bf16, _m, )(inactive, pg, op); } @@ -60,7 +68,7 @@ svuint16_t test_svcnt_bf16_m(svuint16_t inactive, svbool_t pg, svbfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8bf16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_bf16_x(svbool_t pg, svbfloat16_t op) { +svuint16_t test_svcnt_bf16_x(svbool_t pg, svbfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svcnt_bf16_x'}} return SVE_ACLE_FUNC(svcnt, _bf16, _x, )(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt.c index 45ccccb2fba18fd..fe545adbd6a1067 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnt_s8_z(svbool_t pg, svint8_t op) +svuint8_t test_svcnt_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svuint8_t test_svcnt_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_s16_z(svbool_t pg, svint16_t op) +svuint16_t test_svcnt_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svuint16_t test_svcnt_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_s32_z(svbool_t pg, svint32_t op) +svuint32_t test_svcnt_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svuint32_t test_svcnt_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_s64_z(svbool_t pg, svint64_t op) +svuint64_t test_svcnt_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svuint64_t test_svcnt_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnt_u8_z(svbool_t pg, svuint8_t op) +svuint8_t test_svcnt_u8_z(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u8,_z,)(pg, op); } @@ -107,7 +115,7 @@ svuint8_t test_svcnt_u8_z(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_u16_z(svbool_t pg, svuint16_t op) +svuint16_t test_svcnt_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u16,_z,)(pg, op); } @@ -124,7 +132,7 @@ svuint16_t test_svcnt_u16_z(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svcnt_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u32,_z,)(pg, op); } @@ -141,7 +149,7 @@ svuint32_t test_svcnt_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svcnt_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u64,_z,)(pg, op); } @@ -158,7 +166,7 @@ svuint64_t test_svcnt_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_f16_z(svbool_t pg, svfloat16_t op) +svuint16_t test_svcnt_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f16,_z,)(pg, op); } @@ -175,7 +183,7 @@ svuint16_t test_svcnt_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_f32_z(svbool_t pg, svfloat32_t op) +svuint32_t test_svcnt_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f32,_z,)(pg, op); } @@ -192,7 +200,7 @@ svuint32_t test_svcnt_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_f64_z(svbool_t pg, svfloat64_t op) +svuint64_t test_svcnt_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f64,_z,)(pg, op); } @@ -207,7 +215,7 @@ svuint64_t test_svcnt_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnt_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) +svuint8_t test_svcnt_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s8,_m,)(inactive, pg, op); } @@ -224,7 +232,7 @@ svuint8_t test_svcnt_s8_m(svuint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) +svuint16_t test_svcnt_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s16,_m,)(inactive, pg, op); } @@ -241,7 +249,7 @@ svuint16_t test_svcnt_s16_m(svuint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) +svuint32_t test_svcnt_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s32,_m,)(inactive, pg, op); } @@ -258,7 +266,7 @@ svuint32_t test_svcnt_s32_m(svuint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) +svuint64_t test_svcnt_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s64,_m,)(inactive, pg, op); } @@ -273,7 +281,7 @@ svuint64_t test_svcnt_s64_m(svuint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnt_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) +svuint8_t test_svcnt_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u8,_m,)(inactive, pg, op); } @@ -290,7 +298,7 @@ svuint8_t test_svcnt_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) +svuint16_t test_svcnt_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u16,_m,)(inactive, pg, op); } @@ -307,7 +315,7 @@ svuint16_t test_svcnt_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svcnt_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u32,_m,)(inactive, pg, op); } @@ -324,7 +332,7 @@ svuint32_t test_svcnt_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svcnt_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u64,_m,)(inactive, pg, op); } @@ -341,7 +349,7 @@ svuint64_t test_svcnt_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_f16_m(svuint16_t inactive, svbool_t pg, svfloat16_t op) +svuint16_t test_svcnt_f16_m(svuint16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f16,_m,)(inactive, pg, op); } @@ -358,7 +366,7 @@ svuint16_t test_svcnt_f16_m(svuint16_t inactive, svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_f32_m(svuint32_t inactive, svbool_t pg, svfloat32_t op) +svuint32_t test_svcnt_f32_m(svuint32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f32,_m,)(inactive, pg, op); } @@ -375,7 +383,7 @@ svuint32_t test_svcnt_f32_m(svuint32_t inactive, svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_f64_m(svuint64_t inactive, svbool_t pg, svfloat64_t op) +svuint64_t test_svcnt_f64_m(svuint64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f64,_m,)(inactive, pg, op); } @@ -390,7 +398,7 @@ svuint64_t test_svcnt_f64_m(svuint64_t inactive, svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnt_s8_x(svbool_t pg, svint8_t op) +svuint8_t test_svcnt_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s8,_x,)(pg, op); } @@ -407,7 +415,7 @@ svuint8_t test_svcnt_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_s16_x(svbool_t pg, svint16_t op) +svuint16_t test_svcnt_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s16,_x,)(pg, op); } @@ -424,7 +432,7 @@ svuint16_t test_svcnt_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_s32_x(svbool_t pg, svint32_t op) +svuint32_t test_svcnt_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s32,_x,)(pg, op); } @@ -441,7 +449,7 @@ svuint32_t test_svcnt_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_s64_x(svbool_t pg, svint64_t op) +svuint64_t test_svcnt_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_s64,_x,)(pg, op); } @@ -456,7 +464,7 @@ svuint64_t test_svcnt_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svcnt_u8_x(svbool_t pg, svuint8_t op) +svuint8_t test_svcnt_u8_x(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u8,_x,)(pg, op); } @@ -473,7 +481,7 @@ svuint8_t test_svcnt_u8_x(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_u16_x(svbool_t pg, svuint16_t op) +svuint16_t test_svcnt_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u16,_x,)(pg, op); } @@ -490,7 +498,7 @@ svuint16_t test_svcnt_u16_x(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svcnt_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u32,_x,)(pg, op); } @@ -507,7 +515,7 @@ svuint32_t test_svcnt_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svcnt_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_u64,_x,)(pg, op); } @@ -524,7 +532,7 @@ svuint64_t test_svcnt_u64_x(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcnt_f16_x(svbool_t pg, svfloat16_t op) +svuint16_t test_svcnt_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f16,_x,)(pg, op); } @@ -541,7 +549,7 @@ svuint16_t test_svcnt_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcnt_f32_x(svbool_t pg, svfloat32_t op) +svuint32_t test_svcnt_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f32,_x,)(pg, op); } @@ -558,7 +566,7 @@ svuint32_t test_svcnt_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.cnt.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcnt_f64_x(svbool_t pg, svfloat64_t op) +svuint64_t test_svcnt_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcnt,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntb.c index 70a9360f9a32b00..3623f50bbd5ba5d 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntb.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svcntb( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.vscale.i64() @@ -17,7 +25,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 4 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcntb() +uint64_t test_svcntb(void) MODE_ATTR { return svcntb(); } @@ -32,7 +40,7 @@ uint64_t test_svcntb() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntb(i32 0) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntb_pat() +uint64_t test_svcntb_pat(void) MODE_ATTR { return svcntb_pat(SV_POW2); } @@ -45,7 +53,7 @@ uint64_t test_svcntb_pat() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 1 // -uint64_t test_svcntb_pat_1() +uint64_t test_svcntb_pat_1(void) MODE_ATTR { return svcntb_pat(SV_VL1); } @@ -58,7 +66,7 @@ uint64_t test_svcntb_pat_1() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 2 // -uint64_t test_svcntb_pat_2() +uint64_t test_svcntb_pat_2(void) MODE_ATTR { return svcntb_pat(SV_VL2); } @@ -71,7 +79,7 @@ uint64_t test_svcntb_pat_2() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 3 // -uint64_t test_svcntb_pat_3() +uint64_t test_svcntb_pat_3(void) MODE_ATTR { return svcntb_pat(SV_VL3); } @@ -84,7 +92,7 @@ uint64_t test_svcntb_pat_3() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 4 // -uint64_t test_svcntb_pat_4() +uint64_t test_svcntb_pat_4(void) MODE_ATTR { return svcntb_pat(SV_VL4); } @@ -97,7 +105,7 @@ uint64_t test_svcntb_pat_4() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 5 // -uint64_t test_svcntb_pat_5() +uint64_t test_svcntb_pat_5(void) MODE_ATTR { return svcntb_pat(SV_VL5); } @@ -110,7 +118,7 @@ uint64_t test_svcntb_pat_5() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 6 // -uint64_t test_svcntb_pat_6() +uint64_t test_svcntb_pat_6(void) MODE_ATTR { return svcntb_pat(SV_VL6); } @@ -123,7 +131,7 @@ uint64_t test_svcntb_pat_6() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 7 // -uint64_t test_svcntb_pat_7() +uint64_t test_svcntb_pat_7(void) MODE_ATTR { return svcntb_pat(SV_VL7); } @@ -136,7 +144,7 @@ uint64_t test_svcntb_pat_7() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 8 // -uint64_t test_svcntb_pat_8() +uint64_t test_svcntb_pat_8(void) MODE_ATTR { return svcntb_pat(SV_VL8); } @@ -149,7 +157,7 @@ uint64_t test_svcntb_pat_8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 16 // -uint64_t test_svcntb_pat_9() +uint64_t test_svcntb_pat_9(void) MODE_ATTR { return svcntb_pat(SV_VL16); } @@ -164,7 +172,7 @@ uint64_t test_svcntb_pat_9() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntb(i32 10) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntb_pat_10() +uint64_t test_svcntb_pat_10(void) MODE_ATTR { return svcntb_pat(SV_VL32); } @@ -179,7 +187,7 @@ uint64_t test_svcntb_pat_10() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntb(i32 11) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntb_pat_11() +uint64_t test_svcntb_pat_11(void) MODE_ATTR { return svcntb_pat(SV_VL64); } @@ -194,7 +202,7 @@ uint64_t test_svcntb_pat_11() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntb(i32 12) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntb_pat_12() +uint64_t test_svcntb_pat_12(void) MODE_ATTR { return svcntb_pat(SV_VL128); } @@ -209,7 +217,7 @@ uint64_t test_svcntb_pat_12() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntb(i32 13) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntb_pat_13() +uint64_t test_svcntb_pat_13(void) MODE_ATTR { return svcntb_pat(SV_VL256); } @@ -224,7 +232,7 @@ uint64_t test_svcntb_pat_13() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntb(i32 29) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntb_pat_14() +uint64_t test_svcntb_pat_14(void) MODE_ATTR { return svcntb_pat(SV_MUL4); } @@ -239,7 +247,7 @@ uint64_t test_svcntb_pat_14() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntb(i32 30) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntb_pat_15() +uint64_t test_svcntb_pat_15(void) MODE_ATTR { return svcntb_pat(SV_MUL3); } @@ -256,7 +264,7 @@ uint64_t test_svcntb_pat_15() // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 4 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcntb_pat_16() +uint64_t test_svcntb_pat_16(void) MODE_ATTR { return svcntb_pat(SV_ALL); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntd.c index 5b05fca3c78a2d9..b3e6dcf54062768 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntd.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svcntd( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.vscale.i64() @@ -17,7 +25,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 1 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcntd() +uint64_t test_svcntd(void) MODE_ATTR { return svcntd(); } @@ -32,7 +40,7 @@ uint64_t test_svcntd() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 0) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat() +uint64_t test_svcntd_pat(void) MODE_ATTR { return svcntd_pat(SV_POW2); } @@ -45,7 +53,7 @@ uint64_t test_svcntd_pat() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 1 // -uint64_t test_svcntd_pat_1() +uint64_t test_svcntd_pat_1(void) MODE_ATTR { return svcntd_pat(SV_VL1); } @@ -58,7 +66,7 @@ uint64_t test_svcntd_pat_1() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 2 // -uint64_t test_svcntd_pat_2() +uint64_t test_svcntd_pat_2(void) MODE_ATTR { return svcntd_pat(SV_VL2); } @@ -73,7 +81,7 @@ uint64_t test_svcntd_pat_2() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 3) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_3() +uint64_t test_svcntd_pat_3(void) MODE_ATTR { return svcntd_pat(SV_VL3); } @@ -88,7 +96,7 @@ uint64_t test_svcntd_pat_3() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 4) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_4() +uint64_t test_svcntd_pat_4(void) MODE_ATTR { return svcntd_pat(SV_VL4); } @@ -103,7 +111,7 @@ uint64_t test_svcntd_pat_4() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 5) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_5() +uint64_t test_svcntd_pat_5(void) MODE_ATTR { return svcntd_pat(SV_VL5); } @@ -118,7 +126,7 @@ uint64_t test_svcntd_pat_5() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 6) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_6() +uint64_t test_svcntd_pat_6(void) MODE_ATTR { return svcntd_pat(SV_VL6); } @@ -133,7 +141,7 @@ uint64_t test_svcntd_pat_6() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 7) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_7() +uint64_t test_svcntd_pat_7(void) MODE_ATTR { return svcntd_pat(SV_VL7); } @@ -148,7 +156,7 @@ uint64_t test_svcntd_pat_7() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 8) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_8() +uint64_t test_svcntd_pat_8(void) MODE_ATTR { return svcntd_pat(SV_VL8); } @@ -163,7 +171,7 @@ uint64_t test_svcntd_pat_8() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 9) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_9() +uint64_t test_svcntd_pat_9(void) MODE_ATTR { return svcntd_pat(SV_VL16); } @@ -178,7 +186,7 @@ uint64_t test_svcntd_pat_9() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 10) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_10() +uint64_t test_svcntd_pat_10(void) MODE_ATTR { return svcntd_pat(SV_VL32); } @@ -193,7 +201,7 @@ uint64_t test_svcntd_pat_10() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 11) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_11() +uint64_t test_svcntd_pat_11(void) MODE_ATTR { return svcntd_pat(SV_VL64); } @@ -208,7 +216,7 @@ uint64_t test_svcntd_pat_11() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 12) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_12() +uint64_t test_svcntd_pat_12(void) MODE_ATTR { return svcntd_pat(SV_VL128); } @@ -223,7 +231,7 @@ uint64_t test_svcntd_pat_12() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 13) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_13() +uint64_t test_svcntd_pat_13(void) MODE_ATTR { return svcntd_pat(SV_VL256); } @@ -238,7 +246,7 @@ uint64_t test_svcntd_pat_13() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 29) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_14() +uint64_t test_svcntd_pat_14(void) MODE_ATTR { return svcntd_pat(SV_MUL4); } @@ -253,7 +261,7 @@ uint64_t test_svcntd_pat_14() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntd(i32 30) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntd_pat_15() +uint64_t test_svcntd_pat_15(void) MODE_ATTR { return svcntd_pat(SV_MUL3); } @@ -270,7 +278,7 @@ uint64_t test_svcntd_pat_15() // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 1 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcntd_pat_16() +uint64_t test_svcntd_pat_16(void) MODE_ATTR { return svcntd_pat(SV_ALL); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnth.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnth.c index 82d374302096c40..6d510f382ca744c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnth.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cnth.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svcnth( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.vscale.i64() @@ -17,7 +25,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 3 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcnth() +uint64_t test_svcnth(void) MODE_ATTR { return svcnth(); } @@ -32,7 +40,7 @@ uint64_t test_svcnth() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 0) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat() +uint64_t test_svcnth_pat(void) MODE_ATTR { return svcnth_pat(SV_POW2); } @@ -45,7 +53,7 @@ uint64_t test_svcnth_pat() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 1 // -uint64_t test_svcnth_pat_1() +uint64_t test_svcnth_pat_1(void) MODE_ATTR { return svcnth_pat(SV_VL1); } @@ -58,7 +66,7 @@ uint64_t test_svcnth_pat_1() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 2 // -uint64_t test_svcnth_pat_2() +uint64_t test_svcnth_pat_2(void) MODE_ATTR { return svcnth_pat(SV_VL2); } @@ -71,7 +79,7 @@ uint64_t test_svcnth_pat_2() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 3 // -uint64_t test_svcnth_pat_3() +uint64_t test_svcnth_pat_3(void) MODE_ATTR { return svcnth_pat(SV_VL3); } @@ -84,7 +92,7 @@ uint64_t test_svcnth_pat_3() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 4 // -uint64_t test_svcnth_pat_4() +uint64_t test_svcnth_pat_4(void) MODE_ATTR { return svcnth_pat(SV_VL4); } @@ -97,7 +105,7 @@ uint64_t test_svcnth_pat_4() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 5 // -uint64_t test_svcnth_pat_5() +uint64_t test_svcnth_pat_5(void) MODE_ATTR { return svcnth_pat(SV_VL5); } @@ -110,7 +118,7 @@ uint64_t test_svcnth_pat_5() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 6 // -uint64_t test_svcnth_pat_6() +uint64_t test_svcnth_pat_6(void) MODE_ATTR { return svcnth_pat(SV_VL6); } @@ -123,7 +131,7 @@ uint64_t test_svcnth_pat_6() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 7 // -uint64_t test_svcnth_pat_7() +uint64_t test_svcnth_pat_7(void) MODE_ATTR { return svcnth_pat(SV_VL7); } @@ -136,7 +144,7 @@ uint64_t test_svcnth_pat_7() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 8 // -uint64_t test_svcnth_pat_8() +uint64_t test_svcnth_pat_8(void) MODE_ATTR { return svcnth_pat(SV_VL8); } @@ -151,7 +159,7 @@ uint64_t test_svcnth_pat_8() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 9) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat_9() +uint64_t test_svcnth_pat_9(void) MODE_ATTR { return svcnth_pat(SV_VL16); } @@ -166,7 +174,7 @@ uint64_t test_svcnth_pat_9() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 10) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat_10() +uint64_t test_svcnth_pat_10(void) MODE_ATTR { return svcnth_pat(SV_VL32); } @@ -181,7 +189,7 @@ uint64_t test_svcnth_pat_10() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 11) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat_11() +uint64_t test_svcnth_pat_11(void) MODE_ATTR { return svcnth_pat(SV_VL64); } @@ -196,7 +204,7 @@ uint64_t test_svcnth_pat_11() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 12) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat_12() +uint64_t test_svcnth_pat_12(void) MODE_ATTR { return svcnth_pat(SV_VL128); } @@ -211,7 +219,7 @@ uint64_t test_svcnth_pat_12() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 13) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat_13() +uint64_t test_svcnth_pat_13(void) MODE_ATTR { return svcnth_pat(SV_VL256); } @@ -226,7 +234,7 @@ uint64_t test_svcnth_pat_13() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 29) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat_14() +uint64_t test_svcnth_pat_14(void) MODE_ATTR { return svcnth_pat(SV_MUL4); } @@ -241,7 +249,7 @@ uint64_t test_svcnth_pat_14() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cnth(i32 30) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcnth_pat_15() +uint64_t test_svcnth_pat_15(void) MODE_ATTR { return svcnth_pat(SV_MUL3); } @@ -258,7 +266,7 @@ uint64_t test_svcnth_pat_15() // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 3 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcnth_pat_16() +uint64_t test_svcnth_pat_16(void) MODE_ATTR { return svcnth_pat(SV_ALL); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntp.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntp.c index a5208d4dc5b3181..056eb4a02a1c090 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntp.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntp.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svcntp_b8( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntp.nxv16i1( [[PG:%.*]], [[OP:%.*]]) @@ -15,7 +23,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntp.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntp_b8(svbool_t pg, svbool_t op) +uint64_t test_svcntp_b8(svbool_t pg, svbool_t op) MODE_ATTR { return svcntp_b8(pg, op); } @@ -34,7 +42,7 @@ uint64_t test_svcntp_b8(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call i64 @llvm.aarch64.sve.cntp.nxv8i1( [[TMP0]], [[TMP1]]) // CPP-CHECK-NEXT: ret i64 [[TMP2]] // -uint64_t test_svcntp_b16(svbool_t pg, svbool_t op) +uint64_t test_svcntp_b16(svbool_t pg, svbool_t op) MODE_ATTR { return svcntp_b16(pg, op); } @@ -53,7 +61,7 @@ uint64_t test_svcntp_b16(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call i64 @llvm.aarch64.sve.cntp.nxv4i1( [[TMP0]], [[TMP1]]) // CPP-CHECK-NEXT: ret i64 [[TMP2]] // -uint64_t test_svcntp_b32(svbool_t pg, svbool_t op) +uint64_t test_svcntp_b32(svbool_t pg, svbool_t op) MODE_ATTR { return svcntp_b32(pg, op); } @@ -72,7 +80,7 @@ uint64_t test_svcntp_b32(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call i64 @llvm.aarch64.sve.cntp.nxv2i1( [[TMP0]], [[TMP1]]) // CPP-CHECK-NEXT: ret i64 [[TMP2]] // -uint64_t test_svcntp_b64(svbool_t pg, svbool_t op) +uint64_t test_svcntp_b64(svbool_t pg, svbool_t op) MODE_ATTR { return svcntp_b64(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntw.c index a0a2931211b0262..1a659ef81c0cc59 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntw.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svcntw( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.vscale.i64() @@ -17,7 +25,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 2 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcntw() +uint64_t test_svcntw(void) MODE_ATTR { return svcntw(); } @@ -32,7 +40,7 @@ uint64_t test_svcntw() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 0) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat() +uint64_t test_svcntw_pat(void) MODE_ATTR { return svcntw_pat(SV_POW2); } @@ -45,7 +53,7 @@ uint64_t test_svcntw_pat() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 1 // -uint64_t test_svcntw_pat_1() +uint64_t test_svcntw_pat_1(void) MODE_ATTR { return svcntw_pat(SV_VL1); } @@ -58,7 +66,7 @@ uint64_t test_svcntw_pat_1() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 2 // -uint64_t test_svcntw_pat_2() +uint64_t test_svcntw_pat_2(void) MODE_ATTR { return svcntw_pat(SV_VL2); } @@ -71,7 +79,7 @@ uint64_t test_svcntw_pat_2() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 3 // -uint64_t test_svcntw_pat_3() +uint64_t test_svcntw_pat_3(void) MODE_ATTR { return svcntw_pat(SV_VL3); } @@ -84,7 +92,7 @@ uint64_t test_svcntw_pat_3() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret i64 4 // -uint64_t test_svcntw_pat_4() +uint64_t test_svcntw_pat_4(void) MODE_ATTR { return svcntw_pat(SV_VL4); } @@ -99,7 +107,7 @@ uint64_t test_svcntw_pat_4() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 5) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_5() +uint64_t test_svcntw_pat_5(void) MODE_ATTR { return svcntw_pat(SV_VL5); } @@ -114,7 +122,7 @@ uint64_t test_svcntw_pat_5() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 6) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_6() +uint64_t test_svcntw_pat_6(void) MODE_ATTR { return svcntw_pat(SV_VL6); } @@ -129,7 +137,7 @@ uint64_t test_svcntw_pat_6() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 7) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_7() +uint64_t test_svcntw_pat_7(void) MODE_ATTR { return svcntw_pat(SV_VL7); } @@ -144,7 +152,7 @@ uint64_t test_svcntw_pat_7() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 8) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_8() +uint64_t test_svcntw_pat_8(void) MODE_ATTR { return svcntw_pat(SV_VL8); } @@ -159,7 +167,7 @@ uint64_t test_svcntw_pat_8() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 9) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_9() +uint64_t test_svcntw_pat_9(void) MODE_ATTR { return svcntw_pat(SV_VL16); } @@ -174,7 +182,7 @@ uint64_t test_svcntw_pat_9() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 10) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_10() +uint64_t test_svcntw_pat_10(void) MODE_ATTR { return svcntw_pat(SV_VL32); } @@ -189,7 +197,7 @@ uint64_t test_svcntw_pat_10() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 11) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_11() +uint64_t test_svcntw_pat_11(void) MODE_ATTR { return svcntw_pat(SV_VL64); } @@ -204,7 +212,7 @@ uint64_t test_svcntw_pat_11() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 12) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_12() +uint64_t test_svcntw_pat_12(void) MODE_ATTR { return svcntw_pat(SV_VL128); } @@ -219,7 +227,7 @@ uint64_t test_svcntw_pat_12() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 13) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_13() +uint64_t test_svcntw_pat_13(void) MODE_ATTR { return svcntw_pat(SV_VL256); } @@ -234,7 +242,7 @@ uint64_t test_svcntw_pat_13() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 29) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_14() +uint64_t test_svcntw_pat_14(void) MODE_ATTR { return svcntw_pat(SV_MUL4); } @@ -249,7 +257,7 @@ uint64_t test_svcntw_pat_14() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.cntw(i32 30) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svcntw_pat_15() +uint64_t test_svcntw_pat_15(void) MODE_ATTR { return svcntw_pat(SV_MUL3); } @@ -266,7 +274,7 @@ uint64_t test_svcntw_pat_15() // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 2 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svcntw_pat_16() +uint64_t test_svcntw_pat_16(void) MODE_ATTR { return svcntw_pat(SV_ALL); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2-bfloat.c index d12fc41af475669..abcb48fb8fa1a04 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2.c index e21557e9f4aa511..2338f80fd08966e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create2.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3-bfloat.c index 1bf7389dc45399d..86533e58f561788 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3.c index 7310336b7155112..aeff07104c189f7 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create3.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4-bfloat.c index 40c511536873a45..3067ae4875719cc 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4.c index 1008534070d048a..b2781e97f7ec2e1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_create4.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt-bfloat.c index 12b804b37ebc5ec..145d60db6eda3c6 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt-bfloat.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.bf16f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svcvt_bf16_f32_x(svbool_t pg, svfloat32_t op) { +svbfloat16_t test_svcvt_bf16_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_bf16, _f32, _x, )(pg, op); } @@ -43,7 +50,7 @@ svbfloat16_t test_svcvt_bf16_f32_x(svbool_t pg, svfloat32_t op) { // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.bf16f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svcvt_bf16_f32_z(svbool_t pg, svfloat32_t op) { +svbfloat16_t test_svcvt_bf16_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_bf16, _f32, _z, )(pg, op); } @@ -59,6 +66,6 @@ svbfloat16_t test_svcvt_bf16_f32_z(svbool_t pg, svfloat32_t op) { // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.bf16f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svcvt_bf16_f32_m(svbfloat16_t inactive, svbool_t pg, svfloat32_t op) { +svbfloat16_t test_svcvt_bf16_f32_m(svbfloat16_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_bf16, _f32, _m, )(inactive, pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt.c index aa2de6412e6e308..9dfbf08a29e672c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svcvt_s16_f16_z(svbool_t pg, svfloat16_t op) +svint16_t test_svcvt_s16_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s16,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svint16_t test_svcvt_s16_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svcvt_s16_f16_m(svint16_t inactive, svbool_t pg, svfloat16_t op) +svint16_t test_svcvt_s16_f16_m(svint16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s16,_f16,_m,)(inactive, pg, op); } @@ -60,7 +68,7 @@ svint16_t test_svcvt_s16_f16_m(svint16_t inactive, svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svcvt_s16_f16_x(svbool_t pg, svfloat16_t op) +svint16_t test_svcvt_s16_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s16,_f16,_x,)(pg, op); } @@ -77,7 +85,7 @@ svint16_t test_svcvt_s16_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcvt_u16_f16_z(svbool_t pg, svfloat16_t op) +svuint16_t test_svcvt_u16_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u16,_f16,_z,)(pg, op); } @@ -94,7 +102,7 @@ svuint16_t test_svcvt_u16_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcvt_u16_f16_m(svuint16_t inactive, svbool_t pg, svfloat16_t op) +svuint16_t test_svcvt_u16_f16_m(svuint16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u16,_f16,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svuint16_t test_svcvt_u16_f16_m(svuint16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svcvt_u16_f16_x(svbool_t pg, svfloat16_t op) +svuint16_t test_svcvt_u16_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u16,_f16,_x,)(pg, op); } @@ -128,7 +136,7 @@ svuint16_t test_svcvt_u16_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i32f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f16_z(svbool_t pg, svfloat16_t op) +svint32_t test_svcvt_s32_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f16,_z,)(pg, op); } @@ -145,7 +153,7 @@ svint32_t test_svcvt_s32_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f32_z(svbool_t pg, svfloat32_t op) +svint32_t test_svcvt_s32_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f32,_z,)(pg, op); } @@ -162,7 +170,7 @@ svint32_t test_svcvt_s32_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i32f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f64_z(svbool_t pg, svfloat64_t op) +svint32_t test_svcvt_s32_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f64,_z,)(pg, op); } @@ -179,7 +187,7 @@ svint32_t test_svcvt_s32_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i32f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f16_m(svint32_t inactive, svbool_t pg, svfloat16_t op) +svint32_t test_svcvt_s32_f16_m(svint32_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f16,_m,)(inactive, pg, op); } @@ -196,7 +204,7 @@ svint32_t test_svcvt_s32_f16_m(svint32_t inactive, svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f32_m(svint32_t inactive, svbool_t pg, svfloat32_t op) +svint32_t test_svcvt_s32_f32_m(svint32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f32,_m,)(inactive, pg, op); } @@ -213,7 +221,7 @@ svint32_t test_svcvt_s32_f32_m(svint32_t inactive, svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i32f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f64_m(svint32_t inactive, svbool_t pg, svfloat64_t op) +svint32_t test_svcvt_s32_f64_m(svint32_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f64,_m,)(inactive, pg, op); } @@ -230,7 +238,7 @@ svint32_t test_svcvt_s32_f64_m(svint32_t inactive, svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i32f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f16_x(svbool_t pg, svfloat16_t op) +svint32_t test_svcvt_s32_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f16,_x,)(pg, op); } @@ -247,7 +255,7 @@ svint32_t test_svcvt_s32_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f32_x(svbool_t pg, svfloat32_t op) +svint32_t test_svcvt_s32_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f32,_x,)(pg, op); } @@ -264,7 +272,7 @@ svint32_t test_svcvt_s32_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i32f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svcvt_s32_f64_x(svbool_t pg, svfloat64_t op) +svint32_t test_svcvt_s32_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s32,_f64,_x,)(pg, op); } @@ -281,7 +289,7 @@ svint32_t test_svcvt_s32_f64_x(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i64f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f16_z(svbool_t pg, svfloat16_t op) +svint64_t test_svcvt_s64_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f16,_z,)(pg, op); } @@ -298,7 +306,7 @@ svint64_t test_svcvt_s64_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i64f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f32_z(svbool_t pg, svfloat32_t op) +svint64_t test_svcvt_s64_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f32,_z,)(pg, op); } @@ -315,7 +323,7 @@ svint64_t test_svcvt_s64_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f64_z(svbool_t pg, svfloat64_t op) +svint64_t test_svcvt_s64_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f64,_z,)(pg, op); } @@ -332,7 +340,7 @@ svint64_t test_svcvt_s64_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i64f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f16_m(svint64_t inactive, svbool_t pg, svfloat16_t op) +svint64_t test_svcvt_s64_f16_m(svint64_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f16,_m,)(inactive, pg, op); } @@ -349,7 +357,7 @@ svint64_t test_svcvt_s64_f16_m(svint64_t inactive, svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i64f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f32_m(svint64_t inactive, svbool_t pg, svfloat32_t op) +svint64_t test_svcvt_s64_f32_m(svint64_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f32,_m,)(inactive, pg, op); } @@ -366,7 +374,7 @@ svint64_t test_svcvt_s64_f32_m(svint64_t inactive, svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f64_m(svint64_t inactive, svbool_t pg, svfloat64_t op) +svint64_t test_svcvt_s64_f64_m(svint64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f64,_m,)(inactive, pg, op); } @@ -383,7 +391,7 @@ svint64_t test_svcvt_s64_f64_m(svint64_t inactive, svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i64f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f16_x(svbool_t pg, svfloat16_t op) +svint64_t test_svcvt_s64_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f16,_x,)(pg, op); } @@ -400,7 +408,7 @@ svint64_t test_svcvt_s64_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.i64f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f32_x(svbool_t pg, svfloat32_t op) +svint64_t test_svcvt_s64_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f32,_x,)(pg, op); } @@ -417,7 +425,7 @@ svint64_t test_svcvt_s64_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svcvt_s64_f64_x(svbool_t pg, svfloat64_t op) +svint64_t test_svcvt_s64_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_s64,_f64,_x,)(pg, op); } @@ -434,7 +442,7 @@ svint64_t test_svcvt_s64_f64_x(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i32f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f16_z(svbool_t pg, svfloat16_t op) +svuint32_t test_svcvt_u32_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f16,_z,)(pg, op); } @@ -451,7 +459,7 @@ svuint32_t test_svcvt_u32_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f32_z(svbool_t pg, svfloat32_t op) +svuint32_t test_svcvt_u32_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f32,_z,)(pg, op); } @@ -468,7 +476,7 @@ svuint32_t test_svcvt_u32_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i32f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f64_z(svbool_t pg, svfloat64_t op) +svuint32_t test_svcvt_u32_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f64,_z,)(pg, op); } @@ -485,7 +493,7 @@ svuint32_t test_svcvt_u32_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i32f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f16_m(svuint32_t inactive, svbool_t pg, svfloat16_t op) +svuint32_t test_svcvt_u32_f16_m(svuint32_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f16,_m,)(inactive, pg, op); } @@ -502,7 +510,7 @@ svuint32_t test_svcvt_u32_f16_m(svuint32_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f32_m(svuint32_t inactive, svbool_t pg, svfloat32_t op) +svuint32_t test_svcvt_u32_f32_m(svuint32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f32,_m,)(inactive, pg, op); } @@ -519,7 +527,7 @@ svuint32_t test_svcvt_u32_f32_m(svuint32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i32f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f64_m(svuint32_t inactive, svbool_t pg, svfloat64_t op) +svuint32_t test_svcvt_u32_f64_m(svuint32_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f64,_m,)(inactive, pg, op); } @@ -536,7 +544,7 @@ svuint32_t test_svcvt_u32_f64_m(svuint32_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i32f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f16_x(svbool_t pg, svfloat16_t op) +svuint32_t test_svcvt_u32_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f16,_x,)(pg, op); } @@ -553,7 +561,7 @@ svuint32_t test_svcvt_u32_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f32_x(svbool_t pg, svfloat32_t op) +svuint32_t test_svcvt_u32_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f32,_x,)(pg, op); } @@ -570,7 +578,7 @@ svuint32_t test_svcvt_u32_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i32f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svcvt_u32_f64_x(svbool_t pg, svfloat64_t op) +svuint32_t test_svcvt_u32_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u32,_f64,_x,)(pg, op); } @@ -587,7 +595,7 @@ svuint32_t test_svcvt_u32_f64_x(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i64f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f16_z(svbool_t pg, svfloat16_t op) +svuint64_t test_svcvt_u64_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f16,_z,)(pg, op); } @@ -604,7 +612,7 @@ svuint64_t test_svcvt_u64_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i64f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f32_z(svbool_t pg, svfloat32_t op) +svuint64_t test_svcvt_u64_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f32,_z,)(pg, op); } @@ -621,7 +629,7 @@ svuint64_t test_svcvt_u64_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f64_z(svbool_t pg, svfloat64_t op) +svuint64_t test_svcvt_u64_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f64,_z,)(pg, op); } @@ -638,7 +646,7 @@ svuint64_t test_svcvt_u64_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i64f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f16_m(svuint64_t inactive, svbool_t pg, svfloat16_t op) +svuint64_t test_svcvt_u64_f16_m(svuint64_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f16,_m,)(inactive, pg, op); } @@ -655,7 +663,7 @@ svuint64_t test_svcvt_u64_f16_m(svuint64_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i64f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f32_m(svuint64_t inactive, svbool_t pg, svfloat32_t op) +svuint64_t test_svcvt_u64_f32_m(svuint64_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f32,_m,)(inactive, pg, op); } @@ -672,7 +680,7 @@ svuint64_t test_svcvt_u64_f32_m(svuint64_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f64_m(svuint64_t inactive, svbool_t pg, svfloat64_t op) +svuint64_t test_svcvt_u64_f64_m(svuint64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f64,_m,)(inactive, pg, op); } @@ -689,7 +697,7 @@ svuint64_t test_svcvt_u64_f64_m(svuint64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i64f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f16_x(svbool_t pg, svfloat16_t op) +svuint64_t test_svcvt_u64_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f16,_x,)(pg, op); } @@ -706,7 +714,7 @@ svuint64_t test_svcvt_u64_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.i64f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f32_x(svbool_t pg, svfloat32_t op) +svuint64_t test_svcvt_u64_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f32,_x,)(pg, op); } @@ -723,7 +731,7 @@ svuint64_t test_svcvt_u64_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svcvt_u64_f64_x(svbool_t pg, svfloat64_t op) +svuint64_t test_svcvt_u64_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_u64,_f64,_x,)(pg, op); } @@ -740,7 +748,7 @@ svuint64_t test_svcvt_u64_f64_x(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f16i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_s32_z(svbool_t pg, svint32_t op) +svfloat16_t test_svcvt_f16_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_s32,_z,)(pg, op); } @@ -757,7 +765,7 @@ svfloat16_t test_svcvt_f16_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_s32_z(svbool_t pg, svint32_t op) +svfloat32_t test_svcvt_f32_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_s32,_z,)(pg, op); } @@ -774,7 +782,7 @@ svfloat32_t test_svcvt_f32_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f64i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_s32_z(svbool_t pg, svint32_t op) +svfloat64_t test_svcvt_f64_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_s32,_z,)(pg, op); } @@ -791,7 +799,7 @@ svfloat64_t test_svcvt_f64_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f16i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_s32_m(svfloat16_t inactive, svbool_t pg, svint32_t op) +svfloat16_t test_svcvt_f16_s32_m(svfloat16_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_s32,_m,)(inactive, pg, op); } @@ -808,7 +816,7 @@ svfloat16_t test_svcvt_f16_s32_m(svfloat16_t inactive, svbool_t pg, svint32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_s32_m(svfloat32_t inactive, svbool_t pg, svint32_t op) +svfloat32_t test_svcvt_f32_s32_m(svfloat32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_s32,_m,)(inactive, pg, op); } @@ -825,7 +833,7 @@ svfloat32_t test_svcvt_f32_s32_m(svfloat32_t inactive, svbool_t pg, svint32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f64i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_s32_m(svfloat64_t inactive, svbool_t pg, svint32_t op) +svfloat64_t test_svcvt_f64_s32_m(svfloat64_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_s32,_m,)(inactive, pg, op); } @@ -842,7 +850,7 @@ svfloat64_t test_svcvt_f64_s32_m(svfloat64_t inactive, svbool_t pg, svint32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f16i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_s32_x(svbool_t pg, svint32_t op) +svfloat16_t test_svcvt_f16_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_s32,_x,)(pg, op); } @@ -859,7 +867,7 @@ svfloat16_t test_svcvt_f16_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_s32_x(svbool_t pg, svint32_t op) +svfloat32_t test_svcvt_f32_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_s32,_x,)(pg, op); } @@ -876,7 +884,7 @@ svfloat32_t test_svcvt_f32_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f64i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_s32_x(svbool_t pg, svint32_t op) +svfloat64_t test_svcvt_f64_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_s32,_x,)(pg, op); } @@ -893,7 +901,7 @@ svfloat64_t test_svcvt_f64_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f16i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_s64_z(svbool_t pg, svint64_t op) +svfloat16_t test_svcvt_f16_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_s64,_z,)(pg, op); } @@ -910,7 +918,7 @@ svfloat16_t test_svcvt_f16_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f32i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_s64_z(svbool_t pg, svint64_t op) +svfloat32_t test_svcvt_f32_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_s64,_z,)(pg, op); } @@ -927,7 +935,7 @@ svfloat32_t test_svcvt_f32_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_s64_z(svbool_t pg, svint64_t op) +svfloat64_t test_svcvt_f64_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_s64,_z,)(pg, op); } @@ -944,7 +952,7 @@ svfloat64_t test_svcvt_f64_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f16i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_s64_m(svfloat16_t inactive, svbool_t pg, svint64_t op) +svfloat16_t test_svcvt_f16_s64_m(svfloat16_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_s64,_m,)(inactive, pg, op); } @@ -961,7 +969,7 @@ svfloat16_t test_svcvt_f16_s64_m(svfloat16_t inactive, svbool_t pg, svint64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f32i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_s64_m(svfloat32_t inactive, svbool_t pg, svint64_t op) +svfloat32_t test_svcvt_f32_s64_m(svfloat32_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_s64,_m,)(inactive, pg, op); } @@ -978,7 +986,7 @@ svfloat32_t test_svcvt_f32_s64_m(svfloat32_t inactive, svbool_t pg, svint64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_s64_m(svfloat64_t inactive, svbool_t pg, svint64_t op) +svfloat64_t test_svcvt_f64_s64_m(svfloat64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_s64,_m,)(inactive, pg, op); } @@ -995,7 +1003,7 @@ svfloat64_t test_svcvt_f64_s64_m(svfloat64_t inactive, svbool_t pg, svint64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f16i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_s64_x(svbool_t pg, svint64_t op) +svfloat16_t test_svcvt_f16_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_s64,_x,)(pg, op); } @@ -1012,7 +1020,7 @@ svfloat16_t test_svcvt_f16_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.f32i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_s64_x(svbool_t pg, svint64_t op) +svfloat32_t test_svcvt_f32_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_s64,_x,)(pg, op); } @@ -1029,7 +1037,7 @@ svfloat32_t test_svcvt_f32_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_s64_x(svbool_t pg, svint64_t op) +svfloat64_t test_svcvt_f64_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_s64,_x,)(pg, op); } @@ -1046,7 +1054,7 @@ svfloat64_t test_svcvt_f64_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f16i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_u32_z(svbool_t pg, svuint32_t op) +svfloat16_t test_svcvt_f16_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_u32,_z,)(pg, op); } @@ -1063,7 +1071,7 @@ svfloat16_t test_svcvt_f16_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_u32_z(svbool_t pg, svuint32_t op) +svfloat32_t test_svcvt_f32_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_u32,_z,)(pg, op); } @@ -1080,7 +1088,7 @@ svfloat32_t test_svcvt_f32_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f64i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_u32_z(svbool_t pg, svuint32_t op) +svfloat64_t test_svcvt_f64_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_u32,_z,)(pg, op); } @@ -1097,7 +1105,7 @@ svfloat64_t test_svcvt_f64_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f16i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_u32_m(svfloat16_t inactive, svbool_t pg, svuint32_t op) +svfloat16_t test_svcvt_f16_u32_m(svfloat16_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_u32,_m,)(inactive, pg, op); } @@ -1114,7 +1122,7 @@ svfloat16_t test_svcvt_f16_u32_m(svfloat16_t inactive, svbool_t pg, svuint32_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_u32_m(svfloat32_t inactive, svbool_t pg, svuint32_t op) +svfloat32_t test_svcvt_f32_u32_m(svfloat32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_u32,_m,)(inactive, pg, op); } @@ -1131,7 +1139,7 @@ svfloat32_t test_svcvt_f32_u32_m(svfloat32_t inactive, svbool_t pg, svuint32_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f64i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_u32_m(svfloat64_t inactive, svbool_t pg, svuint32_t op) +svfloat64_t test_svcvt_f64_u32_m(svfloat64_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_u32,_m,)(inactive, pg, op); } @@ -1148,7 +1156,7 @@ svfloat64_t test_svcvt_f64_u32_m(svfloat64_t inactive, svbool_t pg, svuint32_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f16i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_u32_x(svbool_t pg, svuint32_t op) +svfloat16_t test_svcvt_f16_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_u32,_x,)(pg, op); } @@ -1165,7 +1173,7 @@ svfloat16_t test_svcvt_f16_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_u32_x(svbool_t pg, svuint32_t op) +svfloat32_t test_svcvt_f32_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_u32,_x,)(pg, op); } @@ -1182,7 +1190,7 @@ svfloat32_t test_svcvt_f32_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f64i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_u32_x(svbool_t pg, svuint32_t op) +svfloat64_t test_svcvt_f64_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_u32,_x,)(pg, op); } @@ -1199,7 +1207,7 @@ svfloat64_t test_svcvt_f64_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f16i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_u64_z(svbool_t pg, svuint64_t op) +svfloat16_t test_svcvt_f16_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_u64,_z,)(pg, op); } @@ -1216,7 +1224,7 @@ svfloat16_t test_svcvt_f16_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f32i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_u64_z(svbool_t pg, svuint64_t op) +svfloat32_t test_svcvt_f32_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_u64,_z,)(pg, op); } @@ -1233,7 +1241,7 @@ svfloat32_t test_svcvt_f32_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_u64_z(svbool_t pg, svuint64_t op) +svfloat64_t test_svcvt_f64_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_u64,_z,)(pg, op); } @@ -1250,7 +1258,7 @@ svfloat64_t test_svcvt_f64_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f16i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_u64_m(svfloat16_t inactive, svbool_t pg, svuint64_t op) +svfloat16_t test_svcvt_f16_u64_m(svfloat16_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_u64,_m,)(inactive, pg, op); } @@ -1267,7 +1275,7 @@ svfloat16_t test_svcvt_f16_u64_m(svfloat16_t inactive, svbool_t pg, svuint64_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f32i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_u64_m(svfloat32_t inactive, svbool_t pg, svuint64_t op) +svfloat32_t test_svcvt_f32_u64_m(svfloat32_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_u64,_m,)(inactive, pg, op); } @@ -1284,7 +1292,7 @@ svfloat32_t test_svcvt_f32_u64_m(svfloat32_t inactive, svbool_t pg, svuint64_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_u64_m(svfloat64_t inactive, svbool_t pg, svuint64_t op) +svfloat64_t test_svcvt_f64_u64_m(svfloat64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_u64,_m,)(inactive, pg, op); } @@ -1301,7 +1309,7 @@ svfloat64_t test_svcvt_f64_u64_m(svfloat64_t inactive, svbool_t pg, svuint64_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f16i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_u64_x(svbool_t pg, svuint64_t op) +svfloat16_t test_svcvt_f16_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_u64,_x,)(pg, op); } @@ -1318,7 +1326,7 @@ svfloat16_t test_svcvt_f16_u64_x(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.f32i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_u64_x(svbool_t pg, svuint64_t op) +svfloat32_t test_svcvt_f32_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_u64,_x,)(pg, op); } @@ -1335,7 +1343,7 @@ svfloat32_t test_svcvt_f32_u64_x(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_u64_x(svbool_t pg, svuint64_t op) +svfloat64_t test_svcvt_f64_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_u64,_x,)(pg, op); } @@ -1352,7 +1360,7 @@ svfloat64_t test_svcvt_f64_u64_x(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f32f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_f16_z(svbool_t pg, svfloat16_t op) +svfloat32_t test_svcvt_f32_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_f16,_z,)(pg, op); } @@ -1369,7 +1377,7 @@ svfloat32_t test_svcvt_f32_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f64f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_f16_z(svbool_t pg, svfloat16_t op) +svfloat64_t test_svcvt_f64_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_f16,_z,)(pg, op); } @@ -1386,7 +1394,7 @@ svfloat64_t test_svcvt_f64_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f32f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_f16_m(svfloat32_t inactive, svbool_t pg, svfloat16_t op) +svfloat32_t test_svcvt_f32_f16_m(svfloat32_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_f16,_m,)(inactive, pg, op); } @@ -1403,7 +1411,7 @@ svfloat32_t test_svcvt_f32_f16_m(svfloat32_t inactive, svbool_t pg, svfloat16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f64f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_f16_m(svfloat64_t inactive, svbool_t pg, svfloat16_t op) +svfloat64_t test_svcvt_f64_f16_m(svfloat64_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_f16,_m,)(inactive, pg, op); } @@ -1420,7 +1428,7 @@ svfloat64_t test_svcvt_f64_f16_m(svfloat64_t inactive, svbool_t pg, svfloat16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f32f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_f16_x(svbool_t pg, svfloat16_t op) +svfloat32_t test_svcvt_f32_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_f16,_x,)(pg, op); } @@ -1437,7 +1445,7 @@ svfloat32_t test_svcvt_f32_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f64f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_f16_x(svbool_t pg, svfloat16_t op) +svfloat64_t test_svcvt_f64_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_f16,_x,)(pg, op); } @@ -1454,7 +1462,7 @@ svfloat64_t test_svcvt_f64_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f64f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_f32_z(svbool_t pg, svfloat32_t op) +svfloat64_t test_svcvt_f64_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_f32,_z,)(pg, op); } @@ -1471,7 +1479,7 @@ svfloat64_t test_svcvt_f64_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f64f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_f32_m(svfloat64_t inactive, svbool_t pg, svfloat32_t op) +svfloat64_t test_svcvt_f64_f32_m(svfloat64_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_f32,_m,)(inactive, pg, op); } @@ -1488,7 +1496,7 @@ svfloat64_t test_svcvt_f64_f32_m(svfloat64_t inactive, svbool_t pg, svfloat32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f64f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svcvt_f64_f32_x(svbool_t pg, svfloat32_t op) +svfloat64_t test_svcvt_f64_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f64,_f32,_x,)(pg, op); } @@ -1505,7 +1513,7 @@ svfloat64_t test_svcvt_f64_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f16f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_f32_z(svbool_t pg, svfloat32_t op) +svfloat16_t test_svcvt_f16_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_f32,_z,)(pg, op); } @@ -1522,7 +1530,7 @@ svfloat16_t test_svcvt_f16_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f16f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_f64_z(svbool_t pg, svfloat64_t op) +svfloat16_t test_svcvt_f16_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_f64,_z,)(pg, op); } @@ -1539,7 +1547,7 @@ svfloat16_t test_svcvt_f16_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f16f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_f32_m(svfloat16_t inactive, svbool_t pg, svfloat32_t op) +svfloat16_t test_svcvt_f16_f32_m(svfloat16_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_f32,_m,)(inactive, pg, op); } @@ -1556,7 +1564,7 @@ svfloat16_t test_svcvt_f16_f32_m(svfloat16_t inactive, svbool_t pg, svfloat32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f16f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_f64_m(svfloat16_t inactive, svbool_t pg, svfloat64_t op) +svfloat16_t test_svcvt_f16_f64_m(svfloat16_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_f64,_m,)(inactive, pg, op); } @@ -1573,7 +1581,7 @@ svfloat16_t test_svcvt_f16_f64_m(svfloat16_t inactive, svbool_t pg, svfloat64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f16f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_f32_x(svbool_t pg, svfloat32_t op) +svfloat16_t test_svcvt_f16_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_f32,_x,)(pg, op); } @@ -1590,7 +1598,7 @@ svfloat16_t test_svcvt_f16_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f16f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svcvt_f16_f64_x(svbool_t pg, svfloat64_t op) +svfloat16_t test_svcvt_f16_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f16,_f64,_x,)(pg, op); } @@ -1607,7 +1615,7 @@ svfloat16_t test_svcvt_f16_f64_x(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f32f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_f64_z(svbool_t pg, svfloat64_t op) +svfloat32_t test_svcvt_f32_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_f64,_z,)(pg, op); } @@ -1624,7 +1632,7 @@ svfloat32_t test_svcvt_f32_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f32f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_f64_m(svfloat32_t inactive, svbool_t pg, svfloat64_t op) +svfloat32_t test_svcvt_f32_f64_m(svfloat32_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_f64,_m,)(inactive, pg, op); } @@ -1641,7 +1649,7 @@ svfloat32_t test_svcvt_f32_f64_m(svfloat32_t inactive, svbool_t pg, svfloat64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvt.f32f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svcvt_f32_f64_x(svbool_t pg, svfloat64_t op) +svfloat32_t test_svcvt_f32_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvt_f32,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvtnt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvtnt.c index 8772917715a7d31..ce719f92674c045 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvtnt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvtnt.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtnt.bf16f32( [[EVEN:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svcvtnt_bf16_f32_x(svbfloat16_t even, svbool_t pg, svfloat32_t op) { +svbfloat16_t test_svcvtnt_bf16_f32_x(svbfloat16_t even, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvtnt_bf16, _f32, _x, )(even, pg, op); } @@ -43,6 +50,6 @@ svbfloat16_t test_svcvtnt_bf16_f32_x(svbfloat16_t even, svbool_t pg, svfloat32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fcvtnt.bf16f32( [[EVEN:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svcvtnt_bf16_f32_m(svbfloat16_t even, svbool_t pg, svfloat32_t op) { +svbfloat16_t test_svcvtnt_bf16_f32_m(svbfloat16_t even, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svcvtnt_bf16, _f32, _m, )(even, pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_div.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_div.c index 441ce1b7185436e..8755532a43ddbd7 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_div.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_div.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svdiv_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svdiv_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_s32,_z,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svint32_t test_svdiv_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svdiv_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svdiv_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_s64,_z,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svint64_t test_svdiv_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svdiv_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svdiv_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_u32,_z,)(pg, op1, op2); } @@ -85,7 +93,7 @@ svuint32_t test_svdiv_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svdiv_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svdiv_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_u64,_z,)(pg, op1, op2); } @@ -102,7 +110,7 @@ svuint64_t test_svdiv_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdiv_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svdiv_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_s32,_m,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svint32_t test_svdiv_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdiv_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svdiv_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_s64,_m,)(pg, op1, op2); } @@ -136,7 +144,7 @@ svint64_t test_svdiv_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdiv_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svdiv_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_u32,_m,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svuint32_t test_svdiv_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdiv_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svdiv_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_u64,_m,)(pg, op1, op2); } @@ -170,7 +178,7 @@ svuint64_t test_svdiv_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdiv_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svdiv_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_s32,_x,)(pg, op1, op2); } @@ -187,7 +195,7 @@ svint32_t test_svdiv_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdiv_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svdiv_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_s64,_x,)(pg, op1, op2); } @@ -204,7 +212,7 @@ svint64_t test_svdiv_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdiv_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svdiv_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_u32,_x,)(pg, op1, op2); } @@ -221,7 +229,7 @@ svuint32_t test_svdiv_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdiv_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svdiv_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_u64,_x,)(pg, op1, op2); } @@ -244,7 +252,7 @@ svuint64_t test_svdiv_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svdiv_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svdiv_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_s32,_z,)(pg, op1, op2); } @@ -267,7 +275,7 @@ svint32_t test_svdiv_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svdiv_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svdiv_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_s64,_z,)(pg, op1, op2); } @@ -290,7 +298,7 @@ svint64_t test_svdiv_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svdiv_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svdiv_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_u32,_z,)(pg, op1, op2); } @@ -313,7 +321,7 @@ svuint32_t test_svdiv_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svdiv_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svdiv_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_u64,_z,)(pg, op1, op2); } @@ -334,7 +342,7 @@ svuint64_t test_svdiv_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdiv_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svdiv_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_s32,_m,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svdiv_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdiv_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svdiv_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_s64,_m,)(pg, op1, op2); } @@ -376,7 +384,7 @@ svint64_t test_svdiv_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdiv_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svdiv_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_u32,_m,)(pg, op1, op2); } @@ -397,7 +405,7 @@ svuint32_t test_svdiv_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdiv_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svdiv_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_u64,_m,)(pg, op1, op2); } @@ -418,7 +426,7 @@ svuint64_t test_svdiv_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdiv_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svdiv_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_s32,_x,)(pg, op1, op2); } @@ -439,7 +447,7 @@ svint32_t test_svdiv_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdiv_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svdiv_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_s64,_x,)(pg, op1, op2); } @@ -460,7 +468,7 @@ svint64_t test_svdiv_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdiv_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svdiv_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_u32,_x,)(pg, op1, op2); } @@ -481,7 +489,7 @@ svuint32_t test_svdiv_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdiv_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svdiv_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_u64,_x,)(pg, op1, op2); } @@ -500,7 +508,7 @@ svuint64_t test_svdiv_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svdiv_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svdiv_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f16,_z,)(pg, op1, op2); } @@ -519,7 +527,7 @@ svfloat16_t test_svdiv_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svdiv_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svdiv_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f32,_z,)(pg, op1, op2); } @@ -538,7 +546,7 @@ svfloat32_t test_svdiv_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svdiv_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svdiv_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f64,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svfloat64_t test_svdiv_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdiv_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svdiv_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f16,_m,)(pg, op1, op2); } @@ -572,7 +580,7 @@ svfloat16_t test_svdiv_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdiv_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svdiv_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f32,_m,)(pg, op1, op2); } @@ -589,7 +597,7 @@ svfloat32_t test_svdiv_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdiv_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svdiv_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f64,_m,)(pg, op1, op2); } @@ -606,7 +614,7 @@ svfloat64_t test_svdiv_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdiv_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svdiv_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f16,_x,)(pg, op1, op2); } @@ -623,7 +631,7 @@ svfloat16_t test_svdiv_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdiv_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svdiv_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f32,_x,)(pg, op1, op2); } @@ -640,7 +648,7 @@ svfloat32_t test_svdiv_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdiv_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svdiv_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_f64,_x,)(pg, op1, op2); } @@ -663,7 +671,7 @@ svfloat64_t test_svdiv_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svdiv_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svdiv_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f16,_z,)(pg, op1, op2); } @@ -686,7 +694,7 @@ svfloat16_t test_svdiv_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svdiv_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svdiv_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f32,_z,)(pg, op1, op2); } @@ -709,7 +717,7 @@ svfloat32_t test_svdiv_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svdiv_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svdiv_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f64,_z,)(pg, op1, op2); } @@ -730,7 +738,7 @@ svfloat64_t test_svdiv_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdiv_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svdiv_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f16,_m,)(pg, op1, op2); } @@ -751,7 +759,7 @@ svfloat16_t test_svdiv_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdiv_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svdiv_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f32,_m,)(pg, op1, op2); } @@ -772,7 +780,7 @@ svfloat32_t test_svdiv_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdiv_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svdiv_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f64,_m,)(pg, op1, op2); } @@ -793,7 +801,7 @@ svfloat64_t test_svdiv_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdiv_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svdiv_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f16,_x,)(pg, op1, op2); } @@ -814,7 +822,7 @@ svfloat16_t test_svdiv_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdiv_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svdiv_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f32,_x,)(pg, op1, op2); } @@ -835,7 +843,7 @@ svfloat32_t test_svdiv_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdiv_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svdiv_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdiv,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_divr.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_divr.c index d4d0364400e7dae..5f9636d908d512c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_divr.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_divr.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svdivr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svdivr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_s32,_z,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svint32_t test_svdivr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svdivr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svdivr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_s64,_z,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svint64_t test_svdivr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svdivr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svdivr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_u32,_z,)(pg, op1, op2); } @@ -85,7 +93,7 @@ svuint32_t test_svdivr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svdivr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svdivr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_u64,_z,)(pg, op1, op2); } @@ -102,7 +110,7 @@ svuint64_t test_svdivr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdivr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svdivr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_s32,_m,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svint32_t test_svdivr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdivr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svdivr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_s64,_m,)(pg, op1, op2); } @@ -136,7 +144,7 @@ svint64_t test_svdivr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdivr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svdivr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_u32,_m,)(pg, op1, op2); } @@ -153,7 +161,7 @@ svuint32_t test_svdivr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdivr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svdivr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_u64,_m,)(pg, op1, op2); } @@ -170,7 +178,7 @@ svuint64_t test_svdivr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv4i32( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdivr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svdivr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_s32,_x,)(pg, op1, op2); } @@ -187,7 +195,7 @@ svint32_t test_svdivr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv2i64( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdivr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svdivr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_s64,_x,)(pg, op1, op2); } @@ -204,7 +212,7 @@ svint64_t test_svdivr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv4i32( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdivr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svdivr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_u32,_x,)(pg, op1, op2); } @@ -221,7 +229,7 @@ svuint32_t test_svdivr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv2i64( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdivr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svdivr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_u64,_x,)(pg, op1, op2); } @@ -244,7 +252,7 @@ svuint64_t test_svdivr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svdivr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svdivr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_s32,_z,)(pg, op1, op2); } @@ -267,7 +275,7 @@ svint32_t test_svdivr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svdivr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svdivr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_s64,_z,)(pg, op1, op2); } @@ -290,7 +298,7 @@ svint64_t test_svdivr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svdivr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svdivr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_u32,_z,)(pg, op1, op2); } @@ -313,7 +321,7 @@ svuint32_t test_svdivr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svdivr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svdivr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_u64,_z,)(pg, op1, op2); } @@ -334,7 +342,7 @@ svuint64_t test_svdivr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdivr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svdivr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_s32,_m,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svdivr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdivr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdivr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svdivr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_s64,_m,)(pg, op1, op2); } @@ -376,7 +384,7 @@ svint64_t test_svdivr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdivr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svdivr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_u32,_m,)(pg, op1, op2); } @@ -397,7 +405,7 @@ svuint32_t test_svdivr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udivr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdivr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svdivr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_u64,_m,)(pg, op1, op2); } @@ -418,7 +426,7 @@ svuint64_t test_svdivr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdivr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svdivr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_s32,_x,)(pg, op1, op2); } @@ -439,7 +447,7 @@ svint32_t test_svdivr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sdiv.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdivr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svdivr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_s64,_x,)(pg, op1, op2); } @@ -460,7 +468,7 @@ svint64_t test_svdivr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdivr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svdivr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_u32,_x,)(pg, op1, op2); } @@ -481,7 +489,7 @@ svuint32_t test_svdivr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.udiv.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdivr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svdivr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_u64,_x,)(pg, op1, op2); } @@ -500,7 +508,7 @@ svuint64_t test_svdivr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svdivr_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svdivr_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f16,_z,)(pg, op1, op2); } @@ -519,7 +527,7 @@ svfloat16_t test_svdivr_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svdivr_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svdivr_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f32,_z,)(pg, op1, op2); } @@ -538,7 +546,7 @@ svfloat32_t test_svdivr_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svdivr_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svdivr_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f64,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svfloat64_t test_svdivr_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdivr_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svdivr_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f16,_m,)(pg, op1, op2); } @@ -572,7 +580,7 @@ svfloat16_t test_svdivr_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdivr_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svdivr_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f32,_m,)(pg, op1, op2); } @@ -589,7 +597,7 @@ svfloat32_t test_svdivr_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdivr_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svdivr_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f64,_m,)(pg, op1, op2); } @@ -606,7 +614,7 @@ svfloat64_t test_svdivr_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv8f16( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdivr_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svdivr_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f16,_x,)(pg, op1, op2); } @@ -623,7 +631,7 @@ svfloat16_t test_svdivr_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv4f32( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdivr_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svdivr_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f32,_x,)(pg, op1, op2); } @@ -640,7 +648,7 @@ svfloat32_t test_svdivr_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv2f64( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdivr_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svdivr_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_f64,_x,)(pg, op1, op2); } @@ -663,7 +671,7 @@ svfloat64_t test_svdivr_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svdivr_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svdivr_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f16,_z,)(pg, op1, op2); } @@ -686,7 +694,7 @@ svfloat16_t test_svdivr_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svdivr_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svdivr_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f32,_z,)(pg, op1, op2); } @@ -709,7 +717,7 @@ svfloat32_t test_svdivr_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svdivr_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svdivr_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f64,_z,)(pg, op1, op2); } @@ -730,7 +738,7 @@ svfloat64_t test_svdivr_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdivr_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svdivr_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f16,_m,)(pg, op1, op2); } @@ -751,7 +759,7 @@ svfloat16_t test_svdivr_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdivr_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svdivr_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f32,_m,)(pg, op1, op2); } @@ -772,7 +780,7 @@ svfloat32_t test_svdivr_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdivr.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdivr_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svdivr_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f64,_m,)(pg, op1, op2); } @@ -793,7 +801,7 @@ svfloat64_t test_svdivr_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv8f16( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdivr_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svdivr_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f16,_x,)(pg, op1, op2); } @@ -814,7 +822,7 @@ svfloat16_t test_svdivr_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv4f32( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdivr_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svdivr_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f32,_x,)(pg, op1, op2); } @@ -835,7 +843,7 @@ svfloat32_t test_svdivr_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fdiv.u.nxv2f64( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdivr_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svdivr_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svdivr,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dot.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dot.c index 924dd8f0af2627d..3dcd25f8739baef 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dot.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dot.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svdot_s32(svint32_t op1, svint8_t op2, svint8_t op3) +svint32_t test_svdot_s32(svint32_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_s32,,)(op1, op2, op3); } @@ -39,7 +47,7 @@ svint32_t test_svdot_s32(svint32_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svdot_s64(svint64_t op1, svint16_t op2, svint16_t op3) +svint64_t test_svdot_s64(svint64_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_s64,,)(op1, op2, op3); } @@ -54,7 +62,7 @@ svint64_t test_svdot_s64(svint64_t op1, svint16_t op2, svint16_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.udot.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svdot_u32(svuint32_t op1, svuint8_t op2, svuint8_t op3) +svuint32_t test_svdot_u32(svuint32_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_u32,,)(op1, op2, op3); } @@ -69,7 +77,7 @@ svuint32_t test_svdot_u32(svuint32_t op1, svuint8_t op2, svuint8_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.udot.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svdot_u64(svuint64_t op1, svuint16_t op2, svuint16_t op3) +svuint64_t test_svdot_u64(svuint64_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_u64,,)(op1, op2, op3); } @@ -88,7 +96,7 @@ svuint64_t test_svdot_u64(svuint64_t op1, svuint16_t op2, svuint16_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svdot_n_s32(svint32_t op1, svint8_t op2, int8_t op3) +svint32_t test_svdot_n_s32(svint32_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_n_s32,,)(op1, op2, op3); } @@ -107,7 +115,7 @@ svint32_t test_svdot_n_s32(svint32_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svdot_n_s64(svint64_t op1, svint16_t op2, int16_t op3) +svint64_t test_svdot_n_s64(svint64_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_n_s64,,)(op1, op2, op3); } @@ -126,7 +134,7 @@ svint64_t test_svdot_n_s64(svint64_t op1, svint16_t op2, int16_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.udot.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svdot_n_u32(svuint32_t op1, svuint8_t op2, uint8_t op3) +svuint32_t test_svdot_n_u32(svuint32_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_n_u32,,)(op1, op2, op3); } @@ -145,7 +153,7 @@ svuint32_t test_svdot_n_u32(svuint32_t op1, svuint8_t op2, uint8_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.udot.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svdot_n_u64(svuint64_t op1, svuint16_t op2, uint16_t op3) +svuint64_t test_svdot_n_u64(svuint64_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot,_n_u64,,)(op1, op2, op3); } @@ -160,7 +168,7 @@ svuint64_t test_svdot_n_u64(svuint64_t op1, svuint16_t op2, uint16_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.lane.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svdot_lane_s32(svint32_t op1, svint8_t op2, svint8_t op3) +svint32_t test_svdot_lane_s32(svint32_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot_lane,_s32,,)(op1, op2, op3, 0); } @@ -175,7 +183,7 @@ svint32_t test_svdot_lane_s32(svint32_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.lane.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svdot_lane_s32_1(svint32_t op1, svint8_t op2, svint8_t op3) +svint32_t test_svdot_lane_s32_1(svint32_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot_lane,_s32,,)(op1, op2, op3, 3); } @@ -190,7 +198,7 @@ svint32_t test_svdot_lane_s32_1(svint32_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.lane.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svdot_lane_s64(svint64_t op1, svint16_t op2, svint16_t op3) +svint64_t test_svdot_lane_s64(svint64_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot_lane,_s64,,)(op1, op2, op3, 0); } @@ -205,7 +213,7 @@ svint64_t test_svdot_lane_s64(svint64_t op1, svint16_t op2, svint16_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sdot.lane.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svdot_lane_s64_1(svint64_t op1, svint16_t op2, svint16_t op3) +svint64_t test_svdot_lane_s64_1(svint64_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot_lane,_s64,,)(op1, op2, op3, 1); } @@ -220,7 +228,7 @@ svint64_t test_svdot_lane_s64_1(svint64_t op1, svint16_t op2, svint16_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.udot.lane.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svdot_lane_u32(svuint32_t op1, svuint8_t op2, svuint8_t op3) +svuint32_t test_svdot_lane_u32(svuint32_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot_lane,_u32,,)(op1, op2, op3, 3); } @@ -235,7 +243,7 @@ svuint32_t test_svdot_lane_u32(svuint32_t op1, svuint8_t op2, svuint8_t op3) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.udot.lane.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svdot_lane_u64(svuint64_t op1, svuint16_t op2, svuint16_t op3) +svuint64_t test_svdot_lane_u64(svuint64_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svdot_lane,_u64,,)(op1, op2, op3, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup-bfloat.c index 3c459531b7ff242..2e58b503dd81ded 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svdup_n_bf16(bfloat16_t op) { +svbfloat16_t test_svdup_n_bf16(bfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svdup_n_bf16'}} return SVE_ACLE_FUNC(svdup, _n, _bf16, )(op); } @@ -44,7 +52,7 @@ svbfloat16_t test_svdup_n_bf16(bfloat16_t op) { // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8bf16( zeroinitializer, [[TMP0]], bfloat [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svdup_n_bf16_z(svbool_t pg, bfloat16_t op) { +svbfloat16_t test_svdup_n_bf16_z(svbool_t pg, bfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svdup_n_bf16_z'}} return SVE_ACLE_FUNC(svdup, _n, _bf16_z, )(pg, op); } @@ -61,7 +69,7 @@ svbfloat16_t test_svdup_n_bf16_z(svbool_t pg, bfloat16_t op) { // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8bf16( [[INACTIVE:%.*]], [[TMP0]], bfloat [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svdup_n_bf16_m(svbfloat16_t inactive, svbool_t pg, bfloat16_t op) { +svbfloat16_t test_svdup_n_bf16_m(svbfloat16_t inactive, svbool_t pg, bfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svdup_n_bf16_m'}} return SVE_ACLE_FUNC(svdup, _n, _bf16_m, )(inactive, pg, op); } @@ -78,7 +86,7 @@ svbfloat16_t test_svdup_n_bf16_m(svbfloat16_t inactive, svbool_t pg, bfloat16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8bf16( undef, [[TMP0]], bfloat [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svdup_n_bf16_x(svbool_t pg, bfloat16_t op) { +svbfloat16_t test_svdup_n_bf16_x(svbool_t pg, bfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svdup_n_bf16_x'}} return SVE_ACLE_FUNC(svdup, _n, _bf16_x, )(pg, op); } @@ -97,7 +105,7 @@ svbfloat16_t test_svdup_n_bf16_x(svbool_t pg, bfloat16_t op) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8bf16( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svdup_lane_bf16(svbfloat16_t data, uint16_t index) +svbfloat16_t test_svdup_lane_bf16(svbfloat16_t data, uint16_t index) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svdup_lane_bf16'}} return SVE_ACLE_FUNC(svdup_lane,_bf16,,)(data, index); diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup.c index 5294ccbc4ef5026..fec77ceb463ffe2 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dup.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svdup_n_s8(int8_t op) +svint8_t test_svdup_n_s8(int8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s8,)(op); } @@ -43,7 +51,7 @@ svint8_t test_svdup_n_s8(int8_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svdup_n_s16(int16_t op) +svint16_t test_svdup_n_s16(int16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s16,)(op); } @@ -60,7 +68,7 @@ svint16_t test_svdup_n_s16(int16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svdup_n_s32(int32_t op) +svint32_t test_svdup_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s32,)(op); } @@ -77,7 +85,7 @@ svint32_t test_svdup_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svdup_n_s64(int64_t op) +svint64_t test_svdup_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s64,)(op); } @@ -94,7 +102,7 @@ svint64_t test_svdup_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svdup_n_u8(uint8_t op) +svuint8_t test_svdup_n_u8(uint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u8,)(op); } @@ -111,7 +119,7 @@ svuint8_t test_svdup_n_u8(uint8_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svdup_n_u16(uint16_t op) +svuint16_t test_svdup_n_u16(uint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u16,)(op); } @@ -128,7 +136,7 @@ svuint16_t test_svdup_n_u16(uint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svdup_n_u32(uint32_t op) +svuint32_t test_svdup_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u32,)(op); } @@ -145,7 +153,7 @@ svuint32_t test_svdup_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svdup_n_u64(uint64_t op) +svuint64_t test_svdup_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u64,)(op); } @@ -162,7 +170,7 @@ svuint64_t test_svdup_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svdup_n_f16(float16_t op) +svfloat16_t test_svdup_n_f16(float16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f16,)(op); } @@ -179,7 +187,7 @@ svfloat16_t test_svdup_n_f16(float16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svdup_n_f32(float32_t op) +svfloat32_t test_svdup_n_f32(float32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f32,)(op); } @@ -196,7 +204,7 @@ svfloat32_t test_svdup_n_f32(float32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svdup_n_f64(float64_t op) +svfloat64_t test_svdup_n_f64(float64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f64,)(op); } @@ -211,7 +219,7 @@ svfloat64_t test_svdup_n_f64(float64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dup.nxv16i8( zeroinitializer, [[PG:%.*]], i8 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svdup_n_s8_z(svbool_t pg, int8_t op) +svint8_t test_svdup_n_s8_z(svbool_t pg, int8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s8_z,)(pg, op); } @@ -228,7 +236,7 @@ svint8_t test_svdup_n_s8_z(svbool_t pg, int8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8i16( zeroinitializer, [[TMP0]], i16 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svdup_n_s16_z(svbool_t pg, int16_t op) +svint16_t test_svdup_n_s16_z(svbool_t pg, int16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s16_z,)(pg, op); } @@ -245,7 +253,7 @@ svint16_t test_svdup_n_s16_z(svbool_t pg, int16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4i32( zeroinitializer, [[TMP0]], i32 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdup_n_s32_z(svbool_t pg, int32_t op) +svint32_t test_svdup_n_s32_z(svbool_t pg, int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s32_z,)(pg, op); } @@ -262,7 +270,7 @@ svint32_t test_svdup_n_s32_z(svbool_t pg, int32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2i64( zeroinitializer, [[TMP0]], i64 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdup_n_s64_z(svbool_t pg, int64_t op) +svint64_t test_svdup_n_s64_z(svbool_t pg, int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s64_z,)(pg, op); } @@ -277,7 +285,7 @@ svint64_t test_svdup_n_s64_z(svbool_t pg, int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dup.nxv16i8( zeroinitializer, [[PG:%.*]], i8 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svdup_n_u8_z(svbool_t pg, uint8_t op) +svuint8_t test_svdup_n_u8_z(svbool_t pg, uint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u8_z,)(pg, op); } @@ -294,7 +302,7 @@ svuint8_t test_svdup_n_u8_z(svbool_t pg, uint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8i16( zeroinitializer, [[TMP0]], i16 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svdup_n_u16_z(svbool_t pg, uint16_t op) +svuint16_t test_svdup_n_u16_z(svbool_t pg, uint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u16_z,)(pg, op); } @@ -311,7 +319,7 @@ svuint16_t test_svdup_n_u16_z(svbool_t pg, uint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4i32( zeroinitializer, [[TMP0]], i32 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdup_n_u32_z(svbool_t pg, uint32_t op) +svuint32_t test_svdup_n_u32_z(svbool_t pg, uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u32_z,)(pg, op); } @@ -328,7 +336,7 @@ svuint32_t test_svdup_n_u32_z(svbool_t pg, uint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2i64( zeroinitializer, [[TMP0]], i64 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdup_n_u64_z(svbool_t pg, uint64_t op) +svuint64_t test_svdup_n_u64_z(svbool_t pg, uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u64_z,)(pg, op); } @@ -345,7 +353,7 @@ svuint64_t test_svdup_n_u64_z(svbool_t pg, uint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8f16( zeroinitializer, [[TMP0]], half [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdup_n_f16_z(svbool_t pg, float16_t op) +svfloat16_t test_svdup_n_f16_z(svbool_t pg, float16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f16_z,)(pg, op); } @@ -362,7 +370,7 @@ svfloat16_t test_svdup_n_f16_z(svbool_t pg, float16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4f32( zeroinitializer, [[TMP0]], float [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdup_n_f32_z(svbool_t pg, float32_t op) +svfloat32_t test_svdup_n_f32_z(svbool_t pg, float32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f32_z,)(pg, op); } @@ -379,7 +387,7 @@ svfloat32_t test_svdup_n_f32_z(svbool_t pg, float32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2f64( zeroinitializer, [[TMP0]], double [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdup_n_f64_z(svbool_t pg, float64_t op) +svfloat64_t test_svdup_n_f64_z(svbool_t pg, float64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f64_z,)(pg, op); } @@ -394,7 +402,7 @@ svfloat64_t test_svdup_n_f64_z(svbool_t pg, float64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dup.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], i8 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svdup_n_s8_m(svint8_t inactive, svbool_t pg, int8_t op) +svint8_t test_svdup_n_s8_m(svint8_t inactive, svbool_t pg, int8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s8_m,)(inactive, pg, op); } @@ -411,7 +419,7 @@ svint8_t test_svdup_n_s8_m(svint8_t inactive, svbool_t pg, int8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], i16 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svdup_n_s16_m(svint16_t inactive, svbool_t pg, int16_t op) +svint16_t test_svdup_n_s16_m(svint16_t inactive, svbool_t pg, int16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s16_m,)(inactive, pg, op); } @@ -428,7 +436,7 @@ svint16_t test_svdup_n_s16_m(svint16_t inactive, svbool_t pg, int16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], i32 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdup_n_s32_m(svint32_t inactive, svbool_t pg, int32_t op) +svint32_t test_svdup_n_s32_m(svint32_t inactive, svbool_t pg, int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s32_m,)(inactive, pg, op); } @@ -445,7 +453,7 @@ svint32_t test_svdup_n_s32_m(svint32_t inactive, svbool_t pg, int32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], i64 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdup_n_s64_m(svint64_t inactive, svbool_t pg, int64_t op) +svint64_t test_svdup_n_s64_m(svint64_t inactive, svbool_t pg, int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s64_m,)(inactive, pg, op); } @@ -460,7 +468,7 @@ svint64_t test_svdup_n_s64_m(svint64_t inactive, svbool_t pg, int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dup.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], i8 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svdup_n_u8_m(svuint8_t inactive, svbool_t pg, uint8_t op) +svuint8_t test_svdup_n_u8_m(svuint8_t inactive, svbool_t pg, uint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u8_m,)(inactive, pg, op); } @@ -477,7 +485,7 @@ svuint8_t test_svdup_n_u8_m(svuint8_t inactive, svbool_t pg, uint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], i16 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svdup_n_u16_m(svuint16_t inactive, svbool_t pg, uint16_t op) +svuint16_t test_svdup_n_u16_m(svuint16_t inactive, svbool_t pg, uint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u16_m,)(inactive, pg, op); } @@ -494,7 +502,7 @@ svuint16_t test_svdup_n_u16_m(svuint16_t inactive, svbool_t pg, uint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], i32 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdup_n_u32_m(svuint32_t inactive, svbool_t pg, uint32_t op) +svuint32_t test_svdup_n_u32_m(svuint32_t inactive, svbool_t pg, uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u32_m,)(inactive, pg, op); } @@ -511,7 +519,7 @@ svuint32_t test_svdup_n_u32_m(svuint32_t inactive, svbool_t pg, uint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], i64 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdup_n_u64_m(svuint64_t inactive, svbool_t pg, uint64_t op) +svuint64_t test_svdup_n_u64_m(svuint64_t inactive, svbool_t pg, uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u64_m,)(inactive, pg, op); } @@ -528,7 +536,7 @@ svuint64_t test_svdup_n_u64_m(svuint64_t inactive, svbool_t pg, uint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], half [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdup_n_f16_m(svfloat16_t inactive, svbool_t pg, float16_t op) +svfloat16_t test_svdup_n_f16_m(svfloat16_t inactive, svbool_t pg, float16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f16_m,)(inactive, pg, op); } @@ -545,7 +553,7 @@ svfloat16_t test_svdup_n_f16_m(svfloat16_t inactive, svbool_t pg, float16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], float [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdup_n_f32_m(svfloat32_t inactive, svbool_t pg, float32_t op) +svfloat32_t test_svdup_n_f32_m(svfloat32_t inactive, svbool_t pg, float32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f32_m,)(inactive, pg, op); } @@ -562,7 +570,7 @@ svfloat32_t test_svdup_n_f32_m(svfloat32_t inactive, svbool_t pg, float32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], double [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdup_n_f64_m(svfloat64_t inactive, svbool_t pg, float64_t op) +svfloat64_t test_svdup_n_f64_m(svfloat64_t inactive, svbool_t pg, float64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f64_m,)(inactive, pg, op); } @@ -577,7 +585,7 @@ svfloat64_t test_svdup_n_f64_m(svfloat64_t inactive, svbool_t pg, float64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dup.nxv16i8( undef, [[PG:%.*]], i8 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svdup_n_s8_x(svbool_t pg, int8_t op) +svint8_t test_svdup_n_s8_x(svbool_t pg, int8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s8_x,)(pg, op); } @@ -594,7 +602,7 @@ svint8_t test_svdup_n_s8_x(svbool_t pg, int8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8i16( undef, [[TMP0]], i16 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svdup_n_s16_x(svbool_t pg, int16_t op) +svint16_t test_svdup_n_s16_x(svbool_t pg, int16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s16_x,)(pg, op); } @@ -611,7 +619,7 @@ svint16_t test_svdup_n_s16_x(svbool_t pg, int16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4i32( undef, [[TMP0]], i32 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svdup_n_s32_x(svbool_t pg, int32_t op) +svint32_t test_svdup_n_s32_x(svbool_t pg, int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s32_x,)(pg, op); } @@ -628,7 +636,7 @@ svint32_t test_svdup_n_s32_x(svbool_t pg, int32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2i64( undef, [[TMP0]], i64 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svdup_n_s64_x(svbool_t pg, int64_t op) +svint64_t test_svdup_n_s64_x(svbool_t pg, int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_s64_x,)(pg, op); } @@ -643,7 +651,7 @@ svint64_t test_svdup_n_s64_x(svbool_t pg, int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dup.nxv16i8( undef, [[PG:%.*]], i8 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svdup_n_u8_x(svbool_t pg, uint8_t op) +svuint8_t test_svdup_n_u8_x(svbool_t pg, uint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u8_x,)(pg, op); } @@ -660,7 +668,7 @@ svuint8_t test_svdup_n_u8_x(svbool_t pg, uint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8i16( undef, [[TMP0]], i16 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svdup_n_u16_x(svbool_t pg, uint16_t op) +svuint16_t test_svdup_n_u16_x(svbool_t pg, uint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u16_x,)(pg, op); } @@ -677,7 +685,7 @@ svuint16_t test_svdup_n_u16_x(svbool_t pg, uint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4i32( undef, [[TMP0]], i32 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svdup_n_u32_x(svbool_t pg, uint32_t op) +svuint32_t test_svdup_n_u32_x(svbool_t pg, uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u32_x,)(pg, op); } @@ -694,7 +702,7 @@ svuint32_t test_svdup_n_u32_x(svbool_t pg, uint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2i64( undef, [[TMP0]], i64 [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svdup_n_u64_x(svbool_t pg, uint64_t op) +svuint64_t test_svdup_n_u64_x(svbool_t pg, uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_u64_x,)(pg, op); } @@ -711,7 +719,7 @@ svuint64_t test_svdup_n_u64_x(svbool_t pg, uint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv8f16( undef, [[TMP0]], half [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svdup_n_f16_x(svbool_t pg, float16_t op) +svfloat16_t test_svdup_n_f16_x(svbool_t pg, float16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f16_x,)(pg, op); } @@ -728,7 +736,7 @@ svfloat16_t test_svdup_n_f16_x(svbool_t pg, float16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv4f32( undef, [[TMP0]], float [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svdup_n_f32_x(svbool_t pg, float32_t op) +svfloat32_t test_svdup_n_f32_x(svbool_t pg, float32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f32_x,)(pg, op); } @@ -745,7 +753,7 @@ svfloat32_t test_svdup_n_f32_x(svbool_t pg, float32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.dup.nxv2f64( undef, [[TMP0]], double [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svdup_n_f64_x(svbool_t pg, float64_t op) +svfloat64_t test_svdup_n_f64_x(svbool_t pg, float64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_f64_x,)(pg, op); } @@ -764,7 +772,7 @@ svfloat64_t test_svdup_n_f64_x(svbool_t pg, float64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv16i8( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svdup_lane_s8(svint8_t data, uint8_t index) +svint8_t test_svdup_lane_s8(svint8_t data, uint8_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_s8,,)(data, index); } @@ -783,7 +791,7 @@ svint8_t test_svdup_lane_s8(svint8_t data, uint8_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8i16( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svdup_lane_s16(svint16_t data, uint16_t index) +svint16_t test_svdup_lane_s16(svint16_t data, uint16_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_s16,,)(data, index); } @@ -802,7 +810,7 @@ svint16_t test_svdup_lane_s16(svint16_t data, uint16_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv4i32( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svdup_lane_s32(svint32_t data, uint32_t index) +svint32_t test_svdup_lane_s32(svint32_t data, uint32_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_s32,,)(data, index); } @@ -821,7 +829,7 @@ svint32_t test_svdup_lane_s32(svint32_t data, uint32_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv2i64( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svdup_lane_s64(svint64_t data, uint64_t index) +svint64_t test_svdup_lane_s64(svint64_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_s64,,)(data, index); } @@ -840,7 +848,7 @@ svint64_t test_svdup_lane_s64(svint64_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv16i8( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svdup_lane_u8(svuint8_t data, uint8_t index) +svuint8_t test_svdup_lane_u8(svuint8_t data, uint8_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_u8,,)(data, index); } @@ -859,7 +867,7 @@ svuint8_t test_svdup_lane_u8(svuint8_t data, uint8_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8i16( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svdup_lane_u16(svuint16_t data, uint16_t index) +svuint16_t test_svdup_lane_u16(svuint16_t data, uint16_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_u16,,)(data, index); } @@ -878,7 +886,7 @@ svuint16_t test_svdup_lane_u16(svuint16_t data, uint16_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv4i32( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svdup_lane_u32(svuint32_t data, uint32_t index) +svuint32_t test_svdup_lane_u32(svuint32_t data, uint32_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_u32,,)(data, index); } @@ -897,7 +905,7 @@ svuint32_t test_svdup_lane_u32(svuint32_t data, uint32_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv2i64( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svdup_lane_u64(svuint64_t data, uint64_t index) +svuint64_t test_svdup_lane_u64(svuint64_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_u64,,)(data, index); } @@ -916,7 +924,7 @@ svuint64_t test_svdup_lane_u64(svuint64_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8f16( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svdup_lane_f16(svfloat16_t data, uint16_t index) +svfloat16_t test_svdup_lane_f16(svfloat16_t data, uint16_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_f16,,)(data, index); } @@ -935,7 +943,7 @@ svfloat16_t test_svdup_lane_f16(svfloat16_t data, uint16_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv4f32( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svdup_lane_f32(svfloat32_t data, uint32_t index) +svfloat32_t test_svdup_lane_f32(svfloat32_t data, uint32_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_f32,,)(data, index); } @@ -954,7 +962,7 @@ svfloat32_t test_svdup_lane_f32(svfloat32_t data, uint32_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv2f64( [[DATA:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svdup_lane_f64(svfloat64_t data, uint64_t index) +svfloat64_t test_svdup_lane_f64(svfloat64_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdup_lane,_f64,,)(data, index); } @@ -971,7 +979,7 @@ svfloat64_t test_svdup_lane_f64(svfloat64_t data, uint64_t index) // CPP-CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CPP-CHECK-NEXT: ret [[DOTSPLAT]] // -svbool_t test_svdup_n_b8(bool op) +svbool_t test_svdup_n_b8(bool op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_b8,)(op); } @@ -990,7 +998,7 @@ svbool_t test_svdup_n_b8(bool op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svdup_n_b16(bool op) +svbool_t test_svdup_n_b16(bool op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_b16,)(op); } @@ -1009,7 +1017,7 @@ svbool_t test_svdup_n_b16(bool op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svdup_n_b32(bool op) +svbool_t test_svdup_n_b32(bool op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_b32,)(op); } @@ -1028,7 +1036,7 @@ svbool_t test_svdup_n_b32(bool op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svdup_n_b64(bool op) +svbool_t test_svdup_n_b64(bool op) MODE_ATTR { return SVE_ACLE_FUNC(svdup,_n,_b64,)(op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq-bfloat.c index 6534beaf59d260a..45e30aa20f29a7a 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv8bf16( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svdupq_lane_bf16(svbfloat16_t data, uint64_t index) { +svbfloat16_t test_svdupq_lane_bf16(svbfloat16_t data, uint64_t index) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svdupq_lane_bf16'}} return SVE_ACLE_FUNC(svdupq_lane, _bf16, , )(data, index); } @@ -58,7 +66,7 @@ svbfloat16_t test_svdupq_lane_bf16(svbfloat16_t data, uint64_t index) { // CPP-CHECK-NEXT: ret [[TMP9]] // svbfloat16_t test_svdupq_n_bf16(bfloat16_t x0, bfloat16_t x1, bfloat16_t x2, bfloat16_t x3, - bfloat16_t x4, bfloat16_t x5, bfloat16_t x6, bfloat16_t x7) { + bfloat16_t x4, bfloat16_t x5, bfloat16_t x6, bfloat16_t x7) MODE_ATTR { // // expected-warning@+1 {{implicit declaration of function 'svdupq_n_bf16'}} return SVE_ACLE_FUNC(svdupq, _n, _bf16, )(x0, x1, x2, x3, x4, x5, x6, x7); diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq.c index 9c3f4420d449bcd..5671383dc73395e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv16i8( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svdupq_lane_s8(svint8_t data, uint64_t index) +svint8_t test_svdupq_lane_s8(svint8_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_s8,,)(data, index); } @@ -39,7 +47,7 @@ svint8_t test_svdupq_lane_s8(svint8_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv8i16( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svdupq_lane_s16(svint16_t data, uint64_t index) +svint16_t test_svdupq_lane_s16(svint16_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_s16,,)(data, index); } @@ -54,7 +62,7 @@ svint16_t test_svdupq_lane_s16(svint16_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv4i32( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svdupq_lane_s32(svint32_t data, uint64_t index) +svint32_t test_svdupq_lane_s32(svint32_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_s32,,)(data, index); } @@ -69,7 +77,7 @@ svint32_t test_svdupq_lane_s32(svint32_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv2i64( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svdupq_lane_s64(svint64_t data, uint64_t index) +svint64_t test_svdupq_lane_s64(svint64_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_s64,,)(data, index); } @@ -84,7 +92,7 @@ svint64_t test_svdupq_lane_s64(svint64_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv16i8( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svdupq_lane_u8(svuint8_t data, uint64_t index) +svuint8_t test_svdupq_lane_u8(svuint8_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_u8,,)(data, index); } @@ -99,7 +107,7 @@ svuint8_t test_svdupq_lane_u8(svuint8_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv8i16( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svdupq_lane_u16(svuint16_t data, uint64_t index) +svuint16_t test_svdupq_lane_u16(svuint16_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_u16,,)(data, index); } @@ -114,7 +122,7 @@ svuint16_t test_svdupq_lane_u16(svuint16_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv4i32( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svdupq_lane_u32(svuint32_t data, uint64_t index) +svuint32_t test_svdupq_lane_u32(svuint32_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_u32,,)(data, index); } @@ -129,7 +137,7 @@ svuint32_t test_svdupq_lane_u32(svuint32_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv2i64( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svdupq_lane_u64(svuint64_t data, uint64_t index) +svuint64_t test_svdupq_lane_u64(svuint64_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_u64,,)(data, index); } @@ -144,7 +152,7 @@ svuint64_t test_svdupq_lane_u64(svuint64_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv8f16( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svdupq_lane_f16(svfloat16_t data, uint64_t index) +svfloat16_t test_svdupq_lane_f16(svfloat16_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_f16,,)(data, index); } @@ -159,7 +167,7 @@ svfloat16_t test_svdupq_lane_f16(svfloat16_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv4f32( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svdupq_lane_f32(svfloat32_t data, uint64_t index) +svfloat32_t test_svdupq_lane_f32(svfloat32_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_f32,,)(data, index); } @@ -174,7 +182,7 @@ svfloat32_t test_svdupq_lane_f32(svfloat32_t data, uint64_t index) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv2f64( [[DATA:%.*]], i64 [[INDEX:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svdupq_lane_f64(svfloat64_t data, uint64_t index) +svfloat64_t test_svdupq_lane_f64(svfloat64_t data, uint64_t index) MODE_ATTR { return SVE_ACLE_FUNC(svdupq_lane,_f64,,)(data, index); } @@ -226,7 +234,7 @@ svfloat64_t test_svdupq_lane_f64(svfloat64_t data, uint64_t index) svint8_t test_svdupq_n_s8(int8_t x0, int8_t x1, int8_t x2, int8_t x3, int8_t x4, int8_t x5, int8_t x6, int8_t x7, int8_t x8, int8_t x9, int8_t x10, int8_t x11, - int8_t x12, int8_t x13, int8_t x14, int8_t x15) + int8_t x12, int8_t x13, int8_t x14, int8_t x15) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_s8,)(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15); @@ -261,7 +269,7 @@ svint8_t test_svdupq_n_s8(int8_t x0, int8_t x1, int8_t x2, int8_t x3, // CPP-CHECK-NEXT: ret [[TMP9]] // svint16_t test_svdupq_n_s16(int16_t x0, int16_t x1, int16_t x2, int16_t x3, - int16_t x4, int16_t x5, int16_t x6, int16_t x7) + int16_t x4, int16_t x5, int16_t x6, int16_t x7) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_s16,)(x0, x1, x2, x3, x4, x5, x6, x7); @@ -287,7 +295,7 @@ svint16_t test_svdupq_n_s16(int16_t x0, int16_t x1, int16_t x2, int16_t x3, // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv4i32( [[TMP4]], i64 0) // CPP-CHECK-NEXT: ret [[TMP5]] // -svint32_t test_svdupq_n_s32(int32_t x0, int32_t x1, int32_t x2, int32_t x3) +svint32_t test_svdupq_n_s32(int32_t x0, int32_t x1, int32_t x2, int32_t x3) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_s32,)(x0, x1, x2, x3); @@ -309,7 +317,7 @@ svint32_t test_svdupq_n_s32(int32_t x0, int32_t x1, int32_t x2, int32_t x3) // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv2i64( [[TMP2]], i64 0) // CPP-CHECK-NEXT: ret [[TMP3]] // -svint64_t test_svdupq_n_s64(int64_t x0, int64_t x1) +svint64_t test_svdupq_n_s64(int64_t x0, int64_t x1) MODE_ATTR { return SVE_ACLE_FUNC(svdupq,_n,_s64,)(x0, x1); } @@ -361,7 +369,7 @@ svint64_t test_svdupq_n_s64(int64_t x0, int64_t x1) svuint8_t test_svdupq_n_u8(uint8_t x0, uint8_t x1, uint8_t x2, uint8_t x3, uint8_t x4, uint8_t x5, uint8_t x6, uint8_t x7, uint8_t x8, uint8_t x9, uint8_t x10, uint8_t x11, - uint8_t x12, uint8_t x13, uint8_t x14, uint8_t x15) + uint8_t x12, uint8_t x13, uint8_t x14, uint8_t x15) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_u8,)(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15); @@ -396,7 +404,7 @@ svuint8_t test_svdupq_n_u8(uint8_t x0, uint8_t x1, uint8_t x2, uint8_t x3, // CPP-CHECK-NEXT: ret [[TMP9]] // svuint16_t test_svdupq_n_u16(uint16_t x0, uint16_t x1, uint16_t x2, uint16_t x3, - uint16_t x4, uint16_t x5, uint16_t x6, uint16_t x7) + uint16_t x4, uint16_t x5, uint16_t x6, uint16_t x7) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_u16,)(x0, x1, x2, x3, x4, x5, x6, x7); @@ -422,7 +430,7 @@ svuint16_t test_svdupq_n_u16(uint16_t x0, uint16_t x1, uint16_t x2, uint16_t x3, // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv4i32( [[TMP4]], i64 0) // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint32_t test_svdupq_n_u32(uint32_t x0, uint32_t x1, uint32_t x2, uint32_t x3) +svuint32_t test_svdupq_n_u32(uint32_t x0, uint32_t x1, uint32_t x2, uint32_t x3) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_u32,)(x0, x1, x2, x3); @@ -444,7 +452,7 @@ svuint32_t test_svdupq_n_u32(uint32_t x0, uint32_t x1, uint32_t x2, uint32_t x3) // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv2i64( [[TMP2]], i64 0) // CPP-CHECK-NEXT: ret [[TMP3]] // -svuint64_t test_svdupq_n_u64(uint64_t x0, uint64_t x1) +svuint64_t test_svdupq_n_u64(uint64_t x0, uint64_t x1) MODE_ATTR { return SVE_ACLE_FUNC(svdupq,_n,_u64,)(x0, x1); } @@ -478,7 +486,7 @@ svuint64_t test_svdupq_n_u64(uint64_t x0, uint64_t x1) // CPP-CHECK-NEXT: ret [[TMP9]] // svfloat16_t test_svdupq_n_f16(float16_t x0, float16_t x1, float16_t x2, float16_t x3, - float16_t x4, float16_t x5, float16_t x6, float16_t x7) + float16_t x4, float16_t x5, float16_t x6, float16_t x7) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_f16,)(x0, x1, x2, x3, x4, x5, x6, x7); @@ -504,7 +512,7 @@ svfloat16_t test_svdupq_n_f16(float16_t x0, float16_t x1, float16_t x2, float16_ // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv4f32( [[TMP4]], i64 0) // CPP-CHECK-NEXT: ret [[TMP5]] // -svfloat32_t test_svdupq_n_f32(float32_t x0, float32_t x1, float32_t x2, float32_t x3) +svfloat32_t test_svdupq_n_f32(float32_t x0, float32_t x1, float32_t x2, float32_t x3) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_f32,)(x0, x1, x2, x3); @@ -526,7 +534,7 @@ svfloat32_t test_svdupq_n_f32(float32_t x0, float32_t x1, float32_t x2, float32_ // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.aarch64.sve.dupq.lane.nxv2f64( [[TMP2]], i64 0) // CPP-CHECK-NEXT: ret [[TMP3]] // -svfloat64_t test_svdupq_n_f64(float64_t x0, float64_t x1) +svfloat64_t test_svdupq_n_f64(float64_t x0, float64_t x1) MODE_ATTR { return SVE_ACLE_FUNC(svdupq,_n,_f64,)(x0, x1); } @@ -678,7 +686,7 @@ svfloat64_t test_svdupq_n_f64(float64_t x0, float64_t x1) svbool_t test_svdupq_n_b8(bool x0, bool x1, bool x2, bool x3, bool x4, bool x5, bool x6, bool x7, bool x8, bool x9, bool x10, bool x11, - bool x12, bool x13, bool x14, bool x15) + bool x12, bool x13, bool x14, bool x15) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_b8,)(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15); @@ -767,7 +775,7 @@ svbool_t test_svdupq_n_b8(bool x0, bool x1, bool x2, bool x3, // CPP-CHECK-NEXT: ret [[TMP20]] // svbool_t test_svdupq_n_b16(bool x0, bool x1, bool x2, bool x3, - bool x4, bool x5, bool x6, bool x7) + bool x4, bool x5, bool x6, bool x7) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_b16,)(x0, x1, x2, x3, x4, x5, x6, x7); @@ -823,7 +831,7 @@ svbool_t test_svdupq_n_b16(bool x0, bool x1, bool x2, bool x3, // CPP-CHECK-NEXT: [[TMP12:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP11]]) // CPP-CHECK-NEXT: ret [[TMP12]] // -svbool_t test_svdupq_n_b32(bool x0, bool x1, bool x2, bool x3) +svbool_t test_svdupq_n_b32(bool x0, bool x1, bool x2, bool x3) MODE_ATTR { // return SVE_ACLE_FUNC(svdupq,_n,_b32,)(x0, x1, x2, x3); @@ -863,7 +871,7 @@ svbool_t test_svdupq_n_b32(bool x0, bool x1, bool x2, bool x3) // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP7]]) // CPP-CHECK-NEXT: ret [[TMP8]] // -svbool_t test_svdupq_n_b64(bool x0, bool x1) +svbool_t test_svdupq_n_b64(bool x0, bool x1) MODE_ATTR { return SVE_ACLE_FUNC(svdupq,_n,_b64,)(x0, x1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eor.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eor.c index e39012eaed1fa9b..b0107da22fd7e18 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eor.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eor.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_sveor_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_sveor_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_sveor_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_sveor_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_sveor_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_sveor_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_sveor_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_sveor_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_sveor_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_sveor_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_sveor_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_sveor_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_sveor_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_sveor_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_sveor_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_sveor_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_sveor_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_sveor_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_sveor_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_sveor_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_sveor_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_sveor_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_sveor_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_sveor_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_sveor_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_sveor_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_sveor_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_sveor_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_sveor_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_sveor_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_sveor_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_sveor_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_sveor_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_sveor_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_sveor_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_sveor_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_sveor_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_sveor_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_sveor_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_sveor_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_sveor_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_sveor_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_sveor_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_sveor_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_sveor_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_sveor_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_sveor_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_sveor_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_sveor_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_sveor_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_sveor_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_sveor_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_sveor_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_sveor_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_sveor_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_sveor_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_sveor_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_sveor_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_sveor_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_sveor_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_sveor_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_sveor_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_sveor_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_sveor_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_sveor_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_sveor_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_sveor_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_sveor_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_sveor_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_sveor_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_sveor_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_sveor_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_sveor_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_sveor_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_sveor_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_sveor_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_sveor_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_sveor_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_sveor_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_sveor_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_sveor_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_sveor_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_sveor_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_sveor_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_sveor_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_sveor_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_sveor_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_sveor_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_sveor_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_sveor_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_sveor_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_sveor_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_sveor_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_sveor_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_sveor_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_sveor_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_sveor_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_sveor_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_sveor_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_sveor_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_sveor_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_sveor_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_sveor_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_sveor_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_sveor_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_sveor_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_sveor_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_sveor_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_sveor_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_sveor_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_sveor_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_sveor_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_sveor_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_sveor_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_sveor_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_sveor_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_sveor_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_sveor_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_sveor_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_sveor_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_sveor_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_sveor_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_sveor_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_sveor_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_sveor_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_sveor_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_sveor_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_sveor_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_sveor_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_sveor_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_sveor_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_sveor_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_sveor_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_sveor_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_sveor_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_sveor_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_sveor_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_sveor_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_sveor_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_sveor_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_sveor_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.eor.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_sveor_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_sveor_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_n_u64,_x,)(pg, op1, op2); } @@ -944,7 +952,7 @@ svuint64_t test_sveor_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_sveor_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_sveor_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(sveor,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eorv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eorv.c index 98748dade7bb886..ab2ddcd0a7dae81 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eorv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_eorv.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.eorv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_sveorv_s8(svbool_t pg, svint8_t op) +int8_t test_sveorv_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_s8,,)(pg, op); } @@ -41,7 +49,7 @@ int8_t test_sveorv_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.eorv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -int16_t test_sveorv_s16(svbool_t pg, svint16_t op) +int16_t test_sveorv_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_s16,,)(pg, op); } @@ -58,7 +66,7 @@ int16_t test_sveorv_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.eorv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_sveorv_s32(svbool_t pg, svint32_t op) +int32_t test_sveorv_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_s32,,)(pg, op); } @@ -75,7 +83,7 @@ int32_t test_sveorv_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.eorv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_sveorv_s64(svbool_t pg, svint64_t op) +int64_t test_sveorv_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_s64,,)(pg, op); } @@ -90,7 +98,7 @@ int64_t test_sveorv_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.eorv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_sveorv_u8(svbool_t pg, svuint8_t op) +uint8_t test_sveorv_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_u8,,)(pg, op); } @@ -107,7 +115,7 @@ uint8_t test_sveorv_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.eorv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -uint16_t test_sveorv_u16(svbool_t pg, svuint16_t op) +uint16_t test_sveorv_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_u16,,)(pg, op); } @@ -124,7 +132,7 @@ uint16_t test_sveorv_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.eorv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_sveorv_u32(svbool_t pg, svuint32_t op) +uint32_t test_sveorv_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_u32,,)(pg, op); } @@ -141,7 +149,7 @@ uint32_t test_sveorv_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.eorv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_sveorv_u64(svbool_t pg, svuint64_t op) +uint64_t test_sveorv_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(sveorv,_u64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext-bfloat.c index ca25257996982d1..69f7c059527d4cc 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext-bfloat.c @@ -4,9 +4,17 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK -// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv8bf16( [[OP1:%.*]], [[OP2:%.*]], i32 127) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svext_bf16(svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svext_bf16(svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svext_bf16'}} return SVE_ACLE_FUNC(svext,_bf16,,)(op1, op2, 127); diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext.c index 1ccfa8ffd8fc259..e5b8e7e8a270c76 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ext.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv16i8( [[OP1:%.*]], [[OP2:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svext_s8(svint8_t op1, svint8_t op2) +svint8_t test_svext_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s8,,)(op1, op2, 0); } @@ -39,7 +47,7 @@ svint8_t test_svext_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv16i8( [[OP1:%.*]], [[OP2:%.*]], i32 255) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svext_s8_1(svint8_t op1, svint8_t op2) +svint8_t test_svext_s8_1(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s8,,)(op1, op2, 255); } @@ -54,7 +62,7 @@ svint8_t test_svext_s8_1(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv8i16( [[OP1:%.*]], [[OP2:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svext_s16(svint16_t op1, svint16_t op2) +svint16_t test_svext_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s16,,)(op1, op2, 0); } @@ -69,7 +77,7 @@ svint16_t test_svext_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv8i16( [[OP1:%.*]], [[OP2:%.*]], i32 127) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svext_s16_1(svint16_t op1, svint16_t op2) +svint16_t test_svext_s16_1(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s16,,)(op1, op2, 127); } @@ -84,7 +92,7 @@ svint16_t test_svext_s16_1(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svext_s32(svint32_t op1, svint32_t op2) +svint32_t test_svext_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s32,,)(op1, op2, 0); } @@ -99,7 +107,7 @@ svint32_t test_svext_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], i32 63) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svext_s32_1(svint32_t op1, svint32_t op2) +svint32_t test_svext_s32_1(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s32,,)(op1, op2, 63); } @@ -114,7 +122,7 @@ svint32_t test_svext_s32_1(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svext_s64(svint64_t op1, svint64_t op2) +svint64_t test_svext_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s64,,)(op1, op2, 0); } @@ -129,7 +137,7 @@ svint64_t test_svext_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], i32 31) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svext_s64_1(svint64_t op1, svint64_t op2) +svint64_t test_svext_s64_1(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_s64,,)(op1, op2, 31); } @@ -144,7 +152,7 @@ svint64_t test_svext_s64_1(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv16i8( [[OP1:%.*]], [[OP2:%.*]], i32 255) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svext_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svext_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_u8,,)(op1, op2, 255); } @@ -159,7 +167,7 @@ svuint8_t test_svext_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv8i16( [[OP1:%.*]], [[OP2:%.*]], i32 127) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svext_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svext_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_u16,,)(op1, op2, 127); } @@ -174,7 +182,7 @@ svuint16_t test_svext_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv4i32( [[OP1:%.*]], [[OP2:%.*]], i32 63) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svext_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svext_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_u32,,)(op1, op2, 63); } @@ -189,7 +197,7 @@ svuint32_t test_svext_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv2i64( [[OP1:%.*]], [[OP2:%.*]], i32 31) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svext_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svext_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_u64,,)(op1, op2, 31); } @@ -204,7 +212,7 @@ svuint64_t test_svext_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], i32 127) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svext_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svext_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_f16,,)(op1, op2, 127); } @@ -219,7 +227,7 @@ svfloat16_t test_svext_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], i32 63) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svext_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svext_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_f32,,)(op1, op2, 63); } @@ -234,7 +242,7 @@ svfloat32_t test_svext_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ext.nxv2f64( [[OP1:%.*]], [[OP2:%.*]], i32 31) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svext_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svext_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svext,_f64,,)(op1, op2, 31); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extb.c index e9080bc0982fbbf..736b022905d0fa5 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svextb_s16_z(svbool_t pg, svint16_t op) +svint16_t test_svextb_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svint16_t test_svextb_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svextb_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svextb_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svint32_t test_svextb_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svextb_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svextb_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svint64_t test_svextb_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svextb_u16_z(svbool_t pg, svuint16_t op) +svuint16_t test_svextb_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u16,_z,)(pg, op); } @@ -94,7 +102,7 @@ svuint16_t test_svextb_u16_z(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svextb_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svextb_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u32,_z,)(pg, op); } @@ -111,7 +119,7 @@ svuint32_t test_svextb_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svextb_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svextb_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u64,_z,)(pg, op); } @@ -128,7 +136,7 @@ svuint64_t test_svextb_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svextb_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) +svint16_t test_svextb_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s16,_m,)(inactive, pg, op); } @@ -145,7 +153,7 @@ svint16_t test_svextb_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svextb_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svextb_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s32,_m,)(inactive, pg, op); } @@ -162,7 +170,7 @@ svint32_t test_svextb_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svextb_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svextb_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s64,_m,)(inactive, pg, op); } @@ -179,7 +187,7 @@ svint64_t test_svextb_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svextb_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) +svuint16_t test_svextb_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u16,_m,)(inactive, pg, op); } @@ -196,7 +204,7 @@ svuint16_t test_svextb_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svextb_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svextb_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u32,_m,)(inactive, pg, op); } @@ -213,7 +221,7 @@ svuint32_t test_svextb_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svextb_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svextb_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u64,_m,)(inactive, pg, op); } @@ -230,7 +238,7 @@ svuint64_t test_svextb_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svextb_s16_x(svbool_t pg, svint16_t op) +svint16_t test_svextb_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s16,_x,)(pg, op); } @@ -247,7 +255,7 @@ svint16_t test_svextb_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svextb_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svextb_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s32,_x,)(pg, op); } @@ -264,7 +272,7 @@ svint32_t test_svextb_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtb.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svextb_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svextb_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_s64,_x,)(pg, op); } @@ -281,7 +289,7 @@ svint64_t test_svextb_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svextb_u16_x(svbool_t pg, svuint16_t op) +svuint16_t test_svextb_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u16,_x,)(pg, op); } @@ -298,7 +306,7 @@ svuint16_t test_svextb_u16_x(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svextb_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svextb_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u32,_x,)(pg, op); } @@ -315,7 +323,7 @@ svuint32_t test_svextb_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtb.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svextb_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svextb_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextb,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_exth.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_exth.c index 9063c284e036e32..32f7db5afb79faf 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_exth.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_exth.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxth.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svexth_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svexth_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_s32,_z,)(pg, op); } @@ -43,7 +51,7 @@ svint32_t test_svexth_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxth.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svexth_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svexth_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_s64,_z,)(pg, op); } @@ -60,7 +68,7 @@ svint64_t test_svexth_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxth.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svexth_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svexth_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_u32,_z,)(pg, op); } @@ -77,7 +85,7 @@ svuint32_t test_svexth_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxth.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svexth_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svexth_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_u64,_z,)(pg, op); } @@ -94,7 +102,7 @@ svuint64_t test_svexth_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxth.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svexth_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svexth_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_s32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svint32_t test_svexth_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxth.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svexth_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svexth_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_s64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svint64_t test_svexth_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxth.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svexth_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svexth_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_u32,_m,)(inactive, pg, op); } @@ -145,7 +153,7 @@ svuint32_t test_svexth_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxth.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svexth_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svexth_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_u64,_m,)(inactive, pg, op); } @@ -162,7 +170,7 @@ svuint64_t test_svexth_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxth.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svexth_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svexth_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_s32,_x,)(pg, op); } @@ -179,7 +187,7 @@ svint32_t test_svexth_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxth.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svexth_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svexth_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_s64,_x,)(pg, op); } @@ -196,7 +204,7 @@ svint64_t test_svexth_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxth.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svexth_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svexth_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_u32,_x,)(pg, op); } @@ -213,7 +221,7 @@ svuint32_t test_svexth_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxth.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svexth_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svexth_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svexth,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extw.c index e4ec2e1a5556a83..88474236a4bc715 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_extw.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtw.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svextw_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svextw_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextw,_s64,_z,)(pg, op); } @@ -43,7 +51,7 @@ svint64_t test_svextw_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtw.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svextw_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svextw_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextw,_u64,_z,)(pg, op); } @@ -60,7 +68,7 @@ svuint64_t test_svextw_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtw.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svextw_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svextw_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextw,_s64,_m,)(inactive, pg, op); } @@ -77,7 +85,7 @@ svint64_t test_svextw_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtw.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svextw_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svextw_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextw,_u64,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svuint64_t test_svextw_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sxtw.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svextw_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svextw_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextw,_s64,_x,)(pg, op); } @@ -111,7 +119,7 @@ svint64_t test_svextw_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uxtw.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svextw_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svextw_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svextw,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2-bfloat.c index 20073f48b3874d4..eb66fbf05586974 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2.c index a9349f6f460c829..6f1b0e415bfecb8 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get2.c @@ -5,7 +5,9 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include #ifdef SVE_OVERLOADED_FORMS diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3-bfloat.c index da00eb5d243d88e..c89f686c6bd2aee 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3.c index f536bad7cfb2816..a7f74d29ed29040 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get3.c @@ -5,10 +5,12 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4-bfloat.c index 86ee173141efaa2..79eed6912e3cede 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4.c index cdb793ac7438623..278c217a0def417 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_get4.c @@ -5,7 +5,9 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include #ifdef SVE_OVERLOADED_FORMS diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_index.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_index.c index 0a7158e0b92caf5..688ede1fecf90bb 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_index.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_index.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svindex_s8( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv16i8(i8 [[BASE:%.*]], i8 [[STEP:%.*]]) @@ -15,7 +23,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv16i8(i8 [[BASE:%.*]], i8 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svindex_s8(int8_t base, int8_t step) +svint8_t test_svindex_s8(int8_t base, int8_t step) MODE_ATTR { return svindex_s8(base, step); } @@ -30,7 +38,7 @@ svint8_t test_svindex_s8(int8_t base, int8_t step) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv8i16(i16 [[BASE:%.*]], i16 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svindex_s16(int16_t base, int16_t step) +svint16_t test_svindex_s16(int16_t base, int16_t step) MODE_ATTR { return svindex_s16(base, step); } @@ -45,7 +53,7 @@ svint16_t test_svindex_s16(int16_t base, int16_t step) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv4i32(i32 [[BASE:%.*]], i32 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svindex_s32(int32_t base, int32_t step) +svint32_t test_svindex_s32(int32_t base, int32_t step) MODE_ATTR { return svindex_s32(base, step); } @@ -60,7 +68,7 @@ svint32_t test_svindex_s32(int32_t base, int32_t step) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv2i64(i64 [[BASE:%.*]], i64 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svindex_s64(int64_t base, int64_t step) +svint64_t test_svindex_s64(int64_t base, int64_t step) MODE_ATTR { return svindex_s64(base, step); } @@ -75,7 +83,7 @@ svint64_t test_svindex_s64(int64_t base, int64_t step) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv16i8(i8 [[BASE:%.*]], i8 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svindex_u8(uint8_t base, uint8_t step) +svuint8_t test_svindex_u8(uint8_t base, uint8_t step) MODE_ATTR { return svindex_u8(base, step); } @@ -90,7 +98,7 @@ svuint8_t test_svindex_u8(uint8_t base, uint8_t step) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv8i16(i16 [[BASE:%.*]], i16 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svindex_u16(uint16_t base, uint16_t step) +svuint16_t test_svindex_u16(uint16_t base, uint16_t step) MODE_ATTR { return svindex_u16(base, step); } @@ -105,7 +113,7 @@ svuint16_t test_svindex_u16(uint16_t base, uint16_t step) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv4i32(i32 [[BASE:%.*]], i32 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svindex_u32(uint32_t base, uint32_t step) +svuint32_t test_svindex_u32(uint32_t base, uint32_t step) MODE_ATTR { return svindex_u32(base, step); } @@ -120,7 +128,7 @@ svuint32_t test_svindex_u32(uint32_t base, uint32_t step) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.index.nxv2i64(i64 [[BASE:%.*]], i64 [[STEP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svindex_u64(uint64_t base, uint64_t step) +svuint64_t test_svindex_u64(uint64_t base, uint64_t step) MODE_ATTR { return svindex_u64(base, step); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr-bfloat.c index d7e59bf4c72d0e5..f65da9b6140de51 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv8bf16( [[OP1:%.*]], bfloat [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svinsr_n_bf16(svbfloat16_t op1, bfloat16_t op2) { +svbfloat16_t test_svinsr_n_bf16(svbfloat16_t op1, bfloat16_t op2) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svinsr_n_bf16'}} return SVE_ACLE_FUNC(svinsr, _n_bf16, , )(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr.c index cf3409bbfafbc80..fae3220a02f9543 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_insr.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv16i8( [[OP1:%.*]], i8 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svinsr_n_s8(svint8_t op1, int8_t op2) +svint8_t test_svinsr_n_s8(svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svinsr_n_s8(svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv8i16( [[OP1:%.*]], i16 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svinsr_n_s16(svint16_t op1, int16_t op2) +svint16_t test_svinsr_n_s16(svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svinsr_n_s16(svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv4i32( [[OP1:%.*]], i32 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svinsr_n_s32(svint32_t op1, int32_t op2) +svint32_t test_svinsr_n_s32(svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svinsr_n_s32(svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv2i64( [[OP1:%.*]], i64 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svinsr_n_s64(svint64_t op1, int64_t op2) +svint64_t test_svinsr_n_s64(svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svinsr_n_s64(svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv16i8( [[OP1:%.*]], i8 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svinsr_n_u8(svuint8_t op1, uint8_t op2) +svuint8_t test_svinsr_n_u8(svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svinsr_n_u8(svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv8i16( [[OP1:%.*]], i16 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svinsr_n_u16(svuint16_t op1, uint16_t op2) +svuint16_t test_svinsr_n_u16(svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svinsr_n_u16(svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv4i32( [[OP1:%.*]], i32 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svinsr_n_u32(svuint32_t op1, uint32_t op2) +svuint32_t test_svinsr_n_u32(svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svinsr_n_u32(svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv2i64( [[OP1:%.*]], i64 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svinsr_n_u64(svuint64_t op1, uint64_t op2) +svuint64_t test_svinsr_n_u64(svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_u64,,)(op1, op2); } @@ -144,7 +152,7 @@ svuint64_t test_svinsr_n_u64(svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv8f16( [[OP1:%.*]], half [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svinsr_n_f16(svfloat16_t op1, float16_t op2) +svfloat16_t test_svinsr_n_f16(svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_f16,,)(op1, op2); } @@ -159,7 +167,7 @@ svfloat16_t test_svinsr_n_f16(svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv4f32( [[OP1:%.*]], float [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svinsr_n_f32(svfloat32_t op1, float32_t op2) +svfloat32_t test_svinsr_n_f32(svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_f32,,)(op1, op2); } @@ -174,7 +182,7 @@ svfloat32_t test_svinsr_n_f32(svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.insr.nxv2f64( [[OP1:%.*]], double [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svinsr_n_f64(svfloat64_t op1, float64_t op2) +svfloat64_t test_svinsr_n_f64(svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svinsr,_n_f64,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta-bfloat.c index 6d74362e153011b..3ef2a3fc9397c24 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call bfloat @llvm.aarch64.sve.lasta.nxv8bf16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret bfloat [[TMP1]] // -bfloat16_t test_svlasta_bf16(svbool_t pg, svbfloat16_t op) { +bfloat16_t test_svlasta_bf16(svbool_t pg, svbfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svlasta_bf16'}} return SVE_ACLE_FUNC(svlasta, _bf16, , )(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta.c index ba87f343db47334..5db5138981dce5b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.lasta.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svlasta_s8(svbool_t pg, svint8_t op) +int8_t test_svlasta_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_s8,,)(pg, op); } @@ -41,7 +49,7 @@ int8_t test_svlasta_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.lasta.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -int16_t test_svlasta_s16(svbool_t pg, svint16_t op) +int16_t test_svlasta_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_s16,,)(pg, op); } @@ -58,7 +66,7 @@ int16_t test_svlasta_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.lasta.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svlasta_s32(svbool_t pg, svint32_t op) +int32_t test_svlasta_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_s32,,)(pg, op); } @@ -75,7 +83,7 @@ int32_t test_svlasta_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.lasta.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svlasta_s64(svbool_t pg, svint64_t op) +int64_t test_svlasta_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_s64,,)(pg, op); } @@ -90,7 +98,7 @@ int64_t test_svlasta_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.lasta.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svlasta_u8(svbool_t pg, svuint8_t op) +uint8_t test_svlasta_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_u8,,)(pg, op); } @@ -107,7 +115,7 @@ uint8_t test_svlasta_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.lasta.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -uint16_t test_svlasta_u16(svbool_t pg, svuint16_t op) +uint16_t test_svlasta_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_u16,,)(pg, op); } @@ -124,7 +132,7 @@ uint16_t test_svlasta_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.lasta.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svlasta_u32(svbool_t pg, svuint32_t op) +uint32_t test_svlasta_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_u32,,)(pg, op); } @@ -141,7 +149,7 @@ uint32_t test_svlasta_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.lasta.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlasta_u64(svbool_t pg, svuint64_t op) +uint64_t test_svlasta_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_u64,,)(pg, op); } @@ -158,7 +166,7 @@ uint64_t test_svlasta_u64(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.lasta.nxv8f16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svlasta_f16(svbool_t pg, svfloat16_t op) +float16_t test_svlasta_f16(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_f16,,)(pg, op); } @@ -175,7 +183,7 @@ float16_t test_svlasta_f16(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.lasta.nxv4f32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svlasta_f32(svbool_t pg, svfloat32_t op) +float32_t test_svlasta_f32(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_f32,,)(pg, op); } @@ -192,7 +200,7 @@ float32_t test_svlasta_f32(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.lasta.nxv2f64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svlasta_f64(svbool_t pg, svfloat64_t op) +float64_t test_svlasta_f64(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlasta,_f64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb-bfloat.c index 3532f628593a318..d2caab2bd5dfec1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call bfloat @llvm.aarch64.sve.lastb.nxv8bf16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret bfloat [[TMP1]] // -bfloat16_t test_svlastb_bf16(svbool_t pg, svbfloat16_t op) { +bfloat16_t test_svlastb_bf16(svbool_t pg, svbfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svlastb_bf16'}} return SVE_ACLE_FUNC(svlastb, _bf16, , )(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb.c index 669c07511f63923..ce87ff77c2c8398 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lastb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.lastb.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svlastb_s8(svbool_t pg, svint8_t op) +int8_t test_svlastb_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_s8,,)(pg, op); } @@ -41,7 +49,7 @@ int8_t test_svlastb_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.lastb.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -int16_t test_svlastb_s16(svbool_t pg, svint16_t op) +int16_t test_svlastb_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_s16,,)(pg, op); } @@ -58,7 +66,7 @@ int16_t test_svlastb_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.lastb.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svlastb_s32(svbool_t pg, svint32_t op) +int32_t test_svlastb_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_s32,,)(pg, op); } @@ -75,7 +83,7 @@ int32_t test_svlastb_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.lastb.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svlastb_s64(svbool_t pg, svint64_t op) +int64_t test_svlastb_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_s64,,)(pg, op); } @@ -90,7 +98,7 @@ int64_t test_svlastb_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.lastb.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svlastb_u8(svbool_t pg, svuint8_t op) +uint8_t test_svlastb_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_u8,,)(pg, op); } @@ -107,7 +115,7 @@ uint8_t test_svlastb_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.lastb.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -uint16_t test_svlastb_u16(svbool_t pg, svuint16_t op) +uint16_t test_svlastb_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_u16,,)(pg, op); } @@ -124,7 +132,7 @@ uint16_t test_svlastb_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.lastb.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svlastb_u32(svbool_t pg, svuint32_t op) +uint32_t test_svlastb_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_u32,,)(pg, op); } @@ -141,7 +149,7 @@ uint32_t test_svlastb_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.lastb.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlastb_u64(svbool_t pg, svuint64_t op) +uint64_t test_svlastb_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_u64,,)(pg, op); } @@ -158,7 +166,7 @@ uint64_t test_svlastb_u64(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.lastb.nxv8f16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svlastb_f16(svbool_t pg, svfloat16_t op) +float16_t test_svlastb_f16(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_f16,,)(pg, op); } @@ -175,7 +183,7 @@ float16_t test_svlastb_f16(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.lastb.nxv4f32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svlastb_f32(svbool_t pg, svfloat32_t op) +float32_t test_svlastb_f32(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_f32,,)(pg, op); } @@ -192,7 +200,7 @@ float32_t test_svlastb_f32(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.lastb.nxv2f64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svlastb_f64(svbool_t pg, svfloat64_t op) +float64_t test_svlastb_f64(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlastb,_f64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1-bfloat.c index 38d88b483968df9..cbc645d429e5cbd 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1-bfloat.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -27,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv8bf16.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svld1_bf16(svbool_t pg, const bfloat16_t *base) +svbfloat16_t test_svld1_bf16(svbool_t pg, const bfloat16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_bf16,,)(pg, base); } @@ -52,7 +59,7 @@ svbfloat16_t test_svld1_bf16(svbool_t pg, const bfloat16_t *base) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv8bf16.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svbfloat16_t test_svld1_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) +svbfloat16_t test_svld1_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_bf16,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1.c index d355ea192802764..0c5ab6c9aea9f97 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.masked.load.nxv16i8.p0(ptr [[BASE:%.*]], i32 1, [[PG:%.*]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svld1_s8(svbool_t pg, const int8_t *base) +svint8_t test_svld1_s8(svbool_t pg, const int8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_s8,,)(pg, base); } @@ -41,7 +49,7 @@ svint8_t test_svld1_s8(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv8i16.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svld1_s16(svbool_t pg, const int16_t *base) +svint16_t test_svld1_s16(svbool_t pg, const int16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_s16,,)(pg, base); } @@ -58,7 +66,7 @@ svint16_t test_svld1_s16(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv4i32.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svld1_s32(svbool_t pg, const int32_t *base) +svint32_t test_svld1_s32(svbool_t pg, const int32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_s32,,)(pg, base); } @@ -75,7 +83,7 @@ svint32_t test_svld1_s32(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv2i64.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svld1_s64(svbool_t pg, const int64_t *base) +svint64_t test_svld1_s64(svbool_t pg, const int64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_s64,,)(pg, base); } @@ -90,7 +98,7 @@ svint64_t test_svld1_s64(svbool_t pg, const int64_t *base) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.masked.load.nxv16i8.p0(ptr [[BASE:%.*]], i32 1, [[PG:%.*]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svld1_u8(svbool_t pg, const uint8_t *base) +svuint8_t test_svld1_u8(svbool_t pg, const uint8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_u8,,)(pg, base); } @@ -107,7 +115,7 @@ svuint8_t test_svld1_u8(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv8i16.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svld1_u16(svbool_t pg, const uint16_t *base) +svuint16_t test_svld1_u16(svbool_t pg, const uint16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_u16,,)(pg, base); } @@ -124,7 +132,7 @@ svuint16_t test_svld1_u16(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv4i32.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svld1_u32(svbool_t pg, const uint32_t *base) +svuint32_t test_svld1_u32(svbool_t pg, const uint32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_u32,,)(pg, base); } @@ -141,7 +149,7 @@ svuint32_t test_svld1_u32(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv2i64.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svld1_u64(svbool_t pg, const uint64_t *base) +svuint64_t test_svld1_u64(svbool_t pg, const uint64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_u64,,)(pg, base); } @@ -158,7 +166,7 @@ svuint64_t test_svld1_u64(svbool_t pg, const uint64_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv8f16.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svld1_f16(svbool_t pg, const float16_t *base) +svfloat16_t test_svld1_f16(svbool_t pg, const float16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_f16,,)(pg, base); } @@ -175,7 +183,7 @@ svfloat16_t test_svld1_f16(svbool_t pg, const float16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv4f32.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svld1_f32(svbool_t pg, const float32_t *base) +svfloat32_t test_svld1_f32(svbool_t pg, const float32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_f32,,)(pg, base); } @@ -192,7 +200,7 @@ svfloat32_t test_svld1_f32(svbool_t pg, const float32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.masked.load.nxv2f64.p0(ptr [[BASE:%.*]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svld1_f64(svbool_t pg, const float64_t *base) +svfloat64_t test_svld1_f64(svbool_t pg, const float64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1,_f64,,)(pg, base); } @@ -215,7 +223,7 @@ svfloat64_t test_svld1_f64(svbool_t pg, const float64_t *base) // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.masked.load.nxv16i8.p0(ptr [[TMP2]], i32 1, [[PG:%.*]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP3]] // -svint8_t test_svld1_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) +svint8_t test_svld1_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_s8,,)(pg, base, vnum); } @@ -240,7 +248,7 @@ svint8_t test_svld1_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv8i16.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svint16_t test_svld1_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) +svint16_t test_svld1_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_s16,,)(pg, base, vnum); } @@ -265,7 +273,7 @@ svint16_t test_svld1_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv4i32.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svint32_t test_svld1_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) +svint32_t test_svld1_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_s32,,)(pg, base, vnum); } @@ -290,7 +298,7 @@ svint32_t test_svld1_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv2i64.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svint64_t test_svld1_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) +svint64_t test_svld1_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_s64,,)(pg, base, vnum); } @@ -313,7 +321,7 @@ svint64_t test_svld1_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.masked.load.nxv16i8.p0(ptr [[TMP2]], i32 1, [[PG:%.*]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP3]] // -svuint8_t test_svld1_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint8_t test_svld1_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_u8,,)(pg, base, vnum); } @@ -338,7 +346,7 @@ svuint8_t test_svld1_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv8i16.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svuint16_t test_svld1_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) +svuint16_t test_svld1_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_u16,,)(pg, base, vnum); } @@ -363,7 +371,7 @@ svuint16_t test_svld1_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv4i32.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svuint32_t test_svld1_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) +svuint32_t test_svld1_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_u32,,)(pg, base, vnum); } @@ -388,7 +396,7 @@ svuint32_t test_svld1_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv2i64.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svuint64_t test_svld1_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) +svuint64_t test_svld1_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_u64,,)(pg, base, vnum); } @@ -413,7 +421,7 @@ svuint64_t test_svld1_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv8f16.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svfloat16_t test_svld1_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) +svfloat16_t test_svld1_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_f16,,)(pg, base, vnum); } @@ -438,7 +446,7 @@ svfloat16_t test_svld1_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv4f32.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svfloat32_t test_svld1_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) +svfloat32_t test_svld1_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_f32,,)(pg, base, vnum); } @@ -463,11 +471,13 @@ svfloat32_t test_svld1_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.masked.load.nxv2f64.p0(ptr [[TMP3]], i32 1, [[TMP0]], zeroinitializer) // CPP-CHECK-NEXT: ret [[TMP4]] // -svfloat64_t test_svld1_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) +svfloat64_t test_svld1_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld1_vnum,_f64,,)(pg, base, vnum); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svld1_gather_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -1152,3 +1162,4 @@ svfloat64_t test_svld1_gather_u64base_index_f64(svbool_t pg, svuint64_t bases, i return SVE_ACLE_FUNC(svld1_gather, _u64base, _index_f64, )(pg, bases, index); } +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq-bfloat.c index c015614056e7e1e..d50b0269e5297b5 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq-bfloat.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -27,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv8bf16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svld1rq_bf16(svbool_t pg, const bfloat16_t *base) +svbfloat16_t test_svld1rq_bf16(svbool_t pg, const bfloat16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_bf16,,)(pg, base); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq.c index 66528ae771af46a..9784e1b6b80015e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1rq.c @@ -5,9 +5,17 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv16i8( [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svld1rq_s8(svbool_t pg, const int8_t *base) +svint8_t test_svld1rq_s8(svbool_t pg, const int8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_s8,,)(pg, base); } @@ -42,7 +50,7 @@ svint8_t test_svld1rq_s8(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv8i16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svld1rq_s16(svbool_t pg, const int16_t *base) +svint16_t test_svld1rq_s16(svbool_t pg, const int16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_s16,,)(pg, base); } @@ -59,7 +67,7 @@ svint16_t test_svld1rq_s16(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv4i32( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svld1rq_s32(svbool_t pg, const int32_t *base) +svint32_t test_svld1rq_s32(svbool_t pg, const int32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_s32,,)(pg, base); } @@ -76,7 +84,7 @@ svint32_t test_svld1rq_s32(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv2i64( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svld1rq_s64(svbool_t pg, const int64_t *base) +svint64_t test_svld1rq_s64(svbool_t pg, const int64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_s64,,)(pg, base); } @@ -91,7 +99,7 @@ svint64_t test_svld1rq_s64(svbool_t pg, const int64_t *base) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv16i8( [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svld1rq_u8(svbool_t pg, const uint8_t *base) +svuint8_t test_svld1rq_u8(svbool_t pg, const uint8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_u8,,)(pg, base); } @@ -108,7 +116,7 @@ svuint8_t test_svld1rq_u8(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv8i16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svld1rq_u16(svbool_t pg, const uint16_t *base) +svuint16_t test_svld1rq_u16(svbool_t pg, const uint16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_u16,,)(pg, base); } @@ -125,7 +133,7 @@ svuint16_t test_svld1rq_u16(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv4i32( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svld1rq_u32(svbool_t pg, const uint32_t *base) +svuint32_t test_svld1rq_u32(svbool_t pg, const uint32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_u32,,)(pg, base); } @@ -142,7 +150,7 @@ svuint32_t test_svld1rq_u32(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv2i64( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svld1rq_u64(svbool_t pg, const uint64_t *base) +svuint64_t test_svld1rq_u64(svbool_t pg, const uint64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_u64,,)(pg, base); } @@ -159,7 +167,7 @@ svuint64_t test_svld1rq_u64(svbool_t pg, const uint64_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv8f16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svld1rq_f16(svbool_t pg, const float16_t *base) +svfloat16_t test_svld1rq_f16(svbool_t pg, const float16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_f16,,)(pg, base); } @@ -176,7 +184,7 @@ svfloat16_t test_svld1rq_f16(svbool_t pg, const float16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv4f32( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svld1rq_f32(svbool_t pg, const float32_t *base) +svfloat32_t test_svld1rq_f32(svbool_t pg, const float32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_f32,,)(pg, base); } @@ -193,7 +201,7 @@ svfloat32_t test_svld1rq_f32(svbool_t pg, const float32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ld1rq.nxv2f64( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svld1rq_f64(svbool_t pg, const float64_t *base) +svfloat64_t test_svld1rq_f64(svbool_t pg, const float64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld1rq,_f64,,)(pg, base); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sb.c index 560a18146b08997..59d1e103db389b2 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svld1sb_s16(svbool_t pg, const int8_t *base) +svint16_t test_svld1sb_s16(svbool_t pg, const int8_t *base) MODE_ATTR { return svld1sb_s16(pg, base); } @@ -47,7 +55,7 @@ svint16_t test_svld1sb_s16(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svld1sb_s32(svbool_t pg, const int8_t *base) +svint32_t test_svld1sb_s32(svbool_t pg, const int8_t *base) MODE_ATTR { return svld1sb_s32(pg, base); } @@ -66,7 +74,7 @@ svint32_t test_svld1sb_s32(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svld1sb_s64(svbool_t pg, const int8_t *base) +svint64_t test_svld1sb_s64(svbool_t pg, const int8_t *base) MODE_ATTR { return svld1sb_s64(pg, base); } @@ -85,7 +93,7 @@ svint64_t test_svld1sb_s64(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svld1sb_u16(svbool_t pg, const int8_t *base) +svuint16_t test_svld1sb_u16(svbool_t pg, const int8_t *base) MODE_ATTR { return svld1sb_u16(pg, base); } @@ -104,7 +112,7 @@ svuint16_t test_svld1sb_u16(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svld1sb_u32(svbool_t pg, const int8_t *base) +svuint32_t test_svld1sb_u32(svbool_t pg, const int8_t *base) MODE_ATTR { return svld1sb_u32(pg, base); } @@ -123,7 +131,7 @@ svuint32_t test_svld1sb_u32(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svld1sb_u64(svbool_t pg, const int8_t *base) +svuint64_t test_svld1sb_u64(svbool_t pg, const int8_t *base) MODE_ATTR { return svld1sb_u64(pg, base); } @@ -150,7 +158,7 @@ svuint64_t test_svld1sb_u64(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint16_t test_svld1sb_vnum_s16(svbool_t pg, const int8_t *base, int64_t vnum) +svint16_t test_svld1sb_vnum_s16(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return svld1sb_vnum_s16(pg, base, vnum); } @@ -177,7 +185,7 @@ svint16_t test_svld1sb_vnum_s16(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint32_t test_svld1sb_vnum_s32(svbool_t pg, const int8_t *base, int64_t vnum) +svint32_t test_svld1sb_vnum_s32(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return svld1sb_vnum_s32(pg, base, vnum); } @@ -204,7 +212,7 @@ svint32_t test_svld1sb_vnum_s32(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint64_t test_svld1sb_vnum_s64(svbool_t pg, const int8_t *base, int64_t vnum) +svint64_t test_svld1sb_vnum_s64(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return svld1sb_vnum_s64(pg, base, vnum); } @@ -231,7 +239,7 @@ svint64_t test_svld1sb_vnum_s64(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint16_t test_svld1sb_vnum_u16(svbool_t pg, const int8_t *base, int64_t vnum) +svuint16_t test_svld1sb_vnum_u16(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return svld1sb_vnum_u16(pg, base, vnum); } @@ -258,7 +266,7 @@ svuint16_t test_svld1sb_vnum_u16(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint32_t test_svld1sb_vnum_u32(svbool_t pg, const int8_t *base, int64_t vnum) +svuint32_t test_svld1sb_vnum_u32(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return svld1sb_vnum_u32(pg, base, vnum); } @@ -285,11 +293,13 @@ svuint32_t test_svld1sb_vnum_u32(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint64_t test_svld1sb_vnum_u64(svbool_t pg, const int8_t *base, int64_t vnum) +svuint64_t test_svld1sb_vnum_u64(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return svld1sb_vnum_u64(pg, base, vnum); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svld1sb_gather_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -577,3 +587,5 @@ svuint32_t test_svld1sb_gather_u32base_offset_u32(svbool_t pg, svuint32_t bases, svuint64_t test_svld1sb_gather_u64base_offset_u64(svbool_t pg, svuint64_t bases, int64_t offset) { return SVE_ACLE_FUNC(svld1sb_gather, _u64base, _offset_u64, )(pg, bases, offset); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sh.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sh.c index b2f16463576967e..1df3f6adbc1c657 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sh.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sh.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svld1sh_s32(svbool_t pg, const int16_t *base) +svint32_t test_svld1sh_s32(svbool_t pg, const int16_t *base) MODE_ATTR { return svld1sh_s32(pg, base); } @@ -47,7 +55,7 @@ svint32_t test_svld1sh_s32(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svld1sh_s64(svbool_t pg, const int16_t *base) +svint64_t test_svld1sh_s64(svbool_t pg, const int16_t *base) MODE_ATTR { return svld1sh_s64(pg, base); } @@ -66,7 +74,7 @@ svint64_t test_svld1sh_s64(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svld1sh_u32(svbool_t pg, const int16_t *base) +svuint32_t test_svld1sh_u32(svbool_t pg, const int16_t *base) MODE_ATTR { return svld1sh_u32(pg, base); } @@ -85,7 +93,7 @@ svuint32_t test_svld1sh_u32(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svld1sh_u64(svbool_t pg, const int16_t *base) +svuint64_t test_svld1sh_u64(svbool_t pg, const int16_t *base) MODE_ATTR { return svld1sh_u64(pg, base); } @@ -112,7 +120,7 @@ svuint64_t test_svld1sh_u64(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint32_t test_svld1sh_vnum_s32(svbool_t pg, const int16_t *base, int64_t vnum) +svint32_t test_svld1sh_vnum_s32(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return svld1sh_vnum_s32(pg, base, vnum); } @@ -139,7 +147,7 @@ svint32_t test_svld1sh_vnum_s32(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint64_t test_svld1sh_vnum_s64(svbool_t pg, const int16_t *base, int64_t vnum) +svint64_t test_svld1sh_vnum_s64(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return svld1sh_vnum_s64(pg, base, vnum); } @@ -166,7 +174,7 @@ svint64_t test_svld1sh_vnum_s64(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint32_t test_svld1sh_vnum_u32(svbool_t pg, const int16_t *base, int64_t vnum) +svuint32_t test_svld1sh_vnum_u32(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return svld1sh_vnum_u32(pg, base, vnum); } @@ -193,11 +201,13 @@ svuint32_t test_svld1sh_vnum_u32(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint64_t test_svld1sh_vnum_u64(svbool_t pg, const int16_t *base, int64_t vnum) +svuint64_t test_svld1sh_vnum_u64(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return svld1sh_vnum_u64(pg, base, vnum); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svld1sh_gather_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -709,3 +719,5 @@ svuint32_t test_svld1sh_gather_u32base_index_u32(svbool_t pg, svuint32_t bases, svuint64_t test_svld1sh_gather_u64base_index_u64(svbool_t pg, svuint64_t bases, int64_t index) { return SVE_ACLE_FUNC(svld1sh_gather, _u64base, _index_u64, )(pg, bases, index); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sw.c index 42cc5bf83a4a467..e7d77e62d44c1be 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1sw.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svld1sw_s64(svbool_t pg, const int32_t *base) +svint64_t test_svld1sw_s64(svbool_t pg, const int32_t *base) MODE_ATTR { return svld1sw_s64(pg, base); } @@ -47,7 +55,7 @@ svint64_t test_svld1sw_s64(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = sext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svld1sw_u64(svbool_t pg, const int32_t *base) +svuint64_t test_svld1sw_u64(svbool_t pg, const int32_t *base) MODE_ATTR { return svld1sw_u64(pg, base); } @@ -74,7 +82,7 @@ svuint64_t test_svld1sw_u64(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint64_t test_svld1sw_vnum_s64(svbool_t pg, const int32_t *base, int64_t vnum) +svint64_t test_svld1sw_vnum_s64(svbool_t pg, const int32_t *base, int64_t vnum) MODE_ATTR { return svld1sw_vnum_s64(pg, base, vnum); } @@ -101,11 +109,13 @@ svint64_t test_svld1sw_vnum_s64(svbool_t pg, const int32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = sext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint64_t test_svld1sw_vnum_u64(svbool_t pg, const int32_t *base, int64_t vnum) +svuint64_t test_svld1sw_vnum_u64(svbool_t pg, const int32_t *base, int64_t vnum) MODE_ATTR { return svld1sw_vnum_u64(pg, base, vnum); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svld1sw_gather_u64base_s64( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG:%.*]]) @@ -361,3 +371,5 @@ svint64_t test_svld1sw_gather_u64base_index_s64(svbool_t pg, svuint64_t bases, i svuint64_t test_svld1sw_gather_u64base_index_u64(svbool_t pg, svuint64_t bases, int64_t index) { return SVE_ACLE_FUNC(svld1sw_gather, _u64base, _index_u64, )(pg, bases, index); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1ub.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1ub.c index 50f81d1614af1d4..31906b4e5f646a4 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1ub.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1ub.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svld1ub_s16(svbool_t pg, const uint8_t *base) +svint16_t test_svld1ub_s16(svbool_t pg, const uint8_t *base) MODE_ATTR { return svld1ub_s16(pg, base); } @@ -47,7 +55,7 @@ svint16_t test_svld1ub_s16(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svld1ub_s32(svbool_t pg, const uint8_t *base) +svint32_t test_svld1ub_s32(svbool_t pg, const uint8_t *base) MODE_ATTR { return svld1ub_s32(pg, base); } @@ -66,7 +74,7 @@ svint32_t test_svld1ub_s32(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svld1ub_s64(svbool_t pg, const uint8_t *base) +svint64_t test_svld1ub_s64(svbool_t pg, const uint8_t *base) MODE_ATTR { return svld1ub_s64(pg, base); } @@ -85,7 +93,7 @@ svint64_t test_svld1ub_s64(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svld1ub_u16(svbool_t pg, const uint8_t *base) +svuint16_t test_svld1ub_u16(svbool_t pg, const uint8_t *base) MODE_ATTR { return svld1ub_u16(pg, base); } @@ -104,7 +112,7 @@ svuint16_t test_svld1ub_u16(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svld1ub_u32(svbool_t pg, const uint8_t *base) +svuint32_t test_svld1ub_u32(svbool_t pg, const uint8_t *base) MODE_ATTR { return svld1ub_u32(pg, base); } @@ -123,7 +131,7 @@ svuint32_t test_svld1ub_u32(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svld1ub_u64(svbool_t pg, const uint8_t *base) +svuint64_t test_svld1ub_u64(svbool_t pg, const uint8_t *base) MODE_ATTR { return svld1ub_u64(pg, base); } @@ -150,7 +158,7 @@ svuint64_t test_svld1ub_u64(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint16_t test_svld1ub_vnum_s16(svbool_t pg, const uint8_t *base, int64_t vnum) +svint16_t test_svld1ub_vnum_s16(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return svld1ub_vnum_s16(pg, base, vnum); } @@ -177,7 +185,7 @@ svint16_t test_svld1ub_vnum_s16(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint32_t test_svld1ub_vnum_s32(svbool_t pg, const uint8_t *base, int64_t vnum) +svint32_t test_svld1ub_vnum_s32(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return svld1ub_vnum_s32(pg, base, vnum); } @@ -204,7 +212,7 @@ svint32_t test_svld1ub_vnum_s32(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint64_t test_svld1ub_vnum_s64(svbool_t pg, const uint8_t *base, int64_t vnum) +svint64_t test_svld1ub_vnum_s64(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return svld1ub_vnum_s64(pg, base, vnum); } @@ -231,7 +239,7 @@ svint64_t test_svld1ub_vnum_s64(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint16_t test_svld1ub_vnum_u16(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint16_t test_svld1ub_vnum_u16(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return svld1ub_vnum_u16(pg, base, vnum); } @@ -258,7 +266,7 @@ svuint16_t test_svld1ub_vnum_u16(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint32_t test_svld1ub_vnum_u32(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint32_t test_svld1ub_vnum_u32(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return svld1ub_vnum_u32(pg, base, vnum); } @@ -285,11 +293,13 @@ svuint32_t test_svld1ub_vnum_u32(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint64_t test_svld1ub_vnum_u64(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint64_t test_svld1ub_vnum_u64(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return svld1ub_vnum_u64(pg, base, vnum); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svld1ub_gather_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -577,3 +587,5 @@ svuint32_t test_svld1ub_gather_u32base_offset_u32(svbool_t pg, svuint32_t bases, svuint64_t test_svld1ub_gather_u64base_offset_u64(svbool_t pg, svuint64_t bases, int64_t offset) { return SVE_ACLE_FUNC(svld1ub_gather, _u64base, _offset_u64, )(pg, bases, offset); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uh.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uh.c index 2efccced81f9ca7..e6553e193109f83 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uh.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uh.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svld1uh_s32(svbool_t pg, const uint16_t *base) +svint32_t test_svld1uh_s32(svbool_t pg, const uint16_t *base) MODE_ATTR { return svld1uh_s32(pg, base); } @@ -47,7 +55,7 @@ svint32_t test_svld1uh_s32(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svld1uh_s64(svbool_t pg, const uint16_t *base) +svint64_t test_svld1uh_s64(svbool_t pg, const uint16_t *base) MODE_ATTR { return svld1uh_s64(pg, base); } @@ -66,7 +74,7 @@ svint64_t test_svld1uh_s64(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svld1uh_u32(svbool_t pg, const uint16_t *base) +svuint32_t test_svld1uh_u32(svbool_t pg, const uint16_t *base) MODE_ATTR { return svld1uh_u32(pg, base); } @@ -85,7 +93,7 @@ svuint32_t test_svld1uh_u32(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svld1uh_u64(svbool_t pg, const uint16_t *base) +svuint64_t test_svld1uh_u64(svbool_t pg, const uint16_t *base) MODE_ATTR { return svld1uh_u64(pg, base); } @@ -112,7 +120,7 @@ svuint64_t test_svld1uh_u64(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint32_t test_svld1uh_vnum_s32(svbool_t pg, const uint16_t *base, int64_t vnum) +svint32_t test_svld1uh_vnum_s32(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return svld1uh_vnum_s32(pg, base, vnum); } @@ -139,7 +147,7 @@ svint32_t test_svld1uh_vnum_s32(svbool_t pg, const uint16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint64_t test_svld1uh_vnum_s64(svbool_t pg, const uint16_t *base, int64_t vnum) +svint64_t test_svld1uh_vnum_s64(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return svld1uh_vnum_s64(pg, base, vnum); } @@ -166,7 +174,7 @@ svint64_t test_svld1uh_vnum_s64(svbool_t pg, const uint16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint32_t test_svld1uh_vnum_u32(svbool_t pg, const uint16_t *base, int64_t vnum) +svuint32_t test_svld1uh_vnum_u32(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return svld1uh_vnum_u32(pg, base, vnum); } @@ -193,11 +201,13 @@ svuint32_t test_svld1uh_vnum_u32(svbool_t pg, const uint16_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint64_t test_svld1uh_vnum_u64(svbool_t pg, const uint16_t *base, int64_t vnum) +svuint64_t test_svld1uh_vnum_u64(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return svld1uh_vnum_u64(pg, base, vnum); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svld1uh_gather_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -709,3 +719,5 @@ svuint32_t test_svld1uh_gather_u32base_index_u32(svbool_t pg, svuint32_t bases, svuint64_t test_svld1uh_gather_u64base_index_u64(svbool_t pg, svuint64_t bases, int64_t index) { return SVE_ACLE_FUNC(svld1uh_gather, _u64base, _index_u64, )(pg, bases, index); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uw.c index ee5a415650562c8..b7ffb86daac235e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1uw.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svld1uw_s64(svbool_t pg, const uint32_t *base) +svint64_t test_svld1uw_s64(svbool_t pg, const uint32_t *base) MODE_ATTR { return svld1uw_s64(pg, base); } @@ -47,7 +55,7 @@ svint64_t test_svld1uw_s64(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = zext [[TMP1]] to // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svld1uw_u64(svbool_t pg, const uint32_t *base) +svuint64_t test_svld1uw_u64(svbool_t pg, const uint32_t *base) MODE_ATTR { return svld1uw_u64(pg, base); } @@ -74,7 +82,7 @@ svuint64_t test_svld1uw_u64(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svint64_t test_svld1uw_vnum_s64(svbool_t pg, const uint32_t *base, int64_t vnum) +svint64_t test_svld1uw_vnum_s64(svbool_t pg, const uint32_t *base, int64_t vnum) MODE_ATTR { return svld1uw_vnum_s64(pg, base, vnum); } @@ -101,11 +109,13 @@ svint64_t test_svld1uw_vnum_s64(svbool_t pg, const uint32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = zext [[TMP4]] to // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint64_t test_svld1uw_vnum_u64(svbool_t pg, const uint32_t *base, int64_t vnum) +svuint64_t test_svld1uw_vnum_u64(svbool_t pg, const uint32_t *base, int64_t vnum) MODE_ATTR { return svld1uw_vnum_u64(pg, base, vnum); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svld1uw_gather_u64base_s64( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG:%.*]]) @@ -361,3 +371,5 @@ svint64_t test_svld1uw_gather_u64base_index_s64(svbool_t pg, svuint64_t bases, i svuint64_t test_svld1uw_gather_u64base_index_u64(svbool_t pg, svuint64_t bases, int64_t index) { return SVE_ACLE_FUNC(svld1uw_gather, _u64base, _index_u64, )(pg, bases, index); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2-bfloat.c index 0a7649a23f9a8be..fcae89c50b0e659 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2-bfloat.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -35,7 +42,7 @@ // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv16bf16.nxv8bf16( [[TMP3]], [[TMP4]], i64 8) // CPP-CHECK-NEXT: ret [[TMP5]] // -svbfloat16x2_t test_svld2_bf16(svbool_t pg, const bfloat16_t *base) +svbfloat16x2_t test_svld2_bf16(svbool_t pg, const bfloat16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_bf16,,)(pg, base); } @@ -63,7 +70,7 @@ svbfloat16x2_t test_svld2_bf16(svbool_t pg, const bfloat16_t *base) // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv16bf16.nxv8bf16( [[TMP4]], [[TMP5]], i64 8) // CPP-CHECK-NEXT: ret [[TMP6]] // -svbfloat16x2_t test_svld2_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) +svbfloat16x2_t test_svld2_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_bf16,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2.c index 50bbc144be4fa7a..992b51fa251233b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld2.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -33,7 +41,7 @@ // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.vector.insert.nxv32i8.nxv16i8( [[TMP2]], [[TMP3]], i64 16) // CPP-CHECK-NEXT: ret [[TMP4]] // -svint8x2_t test_svld2_s8(svbool_t pg, const int8_t *base) +svint8x2_t test_svld2_s8(svbool_t pg, const int8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_s8,,)(pg, base); } @@ -58,7 +66,7 @@ svint8x2_t test_svld2_s8(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv16i16.nxv8i16( [[TMP3]], [[TMP4]], i64 8) // CPP-CHECK-NEXT: ret [[TMP5]] // -svint16x2_t test_svld2_s16(svbool_t pg, const int16_t *base) +svint16x2_t test_svld2_s16(svbool_t pg, const int16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_s16,,)(pg, base); } @@ -83,7 +91,7 @@ svint16x2_t test_svld2_s16(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv8i32.nxv4i32( [[TMP3]], [[TMP4]], i64 4) // CPP-CHECK-NEXT: ret [[TMP5]] // -svint32x2_t test_svld2_s32(svbool_t pg, const int32_t *base) +svint32x2_t test_svld2_s32(svbool_t pg, const int32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_s32,,)(pg, base); } @@ -108,7 +116,7 @@ svint32x2_t test_svld2_s32(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv4i64.nxv2i64( [[TMP3]], [[TMP4]], i64 2) // CPP-CHECK-NEXT: ret [[TMP5]] // -svint64x2_t test_svld2_s64(svbool_t pg, const int64_t *base) +svint64x2_t test_svld2_s64(svbool_t pg, const int64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_s64,,)(pg, base); } @@ -131,7 +139,7 @@ svint64x2_t test_svld2_s64(svbool_t pg, const int64_t *base) // CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call @llvm.vector.insert.nxv32i8.nxv16i8( [[TMP2]], [[TMP3]], i64 16) // CPP-CHECK-NEXT: ret [[TMP4]] // -svuint8x2_t test_svld2_u8(svbool_t pg, const uint8_t *base) +svuint8x2_t test_svld2_u8(svbool_t pg, const uint8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_u8,,)(pg, base); } @@ -156,7 +164,7 @@ svuint8x2_t test_svld2_u8(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv16i16.nxv8i16( [[TMP3]], [[TMP4]], i64 8) // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint16x2_t test_svld2_u16(svbool_t pg, const uint16_t *base) +svuint16x2_t test_svld2_u16(svbool_t pg, const uint16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_u16,,)(pg, base); } @@ -181,7 +189,7 @@ svuint16x2_t test_svld2_u16(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv8i32.nxv4i32( [[TMP3]], [[TMP4]], i64 4) // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint32x2_t test_svld2_u32(svbool_t pg, const uint32_t *base) +svuint32x2_t test_svld2_u32(svbool_t pg, const uint32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_u32,,)(pg, base); } @@ -206,7 +214,7 @@ svuint32x2_t test_svld2_u32(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv4i64.nxv2i64( [[TMP3]], [[TMP4]], i64 2) // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint64x2_t test_svld2_u64(svbool_t pg, const uint64_t *base) +svuint64x2_t test_svld2_u64(svbool_t pg, const uint64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_u64,,)(pg, base); } @@ -231,7 +239,7 @@ svuint64x2_t test_svld2_u64(svbool_t pg, const uint64_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv16f16.nxv8f16( [[TMP3]], [[TMP4]], i64 8) // CPP-CHECK-NEXT: ret [[TMP5]] // -svfloat16x2_t test_svld2_f16(svbool_t pg, const float16_t *base) +svfloat16x2_t test_svld2_f16(svbool_t pg, const float16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_f16,,)(pg, base); } @@ -256,7 +264,7 @@ svfloat16x2_t test_svld2_f16(svbool_t pg, const float16_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv8f32.nxv4f32( [[TMP3]], [[TMP4]], i64 4) // CPP-CHECK-NEXT: ret [[TMP5]] // -svfloat32x2_t test_svld2_f32(svbool_t pg, const float32_t *base) +svfloat32x2_t test_svld2_f32(svbool_t pg, const float32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_f32,,)(pg, base); } @@ -281,7 +289,7 @@ svfloat32x2_t test_svld2_f32(svbool_t pg, const float32_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv4f64.nxv2f64( [[TMP3]], [[TMP4]], i64 2) // CPP-CHECK-NEXT: ret [[TMP5]] // -svfloat64x2_t test_svld2_f64(svbool_t pg, const float64_t *base) +svfloat64x2_t test_svld2_f64(svbool_t pg, const float64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld2,_f64,,)(pg, base); } @@ -306,7 +314,7 @@ svfloat64x2_t test_svld2_f64(svbool_t pg, const float64_t *base) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv32i8.nxv16i8( [[TMP3]], [[TMP4]], i64 16) // CPP-CHECK-NEXT: ret [[TMP5]] // -svint8x2_t test_svld2_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) +svint8x2_t test_svld2_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_s8,,)(pg, base, vnum); } @@ -333,7 +341,7 @@ svint8x2_t test_svld2_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv16i16.nxv8i16( [[TMP4]], [[TMP5]], i64 8) // CPP-CHECK-NEXT: ret [[TMP6]] // -svint16x2_t test_svld2_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) +svint16x2_t test_svld2_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_s16,,)(pg, base, vnum); } @@ -360,7 +368,7 @@ svint16x2_t test_svld2_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv8i32.nxv4i32( [[TMP4]], [[TMP5]], i64 4) // CPP-CHECK-NEXT: ret [[TMP6]] // -svint32x2_t test_svld2_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) +svint32x2_t test_svld2_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_s32,,)(pg, base, vnum); } @@ -387,7 +395,7 @@ svint32x2_t test_svld2_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv4i64.nxv2i64( [[TMP4]], [[TMP5]], i64 2) // CPP-CHECK-NEXT: ret [[TMP6]] // -svint64x2_t test_svld2_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) +svint64x2_t test_svld2_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_s64,,)(pg, base, vnum); } @@ -412,7 +420,7 @@ svint64x2_t test_svld2_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP5:%.*]] = tail call @llvm.vector.insert.nxv32i8.nxv16i8( [[TMP3]], [[TMP4]], i64 16) // CPP-CHECK-NEXT: ret [[TMP5]] // -svuint8x2_t test_svld2_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint8x2_t test_svld2_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_u8,,)(pg, base, vnum); } @@ -439,7 +447,7 @@ svuint8x2_t test_svld2_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv16i16.nxv8i16( [[TMP4]], [[TMP5]], i64 8) // CPP-CHECK-NEXT: ret [[TMP6]] // -svuint16x2_t test_svld2_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) +svuint16x2_t test_svld2_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_u16,,)(pg, base, vnum); } @@ -466,7 +474,7 @@ svuint16x2_t test_svld2_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv8i32.nxv4i32( [[TMP4]], [[TMP5]], i64 4) // CPP-CHECK-NEXT: ret [[TMP6]] // -svuint32x2_t test_svld2_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) +svuint32x2_t test_svld2_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_u32,,)(pg, base, vnum); } @@ -493,7 +501,7 @@ svuint32x2_t test_svld2_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv4i64.nxv2i64( [[TMP4]], [[TMP5]], i64 2) // CPP-CHECK-NEXT: ret [[TMP6]] // -svuint64x2_t test_svld2_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) +svuint64x2_t test_svld2_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_u64,,)(pg, base, vnum); } @@ -520,7 +528,7 @@ svuint64x2_t test_svld2_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv16f16.nxv8f16( [[TMP4]], [[TMP5]], i64 8) // CPP-CHECK-NEXT: ret [[TMP6]] // -svfloat16x2_t test_svld2_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) +svfloat16x2_t test_svld2_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_f16,,)(pg, base, vnum); } @@ -547,7 +555,7 @@ svfloat16x2_t test_svld2_vnum_f16(svbool_t pg, const float16_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv8f32.nxv4f32( [[TMP4]], [[TMP5]], i64 4) // CPP-CHECK-NEXT: ret [[TMP6]] // -svfloat32x2_t test_svld2_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) +svfloat32x2_t test_svld2_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_f32,,)(pg, base, vnum); } @@ -574,7 +582,7 @@ svfloat32x2_t test_svld2_vnum_f32(svbool_t pg, const float32_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv4f64.nxv2f64( [[TMP4]], [[TMP5]], i64 2) // CPP-CHECK-NEXT: ret [[TMP6]] // -svfloat64x2_t test_svld2_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) +svfloat64x2_t test_svld2_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld2_vnum,_f64,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3-bfloat.c index ff04431fb87fd5c..9100d27534c1ca9 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -39,7 +47,7 @@ // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv24bf16.nxv8bf16( [[TMP5]], [[TMP6]], i64 16) // CPP-CHECK-NEXT: ret [[TMP7]] // -svbfloat16x3_t test_svld3_bf16(svbool_t pg, const bfloat16_t *base) +svbfloat16x3_t test_svld3_bf16(svbool_t pg, const bfloat16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_bf16,,)(pg, base); } @@ -70,7 +78,7 @@ svbfloat16x3_t test_svld3_bf16(svbool_t pg, const bfloat16_t *base) // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv24bf16.nxv8bf16( [[TMP6]], [[TMP7]], i64 16) // CPP-CHECK-NEXT: ret [[TMP8]] // -svbfloat16x3_t test_svld3_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) +svbfloat16x3_t test_svld3_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_bf16,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3.c index 753bf39d6561da0..10206b5362e11ea 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld3.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -37,7 +44,7 @@ // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv48i8.nxv16i8( [[TMP4]], [[TMP5]], i64 32) // CPP-CHECK-NEXT: ret [[TMP6]] // -svint8x3_t test_svld3_s8(svbool_t pg, const int8_t *base) +svint8x3_t test_svld3_s8(svbool_t pg, const int8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_s8,,)(pg, base); } @@ -66,7 +73,7 @@ svint8x3_t test_svld3_s8(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv24i16.nxv8i16( [[TMP5]], [[TMP6]], i64 16) // CPP-CHECK-NEXT: ret [[TMP7]] // -svint16x3_t test_svld3_s16(svbool_t pg, const int16_t *base) +svint16x3_t test_svld3_s16(svbool_t pg, const int16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_s16,,)(pg, base); } @@ -95,7 +102,7 @@ svint16x3_t test_svld3_s16(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv12i32.nxv4i32( [[TMP5]], [[TMP6]], i64 8) // CPP-CHECK-NEXT: ret [[TMP7]] // -svint32x3_t test_svld3_s32(svbool_t pg, const int32_t *base) +svint32x3_t test_svld3_s32(svbool_t pg, const int32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_s32,,)(pg, base); } @@ -124,7 +131,7 @@ svint32x3_t test_svld3_s32(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv6i64.nxv2i64( [[TMP5]], [[TMP6]], i64 4) // CPP-CHECK-NEXT: ret [[TMP7]] // -svint64x3_t test_svld3_s64(svbool_t pg, const int64_t *base) +svint64x3_t test_svld3_s64(svbool_t pg, const int64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_s64,,)(pg, base); } @@ -151,7 +158,7 @@ svint64x3_t test_svld3_s64(svbool_t pg, const int64_t *base) // CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call @llvm.vector.insert.nxv48i8.nxv16i8( [[TMP4]], [[TMP5]], i64 32) // CPP-CHECK-NEXT: ret [[TMP6]] // -svuint8x3_t test_svld3_u8(svbool_t pg, const uint8_t *base) +svuint8x3_t test_svld3_u8(svbool_t pg, const uint8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_u8,,)(pg, base); } @@ -180,7 +187,7 @@ svuint8x3_t test_svld3_u8(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv24i16.nxv8i16( [[TMP5]], [[TMP6]], i64 16) // CPP-CHECK-NEXT: ret [[TMP7]] // -svuint16x3_t test_svld3_u16(svbool_t pg, const uint16_t *base) +svuint16x3_t test_svld3_u16(svbool_t pg, const uint16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_u16,,)(pg, base); } @@ -209,7 +216,7 @@ svuint16x3_t test_svld3_u16(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv12i32.nxv4i32( [[TMP5]], [[TMP6]], i64 8) // CPP-CHECK-NEXT: ret [[TMP7]] // -svuint32x3_t test_svld3_u32(svbool_t pg, const uint32_t *base) +svuint32x3_t test_svld3_u32(svbool_t pg, const uint32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_u32,,)(pg, base); } @@ -238,7 +245,7 @@ svuint32x3_t test_svld3_u32(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv6i64.nxv2i64( [[TMP5]], [[TMP6]], i64 4) // CPP-CHECK-NEXT: ret [[TMP7]] // -svuint64x3_t test_svld3_u64(svbool_t pg, const uint64_t *base) +svuint64x3_t test_svld3_u64(svbool_t pg, const uint64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_u64,,)(pg, base); } @@ -267,7 +274,7 @@ svuint64x3_t test_svld3_u64(svbool_t pg, const uint64_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv24f16.nxv8f16( [[TMP5]], [[TMP6]], i64 16) // CPP-CHECK-NEXT: ret [[TMP7]] // -svfloat16x3_t test_svld3_f16(svbool_t pg, const float16_t *base) +svfloat16x3_t test_svld3_f16(svbool_t pg, const float16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_f16,,)(pg, base); } @@ -296,7 +303,7 @@ svfloat16x3_t test_svld3_f16(svbool_t pg, const float16_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv12f32.nxv4f32( [[TMP5]], [[TMP6]], i64 8) // CPP-CHECK-NEXT: ret [[TMP7]] // -svfloat32x3_t test_svld3_f32(svbool_t pg, const float32_t *base) +svfloat32x3_t test_svld3_f32(svbool_t pg, const float32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_f32,,)(pg, base); } @@ -325,7 +332,7 @@ svfloat32x3_t test_svld3_f32(svbool_t pg, const float32_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv6f64.nxv2f64( [[TMP5]], [[TMP6]], i64 4) // CPP-CHECK-NEXT: ret [[TMP7]] // -svfloat64x3_t test_svld3_f64(svbool_t pg, const float64_t *base) +svfloat64x3_t test_svld3_f64(svbool_t pg, const float64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld3,_f64,,)(pg, base); } @@ -354,7 +361,7 @@ svfloat64x3_t test_svld3_f64(svbool_t pg, const float64_t *base) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv48i8.nxv16i8( [[TMP5]], [[TMP6]], i64 32) // CPP-CHECK-NEXT: ret [[TMP7]] // -svint8x3_t test_svld3_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) +svint8x3_t test_svld3_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_s8,,)(pg, base, vnum); } @@ -385,7 +392,7 @@ svint8x3_t test_svld3_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv24i16.nxv8i16( [[TMP6]], [[TMP7]], i64 16) // CPP-CHECK-NEXT: ret [[TMP8]] // -svint16x3_t test_svld3_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) +svint16x3_t test_svld3_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_s16,,)(pg, base, vnum); } @@ -416,7 +423,7 @@ svint16x3_t test_svld3_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv12i32.nxv4i32( [[TMP6]], [[TMP7]], i64 8) // CPP-CHECK-NEXT: ret [[TMP8]] // -svint32x3_t test_svld3_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) +svint32x3_t test_svld3_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_s32,,)(pg, base, vnum); } @@ -447,7 +454,7 @@ svint32x3_t test_svld3_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv6i64.nxv2i64( [[TMP6]], [[TMP7]], i64 4) // CPP-CHECK-NEXT: ret [[TMP8]] // -svint64x3_t test_svld3_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) +svint64x3_t test_svld3_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_s64,,)(pg, base, vnum); } @@ -476,7 +483,7 @@ svint64x3_t test_svld3_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP7:%.*]] = tail call @llvm.vector.insert.nxv48i8.nxv16i8( [[TMP5]], [[TMP6]], i64 32) // CPP-CHECK-NEXT: ret [[TMP7]] // -svuint8x3_t test_svld3_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint8x3_t test_svld3_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_u8,,)(pg, base, vnum); } @@ -507,7 +514,7 @@ svuint8x3_t test_svld3_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv24i16.nxv8i16( [[TMP6]], [[TMP7]], i64 16) // CPP-CHECK-NEXT: ret [[TMP8]] // -svuint16x3_t test_svld3_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) +svuint16x3_t test_svld3_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_u16,,)(pg, base, vnum); } @@ -538,7 +545,7 @@ svuint16x3_t test_svld3_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv12i32.nxv4i32( [[TMP6]], [[TMP7]], i64 8) // CPP-CHECK-NEXT: ret [[TMP8]] // -svuint32x3_t test_svld3_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) +svuint32x3_t test_svld3_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_u32,,)(pg, base, vnum); } @@ -569,7 +576,7 @@ svuint32x3_t test_svld3_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv6i64.nxv2i64( [[TMP6]], [[TMP7]], i64 4) // CPP-CHECK-NEXT: ret [[TMP8]] // -svuint64x3_t test_svld3_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) +svuint64x3_t test_svld3_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_u64,,)(pg, base, vnum); } @@ -600,7 +607,7 @@ svuint64x3_t test_svld3_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv24f16.nxv8f16( [[TMP6]], [[TMP7]], i64 16) // CPP-CHECK-NEXT: ret [[TMP8]] // -svfloat16x3_t test_svld3_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) +svfloat16x3_t test_svld3_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_f16,,)(pg, base, vnum); } @@ -631,7 +638,7 @@ svfloat16x3_t test_svld3_vnum_f16(svbool_t pg, const float16_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv12f32.nxv4f32( [[TMP6]], [[TMP7]], i64 8) // CPP-CHECK-NEXT: ret [[TMP8]] // -svfloat32x3_t test_svld3_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) +svfloat32x3_t test_svld3_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_f32,,)(pg, base, vnum); } @@ -662,7 +669,7 @@ svfloat32x3_t test_svld3_vnum_f32(svbool_t pg, const float32_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv6f64.nxv2f64( [[TMP6]], [[TMP7]], i64 4) // CPP-CHECK-NEXT: ret [[TMP8]] // -svfloat64x3_t test_svld3_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) +svfloat64x3_t test_svld3_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld3_vnum,_f64,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4-bfloat.c index c6063872c63f631..0f21ffdb6f70939 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4-bfloat.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -43,7 +50,7 @@ // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv32bf16.nxv8bf16( [[TMP7]], [[TMP8]], i64 24) // CPP-CHECK-NEXT: ret [[TMP9]] // -svbfloat16x4_t test_svld4_bf16(svbool_t pg, const bfloat16_t *base) +svbfloat16x4_t test_svld4_bf16(svbool_t pg, const bfloat16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_bf16,,)(pg, base); } @@ -78,7 +85,7 @@ svbfloat16x4_t test_svld4_bf16(svbool_t pg, const bfloat16_t *base) // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv32bf16.nxv8bf16( [[TMP8]], [[TMP9]], i64 24) // CPP-CHECK-NEXT: ret [[TMP10]] // -svbfloat16x4_t test_svld4_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) +svbfloat16x4_t test_svld4_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_bf16,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4.c index 6920813c44a26de..06e07307886534d 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld4.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -41,7 +48,7 @@ // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv64i8.nxv16i8( [[TMP6]], [[TMP7]], i64 48) // CPP-CHECK-NEXT: ret [[TMP8]] // -svint8x4_t test_svld4_s8(svbool_t pg, const int8_t *base) +svint8x4_t test_svld4_s8(svbool_t pg, const int8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_s8,,)(pg, base); } @@ -74,7 +81,7 @@ svint8x4_t test_svld4_s8(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv32i16.nxv8i16( [[TMP7]], [[TMP8]], i64 24) // CPP-CHECK-NEXT: ret [[TMP9]] // -svint16x4_t test_svld4_s16(svbool_t pg, const int16_t *base) +svint16x4_t test_svld4_s16(svbool_t pg, const int16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_s16,,)(pg, base); } @@ -107,7 +114,7 @@ svint16x4_t test_svld4_s16(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv16i32.nxv4i32( [[TMP7]], [[TMP8]], i64 12) // CPP-CHECK-NEXT: ret [[TMP9]] // -svint32x4_t test_svld4_s32(svbool_t pg, const int32_t *base) +svint32x4_t test_svld4_s32(svbool_t pg, const int32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_s32,,)(pg, base); } @@ -140,7 +147,7 @@ svint32x4_t test_svld4_s32(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv8i64.nxv2i64( [[TMP7]], [[TMP8]], i64 6) // CPP-CHECK-NEXT: ret [[TMP9]] // -svint64x4_t test_svld4_s64(svbool_t pg, const int64_t *base) +svint64x4_t test_svld4_s64(svbool_t pg, const int64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_s64,,)(pg, base); } @@ -171,7 +178,7 @@ svint64x4_t test_svld4_s64(svbool_t pg, const int64_t *base) // CPP-CHECK-NEXT: [[TMP8:%.*]] = tail call @llvm.vector.insert.nxv64i8.nxv16i8( [[TMP6]], [[TMP7]], i64 48) // CPP-CHECK-NEXT: ret [[TMP8]] // -svuint8x4_t test_svld4_u8(svbool_t pg, const uint8_t *base) +svuint8x4_t test_svld4_u8(svbool_t pg, const uint8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_u8,,)(pg, base); } @@ -204,7 +211,7 @@ svuint8x4_t test_svld4_u8(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv32i16.nxv8i16( [[TMP7]], [[TMP8]], i64 24) // CPP-CHECK-NEXT: ret [[TMP9]] // -svuint16x4_t test_svld4_u16(svbool_t pg, const uint16_t *base) +svuint16x4_t test_svld4_u16(svbool_t pg, const uint16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_u16,,)(pg, base); } @@ -237,7 +244,7 @@ svuint16x4_t test_svld4_u16(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv16i32.nxv4i32( [[TMP7]], [[TMP8]], i64 12) // CPP-CHECK-NEXT: ret [[TMP9]] // -svuint32x4_t test_svld4_u32(svbool_t pg, const uint32_t *base) +svuint32x4_t test_svld4_u32(svbool_t pg, const uint32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_u32,,)(pg, base); } @@ -270,7 +277,7 @@ svuint32x4_t test_svld4_u32(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv8i64.nxv2i64( [[TMP7]], [[TMP8]], i64 6) // CPP-CHECK-NEXT: ret [[TMP9]] // -svuint64x4_t test_svld4_u64(svbool_t pg, const uint64_t *base) +svuint64x4_t test_svld4_u64(svbool_t pg, const uint64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_u64,,)(pg, base); } @@ -303,7 +310,7 @@ svuint64x4_t test_svld4_u64(svbool_t pg, const uint64_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv32f16.nxv8f16( [[TMP7]], [[TMP8]], i64 24) // CPP-CHECK-NEXT: ret [[TMP9]] // -svfloat16x4_t test_svld4_f16(svbool_t pg, const float16_t *base) +svfloat16x4_t test_svld4_f16(svbool_t pg, const float16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_f16,,)(pg, base); } @@ -336,7 +343,7 @@ svfloat16x4_t test_svld4_f16(svbool_t pg, const float16_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv16f32.nxv4f32( [[TMP7]], [[TMP8]], i64 12) // CPP-CHECK-NEXT: ret [[TMP9]] // -svfloat32x4_t test_svld4_f32(svbool_t pg, const float32_t *base) +svfloat32x4_t test_svld4_f32(svbool_t pg, const float32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_f32,,)(pg, base); } @@ -369,7 +376,7 @@ svfloat32x4_t test_svld4_f32(svbool_t pg, const float32_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv8f64.nxv2f64( [[TMP7]], [[TMP8]], i64 6) // CPP-CHECK-NEXT: ret [[TMP9]] // -svfloat64x4_t test_svld4_f64(svbool_t pg, const float64_t *base) +svfloat64x4_t test_svld4_f64(svbool_t pg, const float64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svld4,_f64,,)(pg, base); } @@ -402,7 +409,7 @@ svfloat64x4_t test_svld4_f64(svbool_t pg, const float64_t *base) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv64i8.nxv16i8( [[TMP7]], [[TMP8]], i64 48) // CPP-CHECK-NEXT: ret [[TMP9]] // -svint8x4_t test_svld4_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) +svint8x4_t test_svld4_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_s8,,)(pg, base, vnum); } @@ -437,7 +444,7 @@ svint8x4_t test_svld4_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv32i16.nxv8i16( [[TMP8]], [[TMP9]], i64 24) // CPP-CHECK-NEXT: ret [[TMP10]] // -svint16x4_t test_svld4_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) +svint16x4_t test_svld4_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_s16,,)(pg, base, vnum); } @@ -472,7 +479,7 @@ svint16x4_t test_svld4_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv16i32.nxv4i32( [[TMP8]], [[TMP9]], i64 12) // CPP-CHECK-NEXT: ret [[TMP10]] // -svint32x4_t test_svld4_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) +svint32x4_t test_svld4_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_s32,,)(pg, base, vnum); } @@ -507,7 +514,7 @@ svint32x4_t test_svld4_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv8i64.nxv2i64( [[TMP8]], [[TMP9]], i64 6) // CPP-CHECK-NEXT: ret [[TMP10]] // -svint64x4_t test_svld4_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) +svint64x4_t test_svld4_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_s64,,)(pg, base, vnum); } @@ -540,7 +547,7 @@ svint64x4_t test_svld4_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP9:%.*]] = tail call @llvm.vector.insert.nxv64i8.nxv16i8( [[TMP7]], [[TMP8]], i64 48) // CPP-CHECK-NEXT: ret [[TMP9]] // -svuint8x4_t test_svld4_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint8x4_t test_svld4_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_u8,,)(pg, base, vnum); } @@ -575,7 +582,7 @@ svuint8x4_t test_svld4_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv32i16.nxv8i16( [[TMP8]], [[TMP9]], i64 24) // CPP-CHECK-NEXT: ret [[TMP10]] // -svuint16x4_t test_svld4_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) +svuint16x4_t test_svld4_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_u16,,)(pg, base, vnum); } @@ -610,7 +617,7 @@ svuint16x4_t test_svld4_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv16i32.nxv4i32( [[TMP8]], [[TMP9]], i64 12) // CPP-CHECK-NEXT: ret [[TMP10]] // -svuint32x4_t test_svld4_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) +svuint32x4_t test_svld4_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_u32,,)(pg, base, vnum); } @@ -645,7 +652,7 @@ svuint32x4_t test_svld4_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv8i64.nxv2i64( [[TMP8]], [[TMP9]], i64 6) // CPP-CHECK-NEXT: ret [[TMP10]] // -svuint64x4_t test_svld4_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) +svuint64x4_t test_svld4_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_u64,,)(pg, base, vnum); } @@ -680,7 +687,7 @@ svuint64x4_t test_svld4_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv32f16.nxv8f16( [[TMP8]], [[TMP9]], i64 24) // CPP-CHECK-NEXT: ret [[TMP10]] // -svfloat16x4_t test_svld4_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) +svfloat16x4_t test_svld4_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_f16,,)(pg, base, vnum); } @@ -715,7 +722,7 @@ svfloat16x4_t test_svld4_vnum_f16(svbool_t pg, const float16_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv16f32.nxv4f32( [[TMP8]], [[TMP9]], i64 12) // CPP-CHECK-NEXT: ret [[TMP10]] // -svfloat32x4_t test_svld4_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) +svfloat32x4_t test_svld4_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_f32,,)(pg, base, vnum); } @@ -750,7 +757,7 @@ svfloat32x4_t test_svld4_vnum_f32(svbool_t pg, const float32_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP10:%.*]] = tail call @llvm.vector.insert.nxv8f64.nxv2f64( [[TMP8]], [[TMP9]], i64 6) // CPP-CHECK-NEXT: ret [[TMP10]] // -svfloat64x4_t test_svld4_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) +svfloat64x4_t test_svld4_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svld4_vnum,_f64,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1-bfloat.c index ee0b46db5ebcfba..82d5bff2516d89e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8bf16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svldnt1_bf16(svbool_t pg, const bfloat16_t *base) +svbfloat16_t test_svldnt1_bf16(svbool_t pg, const bfloat16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_bf16,,)(pg, base); } @@ -46,7 +54,7 @@ svbfloat16_t test_svldnt1_bf16(svbool_t pg, const bfloat16_t *base) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8bf16( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svbfloat16_t test_svldnt1_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) +svbfloat16_t test_svldnt1_vnum_bf16(svbool_t pg, const bfloat16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_bf16,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1.c index 37a41d5fd4ed597..d343c124fe6a763 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnt1.c @@ -5,9 +5,17 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv16i8( [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svldnt1_s8(svbool_t pg, const int8_t *base) +svint8_t test_svldnt1_s8(svbool_t pg, const int8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_s8,,)(pg, base); } @@ -42,7 +50,7 @@ svint8_t test_svldnt1_s8(svbool_t pg, const int8_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8i16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svldnt1_s16(svbool_t pg, const int16_t *base) +svint16_t test_svldnt1_s16(svbool_t pg, const int16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_s16,,)(pg, base); } @@ -59,7 +67,7 @@ svint16_t test_svldnt1_s16(svbool_t pg, const int16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv4i32( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svldnt1_s32(svbool_t pg, const int32_t *base) +svint32_t test_svldnt1_s32(svbool_t pg, const int32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_s32,,)(pg, base); } @@ -76,7 +84,7 @@ svint32_t test_svldnt1_s32(svbool_t pg, const int32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv2i64( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svldnt1_s64(svbool_t pg, const int64_t *base) +svint64_t test_svldnt1_s64(svbool_t pg, const int64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_s64,,)(pg, base); } @@ -91,7 +99,7 @@ svint64_t test_svldnt1_s64(svbool_t pg, const int64_t *base) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv16i8( [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svldnt1_u8(svbool_t pg, const uint8_t *base) +svuint8_t test_svldnt1_u8(svbool_t pg, const uint8_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_u8,,)(pg, base); } @@ -108,7 +116,7 @@ svuint8_t test_svldnt1_u8(svbool_t pg, const uint8_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8i16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svldnt1_u16(svbool_t pg, const uint16_t *base) +svuint16_t test_svldnt1_u16(svbool_t pg, const uint16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_u16,,)(pg, base); } @@ -125,7 +133,7 @@ svuint16_t test_svldnt1_u16(svbool_t pg, const uint16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv4i32( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svldnt1_u32(svbool_t pg, const uint32_t *base) +svuint32_t test_svldnt1_u32(svbool_t pg, const uint32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_u32,,)(pg, base); } @@ -142,7 +150,7 @@ svuint32_t test_svldnt1_u32(svbool_t pg, const uint32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv2i64( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svldnt1_u64(svbool_t pg, const uint64_t *base) +svuint64_t test_svldnt1_u64(svbool_t pg, const uint64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_u64,,)(pg, base); } @@ -159,7 +167,7 @@ svuint64_t test_svldnt1_u64(svbool_t pg, const uint64_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8f16( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svldnt1_f16(svbool_t pg, const float16_t *base) +svfloat16_t test_svldnt1_f16(svbool_t pg, const float16_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_f16,,)(pg, base); } @@ -176,7 +184,7 @@ svfloat16_t test_svldnt1_f16(svbool_t pg, const float16_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv4f32( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svldnt1_f32(svbool_t pg, const float32_t *base) +svfloat32_t test_svldnt1_f32(svbool_t pg, const float32_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_f32,,)(pg, base); } @@ -193,7 +201,7 @@ svfloat32_t test_svldnt1_f32(svbool_t pg, const float32_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv2f64( [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svldnt1_f64(svbool_t pg, const float64_t *base) +svfloat64_t test_svldnt1_f64(svbool_t pg, const float64_t *base) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1,_f64,,)(pg, base); } @@ -210,7 +218,7 @@ svfloat64_t test_svldnt1_f64(svbool_t pg, const float64_t *base) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv16i8( [[PG:%.*]], ptr [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svldnt1_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) +svint8_t test_svldnt1_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_s8,,)(pg, base, vnum); } @@ -229,7 +237,7 @@ svint8_t test_svldnt1_vnum_s8(svbool_t pg, const int8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8i16( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svldnt1_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) +svint16_t test_svldnt1_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_s16,,)(pg, base, vnum); } @@ -248,7 +256,7 @@ svint16_t test_svldnt1_vnum_s16(svbool_t pg, const int16_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv4i32( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svldnt1_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) +svint32_t test_svldnt1_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_s32,,)(pg, base, vnum); } @@ -267,7 +275,7 @@ svint32_t test_svldnt1_vnum_s32(svbool_t pg, const int32_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv2i64( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svldnt1_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) +svint64_t test_svldnt1_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_s64,,)(pg, base, vnum); } @@ -284,7 +292,7 @@ svint64_t test_svldnt1_vnum_s64(svbool_t pg, const int64_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv16i8( [[PG:%.*]], ptr [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svldnt1_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) +svuint8_t test_svldnt1_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_u8,,)(pg, base, vnum); } @@ -303,7 +311,7 @@ svuint8_t test_svldnt1_vnum_u8(svbool_t pg, const uint8_t *base, int64_t vnum) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8i16( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svldnt1_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) +svuint16_t test_svldnt1_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_u16,,)(pg, base, vnum); } @@ -322,7 +330,7 @@ svuint16_t test_svldnt1_vnum_u16(svbool_t pg, const uint16_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv4i32( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svldnt1_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) +svuint32_t test_svldnt1_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_u32,,)(pg, base, vnum); } @@ -341,7 +349,7 @@ svuint32_t test_svldnt1_vnum_u32(svbool_t pg, const uint32_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv2i64( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svldnt1_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) +svuint64_t test_svldnt1_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_u64,,)(pg, base, vnum); } @@ -360,7 +368,7 @@ svuint64_t test_svldnt1_vnum_u64(svbool_t pg, const uint64_t *base, int64_t vnum // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv8f16( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svldnt1_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) +svfloat16_t test_svldnt1_vnum_f16(svbool_t pg, const float16_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_f16,,)(pg, base, vnum); } @@ -379,7 +387,7 @@ svfloat16_t test_svldnt1_vnum_f16(svbool_t pg, const float16_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv4f32( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svldnt1_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) +svfloat32_t test_svldnt1_vnum_f32(svbool_t pg, const float32_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_f32,,)(pg, base, vnum); } @@ -398,7 +406,7 @@ svfloat32_t test_svldnt1_vnum_f32(svbool_t pg, const float32_t *base, int64_t vn // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.ldnt1.nxv2f64( [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svldnt1_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) +svfloat64_t test_svldnt1_vnum_f64(svbool_t pg, const float64_t *base, int64_t vnum) MODE_ATTR { return SVE_ACLE_FUNC(svldnt1_vnum,_f64,,)(pg, base, vnum); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len-bfloat.c index 1128a7310938eae..049207514bc1d72 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len-bfloat.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 3 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_bf16(svbfloat16_t op) +uint64_t test_svlen_bf16(svbfloat16_t op) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svlen_bf16'}} return SVE_ACLE_FUNC(svlen,_bf16,,)(op); diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len.c index 10675a2cc08ceec..cca939296455ed1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_len.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 4 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_s8(svint8_t op) +uint64_t test_svlen_s8(svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_s8,,)(op); } @@ -43,7 +51,7 @@ uint64_t test_svlen_s8(svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 3 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_s16(svint16_t op) +uint64_t test_svlen_s16(svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_s16,,)(op); } @@ -60,7 +68,7 @@ uint64_t test_svlen_s16(svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 2 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_s32(svint32_t op) +uint64_t test_svlen_s32(svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_s32,,)(op); } @@ -77,7 +85,7 @@ uint64_t test_svlen_s32(svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 1 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_s64(svint64_t op) +uint64_t test_svlen_s64(svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_s64,,)(op); } @@ -94,7 +102,7 @@ uint64_t test_svlen_s64(svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 4 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_u8(svuint8_t op) +uint64_t test_svlen_u8(svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_u8,,)(op); } @@ -111,7 +119,7 @@ uint64_t test_svlen_u8(svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 3 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_u16(svuint16_t op) +uint64_t test_svlen_u16(svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_u16,,)(op); } @@ -128,7 +136,7 @@ uint64_t test_svlen_u16(svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 2 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_u32(svuint32_t op) +uint64_t test_svlen_u32(svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_u32,,)(op); } @@ -145,7 +153,7 @@ uint64_t test_svlen_u32(svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 1 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_u64(svuint64_t op) +uint64_t test_svlen_u64(svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_u64,,)(op); } @@ -162,7 +170,7 @@ uint64_t test_svlen_u64(svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 3 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_f16(svfloat16_t op) +uint64_t test_svlen_f16(svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_f16,,)(op); } @@ -179,7 +187,7 @@ uint64_t test_svlen_f16(svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 2 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_f32(svfloat32_t op) +uint64_t test_svlen_f32(svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_f32,,)(op); } @@ -196,7 +204,7 @@ uint64_t test_svlen_f32(svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 1 // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svlen_f64(svfloat64_t op) +uint64_t test_svlen_f64(svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svlen,_f64,,)(op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsl.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsl.c index 1c32eea466fd1b5..d916235059ea1a4 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsl.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsl.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svlsl_s8_z(svbool_t pg, svint8_t op1, svuint8_t op2) +svint8_t test_svlsl_s8_z(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svlsl_s8_z(svbool_t pg, svint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svlsl_s16_z(svbool_t pg, svint16_t op1, svuint16_t op2) +svint16_t test_svlsl_s16_z(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svlsl_s16_z(svbool_t pg, svint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svlsl_s32_z(svbool_t pg, svint32_t op1, svuint32_t op2) +svint32_t test_svlsl_s32_z(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svlsl_s32_z(svbool_t pg, svint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svlsl_s64_z(svbool_t pg, svint64_t op1, svuint64_t op2) +svint64_t test_svlsl_s64_z(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svlsl_s64_z(svbool_t pg, svint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svlsl_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svlsl_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svlsl_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svlsl_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svlsl_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svlsl_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svlsl_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svlsl_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svlsl_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svlsl_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svlsl_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svlsl_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svlsl_s8_m(svbool_t pg, svint8_t op1, svuint8_t op2) +svint8_t test_svlsl_s8_m(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svlsl_s8_m(svbool_t pg, svint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svlsl_s16_m(svbool_t pg, svint16_t op1, svuint16_t op2) +svint16_t test_svlsl_s16_m(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svlsl_s16_m(svbool_t pg, svint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svlsl_s32_m(svbool_t pg, svint32_t op1, svuint32_t op2) +svint32_t test_svlsl_s32_m(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svlsl_s32_m(svbool_t pg, svint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svlsl_s64_m(svbool_t pg, svint64_t op1, svuint64_t op2) +svint64_t test_svlsl_s64_m(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svlsl_s64_m(svbool_t pg, svint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsl_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svlsl_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svlsl_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsl_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svlsl_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svlsl_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsl_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svlsl_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svlsl_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svlsl_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svlsl_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svlsl_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svlsl_s8_x(svbool_t pg, svint8_t op1, svuint8_t op2) +svint8_t test_svlsl_s8_x(svbool_t pg, svint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svlsl_s8_x(svbool_t pg, svint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svlsl_s16_x(svbool_t pg, svint16_t op1, svuint16_t op2) +svint16_t test_svlsl_s16_x(svbool_t pg, svint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svlsl_s16_x(svbool_t pg, svint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svlsl_s32_x(svbool_t pg, svint32_t op1, svuint32_t op2) +svint32_t test_svlsl_s32_x(svbool_t pg, svint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svlsl_s32_x(svbool_t pg, svint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svlsl_s64_x(svbool_t pg, svint64_t op1, svuint64_t op2) +svint64_t test_svlsl_s64_x(svbool_t pg, svint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svlsl_s64_x(svbool_t pg, svint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsl_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svlsl_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svlsl_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsl_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svlsl_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svlsl_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsl_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svlsl_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svlsl_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svlsl_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svlsl_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl,_u64,_x,)(pg, op1, op2); } @@ -438,7 +446,7 @@ svuint64_t test_svlsl_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svlsl_wide_s8_z(svbool_t pg, svint8_t op1, svuint64_t op2) +svint8_t test_svlsl_wide_s8_z(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s8,_z,)(pg, op1, op2); } @@ -457,7 +465,7 @@ svint8_t test_svlsl_wide_s8_z(svbool_t pg, svint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svlsl_wide_s16_z(svbool_t pg, svint16_t op1, svuint64_t op2) +svint16_t test_svlsl_wide_s16_z(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s16,_z,)(pg, op1, op2); } @@ -476,7 +484,7 @@ svint16_t test_svlsl_wide_s16_z(svbool_t pg, svint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svlsl_wide_s32_z(svbool_t pg, svint32_t op1, svuint64_t op2) +svint32_t test_svlsl_wide_s32_z(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s32,_z,)(pg, op1, op2); } @@ -493,7 +501,7 @@ svint32_t test_svlsl_wide_s32_z(svbool_t pg, svint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svlsl_wide_u8_z(svbool_t pg, svuint8_t op1, svuint64_t op2) +svuint8_t test_svlsl_wide_u8_z(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u8,_z,)(pg, op1, op2); } @@ -512,7 +520,7 @@ svuint8_t test_svlsl_wide_u8_z(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svlsl_wide_u16_z(svbool_t pg, svuint16_t op1, svuint64_t op2) +svuint16_t test_svlsl_wide_u16_z(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u16,_z,)(pg, op1, op2); } @@ -531,7 +539,7 @@ svuint16_t test_svlsl_wide_u16_z(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svlsl_wide_u32_z(svbool_t pg, svuint32_t op1, svuint64_t op2) +svuint32_t test_svlsl_wide_u32_z(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u32,_z,)(pg, op1, op2); } @@ -546,7 +554,7 @@ svuint32_t test_svlsl_wide_u32_z(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svlsl_wide_s8_m(svbool_t pg, svint8_t op1, svuint64_t op2) +svint8_t test_svlsl_wide_s8_m(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s8,_m,)(pg, op1, op2); } @@ -563,7 +571,7 @@ svint8_t test_svlsl_wide_s8_m(svbool_t pg, svint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svlsl_wide_s16_m(svbool_t pg, svint16_t op1, svuint64_t op2) +svint16_t test_svlsl_wide_s16_m(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s16,_m,)(pg, op1, op2); } @@ -580,7 +588,7 @@ svint16_t test_svlsl_wide_s16_m(svbool_t pg, svint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svlsl_wide_s32_m(svbool_t pg, svint32_t op1, svuint64_t op2) +svint32_t test_svlsl_wide_s32_m(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s32,_m,)(pg, op1, op2); } @@ -595,7 +603,7 @@ svint32_t test_svlsl_wide_s32_m(svbool_t pg, svint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsl_wide_u8_m(svbool_t pg, svuint8_t op1, svuint64_t op2) +svuint8_t test_svlsl_wide_u8_m(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u8,_m,)(pg, op1, op2); } @@ -612,7 +620,7 @@ svuint8_t test_svlsl_wide_u8_m(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsl_wide_u16_m(svbool_t pg, svuint16_t op1, svuint64_t op2) +svuint16_t test_svlsl_wide_u16_m(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u16,_m,)(pg, op1, op2); } @@ -629,7 +637,7 @@ svuint16_t test_svlsl_wide_u16_m(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsl_wide_u32_m(svbool_t pg, svuint32_t op1, svuint64_t op2) +svuint32_t test_svlsl_wide_u32_m(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u32,_m,)(pg, op1, op2); } @@ -644,7 +652,7 @@ svuint32_t test_svlsl_wide_u32_m(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svlsl_wide_s8_x(svbool_t pg, svint8_t op1, svuint64_t op2) +svint8_t test_svlsl_wide_s8_x(svbool_t pg, svint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s8,_x,)(pg, op1, op2); } @@ -661,7 +669,7 @@ svint8_t test_svlsl_wide_s8_x(svbool_t pg, svint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svlsl_wide_s16_x(svbool_t pg, svint16_t op1, svuint64_t op2) +svint16_t test_svlsl_wide_s16_x(svbool_t pg, svint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s16,_x,)(pg, op1, op2); } @@ -678,7 +686,7 @@ svint16_t test_svlsl_wide_s16_x(svbool_t pg, svint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svlsl_wide_s32_x(svbool_t pg, svint32_t op1, svuint64_t op2) +svint32_t test_svlsl_wide_s32_x(svbool_t pg, svint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_s32,_x,)(pg, op1, op2); } @@ -693,7 +701,7 @@ svint32_t test_svlsl_wide_s32_x(svbool_t pg, svint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsl_wide_u8_x(svbool_t pg, svuint8_t op1, svuint64_t op2) +svuint8_t test_svlsl_wide_u8_x(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u8,_x,)(pg, op1, op2); } @@ -710,7 +718,7 @@ svuint8_t test_svlsl_wide_u8_x(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsl_wide_u16_x(svbool_t pg, svuint16_t op1, svuint64_t op2) +svuint16_t test_svlsl_wide_u16_x(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u16,_x,)(pg, op1, op2); } @@ -727,7 +735,7 @@ svuint16_t test_svlsl_wide_u16_x(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsl_wide_u32_x(svbool_t pg, svuint32_t op1, svuint64_t op2) +svuint32_t test_svlsl_wide_u32_x(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_u32,_x,)(pg, op1, op2); } @@ -746,7 +754,7 @@ svuint32_t test_svlsl_wide_u32_x(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svlsl_wide_n_s8_m(svbool_t pg, svint8_t op1, uint64_t op2) +svint8_t test_svlsl_wide_n_s8_m(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s8,_m,)(pg, op1, op2); } @@ -767,7 +775,7 @@ svint8_t test_svlsl_wide_n_s8_m(svbool_t pg, svint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svlsl_wide_n_s16_m(svbool_t pg, svint16_t op1, uint64_t op2) +svint16_t test_svlsl_wide_n_s16_m(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s16,_m,)(pg, op1, op2); } @@ -788,7 +796,7 @@ svint16_t test_svlsl_wide_n_s16_m(svbool_t pg, svint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svlsl_wide_n_s32_m(svbool_t pg, svint32_t op1, uint64_t op2) +svint32_t test_svlsl_wide_n_s32_m(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s32,_m,)(pg, op1, op2); } @@ -809,7 +817,7 @@ svint32_t test_svlsl_wide_n_s32_m(svbool_t pg, svint32_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svlsl_wide_n_s8_z(svbool_t pg, svint8_t op1, uint64_t op2) +svint8_t test_svlsl_wide_n_s8_z(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s8,_z,)(pg, op1, op2); } @@ -832,7 +840,7 @@ svint8_t test_svlsl_wide_n_s8_z(svbool_t pg, svint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svlsl_wide_n_s16_z(svbool_t pg, svint16_t op1, uint64_t op2) +svint16_t test_svlsl_wide_n_s16_z(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s16,_z,)(pg, op1, op2); } @@ -855,7 +863,7 @@ svint16_t test_svlsl_wide_n_s16_z(svbool_t pg, svint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svlsl_wide_n_s32_z(svbool_t pg, svint32_t op1, uint64_t op2) +svint32_t test_svlsl_wide_n_s32_z(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s32,_z,)(pg, op1, op2); } @@ -874,7 +882,7 @@ svint32_t test_svlsl_wide_n_s32_z(svbool_t pg, svint32_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svlsl_wide_n_s8_x(svbool_t pg, svint8_t op1, uint64_t op2) +svint8_t test_svlsl_wide_n_s8_x(svbool_t pg, svint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s8,_x,)(pg, op1, op2); } @@ -895,7 +903,7 @@ svint8_t test_svlsl_wide_n_s8_x(svbool_t pg, svint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svlsl_wide_n_s16_x(svbool_t pg, svint16_t op1, uint64_t op2) +svint16_t test_svlsl_wide_n_s16_x(svbool_t pg, svint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s16,_x,)(pg, op1, op2); } @@ -916,7 +924,7 @@ svint16_t test_svlsl_wide_n_s16_x(svbool_t pg, svint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsl.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svlsl_wide_n_s32_x(svbool_t pg, svint32_t op1, uint64_t op2) +svint32_t test_svlsl_wide_n_s32_x(svbool_t pg, svint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsl_wide,_n_s32,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsr.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsr.c index 5efba57d4541978..6244a851619f59a 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsr.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lsr.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svlsr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svlsr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svuint8_t test_svlsr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svlsr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svlsr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svuint16_t test_svlsr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svlsr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svlsr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svuint32_t test_svlsr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svlsr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svlsr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u64,_z,)(pg, op1, op2); } @@ -98,7 +106,7 @@ svuint64_t test_svlsr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svlsr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u8,_m,)(pg, op1, op2); } @@ -115,7 +123,7 @@ svuint8_t test_svlsr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svlsr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u16,_m,)(pg, op1, op2); } @@ -132,7 +140,7 @@ svuint16_t test_svlsr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svlsr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u32,_m,)(pg, op1, op2); } @@ -149,7 +157,7 @@ svuint32_t test_svlsr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svlsr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svlsr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u64,_m,)(pg, op1, op2); } @@ -164,7 +172,7 @@ svuint64_t test_svlsr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsr.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svlsr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u8,_x,)(pg, op1, op2); } @@ -181,7 +189,7 @@ svuint8_t test_svlsr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svlsr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u16,_x,)(pg, op1, op2); } @@ -198,7 +206,7 @@ svuint16_t test_svlsr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svlsr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u32,_x,)(pg, op1, op2); } @@ -215,7 +223,7 @@ svuint32_t test_svlsr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svlsr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svlsr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr,_u64,_x,)(pg, op1, op2); } @@ -232,7 +240,7 @@ svuint64_t test_svlsr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svlsr_wide_u8_z(svbool_t pg, svuint8_t op1, svuint64_t op2) +svuint8_t test_svlsr_wide_u8_z(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u8,_z,)(pg, op1, op2); } @@ -251,7 +259,7 @@ svuint8_t test_svlsr_wide_u8_z(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svlsr_wide_u16_z(svbool_t pg, svuint16_t op1, svuint64_t op2) +svuint16_t test_svlsr_wide_u16_z(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u16,_z,)(pg, op1, op2); } @@ -270,7 +278,7 @@ svuint16_t test_svlsr_wide_u16_z(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svlsr_wide_u32_z(svbool_t pg, svuint32_t op1, svuint64_t op2) +svuint32_t test_svlsr_wide_u32_z(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u32,_z,)(pg, op1, op2); } @@ -285,7 +293,7 @@ svuint32_t test_svlsr_wide_u32_z(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsr_wide_u8_m(svbool_t pg, svuint8_t op1, svuint64_t op2) +svuint8_t test_svlsr_wide_u8_m(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u8,_m,)(pg, op1, op2); } @@ -302,7 +310,7 @@ svuint8_t test_svlsr_wide_u8_m(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsr_wide_u16_m(svbool_t pg, svuint16_t op1, svuint64_t op2) +svuint16_t test_svlsr_wide_u16_m(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u16,_m,)(pg, op1, op2); } @@ -319,7 +327,7 @@ svuint16_t test_svlsr_wide_u16_m(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsr_wide_u32_m(svbool_t pg, svuint32_t op1, svuint64_t op2) +svuint32_t test_svlsr_wide_u32_m(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u32,_m,)(pg, op1, op2); } @@ -334,7 +342,7 @@ svuint32_t test_svlsr_wide_u32_m(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsr_wide_u8_x(svbool_t pg, svuint8_t op1, svuint64_t op2) +svuint8_t test_svlsr_wide_u8_x(svbool_t pg, svuint8_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u8,_x,)(pg, op1, op2); } @@ -351,7 +359,7 @@ svuint8_t test_svlsr_wide_u8_x(svbool_t pg, svuint8_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsr_wide_u16_x(svbool_t pg, svuint16_t op1, svuint64_t op2) +svuint16_t test_svlsr_wide_u16_x(svbool_t pg, svuint16_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u16,_x,)(pg, op1, op2); } @@ -368,7 +376,7 @@ svuint16_t test_svlsr_wide_u16_x(svbool_t pg, svuint16_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsr_wide_u32_x(svbool_t pg, svuint32_t op1, svuint64_t op2) +svuint32_t test_svlsr_wide_u32_x(svbool_t pg, svuint32_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_u32,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint32_t test_svlsr_wide_u32_x(svbool_t pg, svuint32_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsr_wide_n_u8_m(svbool_t pg, svuint8_t op1, uint64_t op2) +svuint8_t test_svlsr_wide_n_u8_m(svbool_t pg, svuint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u8,_m,)(pg, op1, op2); } @@ -408,7 +416,7 @@ svuint8_t test_svlsr_wide_n_u8_m(svbool_t pg, svuint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsr_wide_n_u16_m(svbool_t pg, svuint16_t op1, uint64_t op2) +svuint16_t test_svlsr_wide_n_u16_m(svbool_t pg, svuint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u16,_m,)(pg, op1, op2); } @@ -429,7 +437,7 @@ svuint16_t test_svlsr_wide_n_u16_m(svbool_t pg, svuint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsr_wide_n_u32_m(svbool_t pg, svuint32_t op1, uint64_t op2) +svuint32_t test_svlsr_wide_n_u32_m(svbool_t pg, svuint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u32,_m,)(pg, op1, op2); } @@ -450,7 +458,7 @@ svuint32_t test_svlsr_wide_n_u32_m(svbool_t pg, svuint32_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svlsr_wide_n_u8_z(svbool_t pg, svuint8_t op1, uint64_t op2) +svuint8_t test_svlsr_wide_n_u8_z(svbool_t pg, svuint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u8,_z,)(pg, op1, op2); } @@ -473,7 +481,7 @@ svuint8_t test_svlsr_wide_n_u8_z(svbool_t pg, svuint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svlsr_wide_n_u16_z(svbool_t pg, svuint16_t op1, uint64_t op2) +svuint16_t test_svlsr_wide_n_u16_z(svbool_t pg, svuint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u16,_z,)(pg, op1, op2); } @@ -496,7 +504,7 @@ svuint16_t test_svlsr_wide_n_u16_z(svbool_t pg, svuint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svlsr_wide_n_u32_z(svbool_t pg, svuint32_t op1, uint64_t op2) +svuint32_t test_svlsr_wide_n_u32_z(svbool_t pg, svuint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u32,_z,)(pg, op1, op2); } @@ -515,7 +523,7 @@ svuint32_t test_svlsr_wide_n_u32_z(svbool_t pg, svuint32_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svlsr_wide_n_u8_x(svbool_t pg, svuint8_t op1, uint64_t op2) +svuint8_t test_svlsr_wide_n_u8_x(svbool_t pg, svuint8_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u8,_x,)(pg, op1, op2); } @@ -536,7 +544,7 @@ svuint8_t test_svlsr_wide_n_u8_x(svbool_t pg, svuint8_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svlsr_wide_n_u16_x(svbool_t pg, svuint16_t op1, uint64_t op2) +svuint16_t test_svlsr_wide_n_u16_x(svbool_t pg, svuint16_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u16,_x,)(pg, op1, op2); } @@ -557,7 +565,7 @@ svuint16_t test_svlsr_wide_n_u16_x(svbool_t pg, svuint16_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.lsr.wide.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svlsr_wide_n_u32_x(svbool_t pg, svuint32_t op1, uint64_t op2) +svuint32_t test_svlsr_wide_n_u32_x(svbool_t pg, svuint32_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svlsr_wide,_n_u32,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mad.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mad.c index 0070faba95e3452..f3d286689a86498 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mad.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mad.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmad_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmad_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s8,_z,)(pg, op1, op2, op3); } @@ -45,7 +53,7 @@ svint8_t test_svmad_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmad_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmad_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s16,_z,)(pg, op1, op2, op3); } @@ -64,7 +72,7 @@ svint16_t test_svmad_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmad_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmad_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s32,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svint32_t test_svmad_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmad_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmad_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s64,_z,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svint64_t test_svmad_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmad_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmad_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u8,_z,)(pg, op1, op2, op3); } @@ -119,7 +127,7 @@ svuint8_t test_svmad_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmad_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmad_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u16,_z,)(pg, op1, op2, op3); } @@ -138,7 +146,7 @@ svuint16_t test_svmad_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmad_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmad_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u32,_z,)(pg, op1, op2, op3); } @@ -157,7 +165,7 @@ svuint32_t test_svmad_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmad_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmad_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u64,_z,)(pg, op1, op2, op3); } @@ -172,7 +180,7 @@ svuint64_t test_svmad_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmad_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmad_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s8,_m,)(pg, op1, op2, op3); } @@ -189,7 +197,7 @@ svint8_t test_svmad_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmad_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmad_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s16,_m,)(pg, op1, op2, op3); } @@ -206,7 +214,7 @@ svint16_t test_svmad_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmad_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmad_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s32,_m,)(pg, op1, op2, op3); } @@ -223,7 +231,7 @@ svint32_t test_svmad_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmad_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmad_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s64,_m,)(pg, op1, op2, op3); } @@ -238,7 +246,7 @@ svint64_t test_svmad_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmad_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmad_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u8,_m,)(pg, op1, op2, op3); } @@ -255,7 +263,7 @@ svuint8_t test_svmad_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmad_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmad_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u16,_m,)(pg, op1, op2, op3); } @@ -272,7 +280,7 @@ svuint16_t test_svmad_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmad_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmad_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u32,_m,)(pg, op1, op2, op3); } @@ -289,7 +297,7 @@ svuint32_t test_svmad_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmad_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmad_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u64,_m,)(pg, op1, op2, op3); } @@ -304,7 +312,7 @@ svuint64_t test_svmad_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmad_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmad_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s8,_x,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svint8_t test_svmad_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmad_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmad_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s16,_x,)(pg, op1, op2, op3); } @@ -338,7 +346,7 @@ svint16_t test_svmad_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmad_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmad_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s32,_x,)(pg, op1, op2, op3); } @@ -355,7 +363,7 @@ svint32_t test_svmad_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmad_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmad_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_s64,_x,)(pg, op1, op2, op3); } @@ -370,7 +378,7 @@ svint64_t test_svmad_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmad_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmad_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u8,_x,)(pg, op1, op2, op3); } @@ -387,7 +395,7 @@ svuint8_t test_svmad_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmad_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmad_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u16,_x,)(pg, op1, op2, op3); } @@ -404,7 +412,7 @@ svuint16_t test_svmad_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmad_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmad_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u32,_x,)(pg, op1, op2, op3); } @@ -421,7 +429,7 @@ svuint32_t test_svmad_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmad_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmad_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_u64,_x,)(pg, op1, op2, op3); } @@ -442,7 +450,7 @@ svuint64_t test_svmad_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmad_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmad_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s8,_z,)(pg, op1, op2, op3); } @@ -465,7 +473,7 @@ svint8_t test_svmad_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmad_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmad_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s16,_z,)(pg, op1, op2, op3); } @@ -488,7 +496,7 @@ svint16_t test_svmad_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmad_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmad_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s32,_z,)(pg, op1, op2, op3); } @@ -511,7 +519,7 @@ svint32_t test_svmad_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmad_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmad_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s64,_z,)(pg, op1, op2, op3); } @@ -532,7 +540,7 @@ svint64_t test_svmad_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmad_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmad_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u8,_z,)(pg, op1, op2, op3); } @@ -555,7 +563,7 @@ svuint8_t test_svmad_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmad_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmad_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u16,_z,)(pg, op1, op2, op3); } @@ -578,7 +586,7 @@ svuint16_t test_svmad_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmad_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmad_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u32,_z,)(pg, op1, op2, op3); } @@ -601,7 +609,7 @@ svuint32_t test_svmad_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmad_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmad_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u64,_z,)(pg, op1, op2, op3); } @@ -620,7 +628,7 @@ svuint64_t test_svmad_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmad_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmad_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s8,_m,)(pg, op1, op2, op3); } @@ -641,7 +649,7 @@ svint8_t test_svmad_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmad_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmad_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s16,_m,)(pg, op1, op2, op3); } @@ -662,7 +670,7 @@ svint16_t test_svmad_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmad_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmad_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s32,_m,)(pg, op1, op2, op3); } @@ -683,7 +691,7 @@ svint32_t test_svmad_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmad_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmad_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s64,_m,)(pg, op1, op2, op3); } @@ -702,7 +710,7 @@ svint64_t test_svmad_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mad.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmad_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmad_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u8,_m,)(pg, op1, op2, op3); } @@ -723,7 +731,7 @@ svuint8_t test_svmad_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmad_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmad_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u16,_m,)(pg, op1, op2, op3); } @@ -744,7 +752,7 @@ svuint16_t test_svmad_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmad_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmad_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u32,_m,)(pg, op1, op2, op3); } @@ -765,7 +773,7 @@ svuint32_t test_svmad_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mad.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmad_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmad_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u64,_m,)(pg, op1, op2, op3); } @@ -784,7 +792,7 @@ svuint64_t test_svmad_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmad_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmad_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s8,_x,)(pg, op1, op2, op3); } @@ -805,7 +813,7 @@ svint8_t test_svmad_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmad_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmad_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s16,_x,)(pg, op1, op2, op3); } @@ -826,7 +834,7 @@ svint16_t test_svmad_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmad_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmad_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s32,_x,)(pg, op1, op2, op3); } @@ -847,7 +855,7 @@ svint32_t test_svmad_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmad_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmad_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_s64,_x,)(pg, op1, op2, op3); } @@ -866,7 +874,7 @@ svint64_t test_svmad_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmad_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmad_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u8,_x,)(pg, op1, op2, op3); } @@ -887,7 +895,7 @@ svuint8_t test_svmad_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmad_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmad_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u16,_x,)(pg, op1, op2, op3); } @@ -908,7 +916,7 @@ svuint16_t test_svmad_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmad_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmad_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u32,_x,)(pg, op1, op2, op3); } @@ -929,7 +937,7 @@ svuint32_t test_svmad_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmad_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmad_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_u64,_x,)(pg, op1, op2, op3); } @@ -948,7 +956,7 @@ svuint64_t test_svmad_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmad_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmad_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f16,_z,)(pg, op1, op2, op3); } @@ -967,7 +975,7 @@ svfloat16_t test_svmad_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmad_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmad_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f32,_z,)(pg, op1, op2, op3); } @@ -986,7 +994,7 @@ svfloat32_t test_svmad_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmad_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmad_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f64,_z,)(pg, op1, op2, op3); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svmad_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmad_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmad_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f16,_m,)(pg, op1, op2, op3); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svmad_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmad_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmad_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f32,_m,)(pg, op1, op2, op3); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svmad_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmad_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmad_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f64,_m,)(pg, op1, op2, op3); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svmad_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv8f16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmad_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmad_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f16,_x,)(pg, op1, op2, op3); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svmad_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv4f32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmad_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmad_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f32,_x,)(pg, op1, op2, op3); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svmad_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv2f64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmad_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmad_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_f64,_x,)(pg, op1, op2, op3); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svmad_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmad_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmad_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f16,_z,)(pg, op1, op2, op3); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svmad_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmad_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmad_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f32,_z,)(pg, op1, op2, op3); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svmad_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmad_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmad_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f64,_z,)(pg, op1, op2, op3); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svmad_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmad_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmad_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f16,_m,)(pg, op1, op2, op3); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svmad_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmad_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmad_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f32,_m,)(pg, op1, op2, op3); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svmad_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmad.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmad_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmad_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f64,_m,)(pg, op1, op2, op3); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svmad_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv8f16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmad_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmad_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f16,_x,)(pg, op1, op2, op3); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svmad_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv4f32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmad_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmad_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f32,_x,)(pg, op1, op2, op3); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svmad_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv2f64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmad_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmad_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmad,_n_f64,_x,)(pg, op1, op2, op3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_max.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_max.c index 2cf6cf3439b0de7..1a8ee6ee425c524 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_max.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_max.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmax_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmax_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svmax_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smax.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmax_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmax_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svmax_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smax.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmax_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmax_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svmax_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smax.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmax_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmax_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svmax_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmax_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmax_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svmax_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umax.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmax_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmax_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svmax_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umax.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmax_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmax_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svmax_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umax.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmax_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmax_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svmax_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smax.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmax_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmax_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svmax_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmax_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmax_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svmax_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmax_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmax_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svmax_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmax_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmax_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svmax_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umax.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmax_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmax_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svmax_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmax_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmax_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svmax_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmax_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmax_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svmax_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmax_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmax_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svmax_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmax_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmax_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svmax_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmax_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmax_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svmax_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmax_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmax_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svmax_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmax_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmax_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svmax_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmax_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmax_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svmax_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmax_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmax_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svmax_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmax_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmax_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svmax_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmax_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmax_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svmax_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmax_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmax_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svmax_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smax.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmax_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmax_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svmax_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smax.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmax_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmax_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svmax_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smax.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmax_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmax_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svmax_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmax_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmax_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svmax_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umax.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmax_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmax_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svmax_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umax.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmax_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmax_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svmax_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umax.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmax_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmax_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svmax_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smax.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmax_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmax_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svmax_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmax_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmax_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svmax_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmax_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmax_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svmax_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmax_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmax_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svmax_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umax.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmax_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmax_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svmax_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmax_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmax_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svmax_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmax_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmax_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svmax_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmax_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmax_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svmax_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmax_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmax_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svmax_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmax_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmax_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svmax_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmax_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmax_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svmax_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smax.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmax_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmax_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svmax_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmax_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmax_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svmax_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmax_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmax_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svmax_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmax_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmax_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svmax_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umax.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmax_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmax_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_u64,_x,)(pg, op1, op2); } @@ -948,7 +956,7 @@ svuint64_t test_svmax_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmax_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmax_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f16,_z,)(pg, op1, op2); } @@ -967,7 +975,7 @@ svfloat16_t test_svmax_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmax_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmax_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f32,_z,)(pg, op1, op2); } @@ -986,7 +994,7 @@ svfloat32_t test_svmax_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmax_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmax_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f64,_z,)(pg, op1, op2); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svmax_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmax_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmax_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f16,_m,)(pg, op1, op2); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svmax_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmax_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmax_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f32,_m,)(pg, op1, op2); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svmax_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmax_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmax_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f64,_m,)(pg, op1, op2); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svmax_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmax_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmax_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f16,_x,)(pg, op1, op2); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svmax_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmax_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmax_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f32,_x,)(pg, op1, op2); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svmax_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmax_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmax_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_f64,_x,)(pg, op1, op2); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svmax_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmax_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmax_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f16,_z,)(pg, op1, op2); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svmax_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmax_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmax_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f32,_z,)(pg, op1, op2); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svmax_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmax_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmax_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f64,_z,)(pg, op1, op2); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svmax_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmax_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmax_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f16,_m,)(pg, op1, op2); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svmax_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmax_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmax_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f32,_m,)(pg, op1, op2); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svmax_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmax_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmax_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f64,_m,)(pg, op1, op2); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svmax_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmax_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmax_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f16,_x,)(pg, op1, op2); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svmax_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmax_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmax_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f32,_x,)(pg, op1, op2); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svmax_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmax.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmax_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmax_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmax,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnm.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnm.c index 530717887d3985e..dc6f56b25b6d90e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnm.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnm.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmaxnm_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmaxnm_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f16,_z,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svfloat16_t test_svmaxnm_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmaxnm_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmaxnm_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f32,_z,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svfloat32_t test_svmaxnm_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmaxnm_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmaxnm_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f64,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svfloat64_t test_svmaxnm_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmaxnm_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmaxnm_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f16,_m,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svfloat16_t test_svmaxnm_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmaxnm_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmaxnm_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f32,_m,)(pg, op1, op2); } @@ -117,7 +125,7 @@ svfloat32_t test_svmaxnm_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmaxnm_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmaxnm_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f64,_m,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svfloat64_t test_svmaxnm_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmaxnm_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmaxnm_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f16,_x,)(pg, op1, op2); } @@ -151,7 +159,7 @@ svfloat16_t test_svmaxnm_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmaxnm_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmaxnm_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f32,_x,)(pg, op1, op2); } @@ -168,7 +176,7 @@ svfloat32_t test_svmaxnm_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmaxnm_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmaxnm_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_f64,_x,)(pg, op1, op2); } @@ -191,7 +199,7 @@ svfloat64_t test_svmaxnm_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmaxnm_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmaxnm_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f16,_z,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svfloat16_t test_svmaxnm_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmaxnm_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmaxnm_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f32,_z,)(pg, op1, op2); } @@ -237,7 +245,7 @@ svfloat32_t test_svmaxnm_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmaxnm_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmaxnm_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f64,_z,)(pg, op1, op2); } @@ -258,7 +266,7 @@ svfloat64_t test_svmaxnm_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmaxnm_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmaxnm_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f16,_m,)(pg, op1, op2); } @@ -279,7 +287,7 @@ svfloat16_t test_svmaxnm_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmaxnm_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmaxnm_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f32,_m,)(pg, op1, op2); } @@ -300,7 +308,7 @@ svfloat32_t test_svmaxnm_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmaxnm_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmaxnm_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f64,_m,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svfloat64_t test_svmaxnm_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmaxnm_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmaxnm_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f16,_x,)(pg, op1, op2); } @@ -342,7 +350,7 @@ svfloat16_t test_svmaxnm_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmaxnm_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmaxnm_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f32,_x,)(pg, op1, op2); } @@ -363,7 +371,7 @@ svfloat32_t test_svmaxnm_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmaxnm.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmaxnm_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmaxnm_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnm,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnmv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnmv.c index 803bce2ee72c1cd..fd34dc853c342ab 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnmv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxnmv.c @@ -5,9 +5,17 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.fmaxnmv.nxv8f16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svmaxnmv_f16(svbool_t pg, svfloat16_t op) +float16_t test_svmaxnmv_f16(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnmv,_f16,,)(pg, op); } @@ -44,7 +52,7 @@ float16_t test_svmaxnmv_f16(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.fmaxnmv.nxv4f32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svmaxnmv_f32(svbool_t pg, svfloat32_t op) +float32_t test_svmaxnmv_f32(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnmv,_f32,,)(pg, op); } @@ -61,7 +69,7 @@ float32_t test_svmaxnmv_f32(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.fmaxnmv.nxv2f64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svmaxnmv_f64(svbool_t pg, svfloat64_t op) +float64_t test_svmaxnmv_f64(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxnmv,_f64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxv.c index a49e6cb669c83ea..1308cd6f852c0c7 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_maxv.c @@ -5,9 +5,17 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.smaxv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svmaxv_s8(svbool_t pg, svint8_t op) +int8_t test_svmaxv_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_s8,,)(pg, op); } @@ -42,7 +50,7 @@ int8_t test_svmaxv_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.smaxv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -int16_t test_svmaxv_s16(svbool_t pg, svint16_t op) +int16_t test_svmaxv_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_s16,,)(pg, op); } @@ -59,7 +67,7 @@ int16_t test_svmaxv_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.smaxv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svmaxv_s32(svbool_t pg, svint32_t op) +int32_t test_svmaxv_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_s32,,)(pg, op); } @@ -76,7 +84,7 @@ int32_t test_svmaxv_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.smaxv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svmaxv_s64(svbool_t pg, svint64_t op) +int64_t test_svmaxv_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_s64,,)(pg, op); } @@ -91,7 +99,7 @@ int64_t test_svmaxv_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.umaxv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svmaxv_u8(svbool_t pg, svuint8_t op) +uint8_t test_svmaxv_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_u8,,)(pg, op); } @@ -108,7 +116,7 @@ uint8_t test_svmaxv_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.umaxv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -uint16_t test_svmaxv_u16(svbool_t pg, svuint16_t op) +uint16_t test_svmaxv_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_u16,,)(pg, op); } @@ -125,7 +133,7 @@ uint16_t test_svmaxv_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.umaxv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svmaxv_u32(svbool_t pg, svuint32_t op) +uint32_t test_svmaxv_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_u32,,)(pg, op); } @@ -142,7 +150,7 @@ uint32_t test_svmaxv_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.umaxv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svmaxv_u64(svbool_t pg, svuint64_t op) +uint64_t test_svmaxv_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_u64,,)(pg, op); } @@ -159,7 +167,7 @@ uint64_t test_svmaxv_u64(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.fmaxv.nxv8f16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svmaxv_f16(svbool_t pg, svfloat16_t op) +float16_t test_svmaxv_f16(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_f16,,)(pg, op); } @@ -176,7 +184,7 @@ float16_t test_svmaxv_f16(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.fmaxv.nxv4f32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svmaxv_f32(svbool_t pg, svfloat32_t op) +float32_t test_svmaxv_f32(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_f32,,)(pg, op); } @@ -193,7 +201,7 @@ float32_t test_svmaxv_f32(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.fmaxv.nxv2f64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svmaxv_f64(svbool_t pg, svfloat64_t op) +float64_t test_svmaxv_f64(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmaxv,_f64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_min.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_min.c index 80c3dd15e8bd2b1..ba2dc81267e177b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_min.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_min.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmin_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmin_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svmin_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smin.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmin_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmin_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svmin_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smin.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmin_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmin_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svmin_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smin.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmin_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmin_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svmin_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmin_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmin_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svmin_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umin.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmin_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmin_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svmin_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umin.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmin_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmin_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svmin_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umin.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmin_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmin_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svmin_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smin.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmin_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmin_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svmin_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmin_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmin_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svmin_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmin_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmin_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svmin_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmin_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmin_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svmin_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umin.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmin_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmin_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svmin_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmin_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmin_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svmin_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmin_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmin_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svmin_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmin_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmin_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svmin_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmin_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmin_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svmin_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmin_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmin_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svmin_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmin_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmin_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svmin_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmin_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmin_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svmin_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmin_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmin_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svmin_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmin_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmin_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svmin_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmin_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmin_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svmin_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmin_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmin_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svmin_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmin_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmin_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svmin_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smin.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmin_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmin_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svmin_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smin.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmin_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmin_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svmin_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smin.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmin_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmin_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svmin_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmin_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmin_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svmin_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umin.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmin_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmin_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svmin_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umin.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmin_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmin_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svmin_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umin.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmin_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmin_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svmin_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smin.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmin_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmin_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svmin_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmin_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmin_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svmin_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmin_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmin_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svmin_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmin_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmin_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svmin_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umin.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmin_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmin_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svmin_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmin_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmin_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svmin_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmin_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmin_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svmin_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmin_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmin_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svmin_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmin_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmin_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svmin_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmin_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmin_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svmin_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmin_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmin_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svmin_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smin.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmin_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmin_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svmin_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmin_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmin_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svmin_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmin_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmin_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svmin_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmin_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmin_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svmin_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umin.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmin_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmin_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_u64,_x,)(pg, op1, op2); } @@ -948,7 +956,7 @@ svuint64_t test_svmin_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmin_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmin_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f16,_z,)(pg, op1, op2); } @@ -967,7 +975,7 @@ svfloat16_t test_svmin_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmin_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmin_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f32,_z,)(pg, op1, op2); } @@ -986,7 +994,7 @@ svfloat32_t test_svmin_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmin_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmin_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f64,_z,)(pg, op1, op2); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svmin_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmin_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmin_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f16,_m,)(pg, op1, op2); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svmin_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmin_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmin_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f32,_m,)(pg, op1, op2); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svmin_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmin_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmin_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f64,_m,)(pg, op1, op2); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svmin_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmin_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmin_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f16,_x,)(pg, op1, op2); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svmin_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmin_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmin_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f32,_x,)(pg, op1, op2); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svmin_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmin_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmin_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_f64,_x,)(pg, op1, op2); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svmin_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmin_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmin_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f16,_z,)(pg, op1, op2); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svmin_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmin_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmin_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f32,_z,)(pg, op1, op2); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svmin_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmin_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmin_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f64,_z,)(pg, op1, op2); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svmin_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmin_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmin_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f16,_m,)(pg, op1, op2); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svmin_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmin_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmin_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f32,_m,)(pg, op1, op2); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svmin_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmin_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmin_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f64,_m,)(pg, op1, op2); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svmin_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmin_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmin_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f16,_x,)(pg, op1, op2); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svmin_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmin_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmin_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f32,_x,)(pg, op1, op2); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svmin_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmin.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmin_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmin_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmin,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnm.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnm.c index 127294f939afb47..631273f72a65879 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnm.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnm.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svminnm_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svminnm_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f16,_z,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svfloat16_t test_svminnm_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svminnm_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svminnm_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f32,_z,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svfloat32_t test_svminnm_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svminnm_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svminnm_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f64,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svfloat64_t test_svminnm_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svminnm_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svminnm_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f16,_m,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svfloat16_t test_svminnm_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svminnm_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svminnm_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f32,_m,)(pg, op1, op2); } @@ -117,7 +125,7 @@ svfloat32_t test_svminnm_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svminnm_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svminnm_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f64,_m,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svfloat64_t test_svminnm_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svminnm_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svminnm_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f16,_x,)(pg, op1, op2); } @@ -151,7 +159,7 @@ svfloat16_t test_svminnm_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svminnm_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svminnm_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f32,_x,)(pg, op1, op2); } @@ -168,7 +176,7 @@ svfloat32_t test_svminnm_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svminnm_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svminnm_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_f64,_x,)(pg, op1, op2); } @@ -191,7 +199,7 @@ svfloat64_t test_svminnm_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svminnm_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svminnm_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f16,_z,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svfloat16_t test_svminnm_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svminnm_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svminnm_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f32,_z,)(pg, op1, op2); } @@ -237,7 +245,7 @@ svfloat32_t test_svminnm_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svminnm_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svminnm_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f64,_z,)(pg, op1, op2); } @@ -258,7 +266,7 @@ svfloat64_t test_svminnm_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svminnm_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svminnm_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f16,_m,)(pg, op1, op2); } @@ -279,7 +287,7 @@ svfloat16_t test_svminnm_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svminnm_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svminnm_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f32,_m,)(pg, op1, op2); } @@ -300,7 +308,7 @@ svfloat32_t test_svminnm_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svminnm_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svminnm_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f64,_m,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svfloat64_t test_svminnm_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svminnm_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svminnm_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f16,_x,)(pg, op1, op2); } @@ -342,7 +350,7 @@ svfloat16_t test_svminnm_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svminnm_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svminnm_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f32,_x,)(pg, op1, op2); } @@ -363,7 +371,7 @@ svfloat32_t test_svminnm_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fminnm.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svminnm_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svminnm_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svminnm,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnmv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnmv.c index d4bc5fcb71853c1..58293685b163624 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnmv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minnmv.c @@ -5,9 +5,17 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.fminnmv.nxv8f16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svminnmv_f16(svbool_t pg, svfloat16_t op) +float16_t test_svminnmv_f16(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminnmv,_f16,,)(pg, op); } @@ -44,7 +52,7 @@ float16_t test_svminnmv_f16(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.fminnmv.nxv4f32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svminnmv_f32(svbool_t pg, svfloat32_t op) +float32_t test_svminnmv_f32(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminnmv,_f32,,)(pg, op); } @@ -61,7 +69,7 @@ float32_t test_svminnmv_f32(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.fminnmv.nxv2f64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svminnmv_f64(svbool_t pg, svfloat64_t op) +float64_t test_svminnmv_f64(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminnmv,_f64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minv.c index e01e50340181c57..acfa6a67a09748f 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_minv.c @@ -5,9 +5,17 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.sminv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svminv_s8(svbool_t pg, svint8_t op) +int8_t test_svminv_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_s8,,)(pg, op); } @@ -42,7 +50,7 @@ int8_t test_svminv_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.sminv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -int16_t test_svminv_s16(svbool_t pg, svint16_t op) +int16_t test_svminv_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_s16,,)(pg, op); } @@ -59,7 +67,7 @@ int16_t test_svminv_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.sminv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svminv_s32(svbool_t pg, svint32_t op) +int32_t test_svminv_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_s32,,)(pg, op); } @@ -76,7 +84,7 @@ int32_t test_svminv_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.sminv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svminv_s64(svbool_t pg, svint64_t op) +int64_t test_svminv_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_s64,,)(pg, op); } @@ -91,7 +99,7 @@ int64_t test_svminv_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.uminv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svminv_u8(svbool_t pg, svuint8_t op) +uint8_t test_svminv_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_u8,,)(pg, op); } @@ -108,7 +116,7 @@ uint8_t test_svminv_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.uminv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -uint16_t test_svminv_u16(svbool_t pg, svuint16_t op) +uint16_t test_svminv_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_u16,,)(pg, op); } @@ -125,7 +133,7 @@ uint16_t test_svminv_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.uminv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svminv_u32(svbool_t pg, svuint32_t op) +uint32_t test_svminv_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_u32,,)(pg, op); } @@ -142,7 +150,7 @@ uint32_t test_svminv_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uminv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svminv_u64(svbool_t pg, svuint64_t op) +uint64_t test_svminv_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_u64,,)(pg, op); } @@ -159,7 +167,7 @@ uint64_t test_svminv_u64(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call half @llvm.aarch64.sve.fminv.nxv8f16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // -float16_t test_svminv_f16(svbool_t pg, svfloat16_t op) +float16_t test_svminv_f16(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_f16,,)(pg, op); } @@ -176,7 +184,7 @@ float16_t test_svminv_f16(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call float @llvm.aarch64.sve.fminv.nxv4f32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // -float32_t test_svminv_f32(svbool_t pg, svfloat32_t op) +float32_t test_svminv_f32(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_f32,,)(pg, op); } @@ -193,7 +201,7 @@ float32_t test_svminv_f32(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call double @llvm.aarch64.sve.fminv.nxv2f64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // -float64_t test_svminv_f64(svbool_t pg, svfloat64_t op) +float64_t test_svminv_f64(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svminv,_f64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mla.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mla.c index 6946c5b472daa2e..f92216dfbbc5f45 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mla.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mla.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmla_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmla_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s8,_z,)(pg, op1, op2, op3); } @@ -45,7 +53,7 @@ svint8_t test_svmla_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmla_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmla_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s16,_z,)(pg, op1, op2, op3); } @@ -64,7 +72,7 @@ svint16_t test_svmla_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmla_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmla_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s32,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svint32_t test_svmla_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmla_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmla_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s64,_z,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svint64_t test_svmla_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmla_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmla_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u8,_z,)(pg, op1, op2, op3); } @@ -119,7 +127,7 @@ svuint8_t test_svmla_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmla_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmla_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u16,_z,)(pg, op1, op2, op3); } @@ -138,7 +146,7 @@ svuint16_t test_svmla_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmla_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmla_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u32,_z,)(pg, op1, op2, op3); } @@ -157,7 +165,7 @@ svuint32_t test_svmla_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmla_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmla_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u64,_z,)(pg, op1, op2, op3); } @@ -172,7 +180,7 @@ svuint64_t test_svmla_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmla_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmla_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s8,_m,)(pg, op1, op2, op3); } @@ -189,7 +197,7 @@ svint8_t test_svmla_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmla_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmla_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s16,_m,)(pg, op1, op2, op3); } @@ -206,7 +214,7 @@ svint16_t test_svmla_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmla_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmla_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s32,_m,)(pg, op1, op2, op3); } @@ -223,7 +231,7 @@ svint32_t test_svmla_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmla_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmla_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s64,_m,)(pg, op1, op2, op3); } @@ -238,7 +246,7 @@ svint64_t test_svmla_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmla_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmla_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u8,_m,)(pg, op1, op2, op3); } @@ -255,7 +263,7 @@ svuint8_t test_svmla_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmla_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmla_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u16,_m,)(pg, op1, op2, op3); } @@ -272,7 +280,7 @@ svuint16_t test_svmla_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmla_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmla_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u32,_m,)(pg, op1, op2, op3); } @@ -289,7 +297,7 @@ svuint32_t test_svmla_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmla_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmla_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u64,_m,)(pg, op1, op2, op3); } @@ -304,7 +312,7 @@ svuint64_t test_svmla_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmla_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmla_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s8,_x,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svint8_t test_svmla_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmla_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmla_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s16,_x,)(pg, op1, op2, op3); } @@ -338,7 +346,7 @@ svint16_t test_svmla_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmla_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmla_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s32,_x,)(pg, op1, op2, op3); } @@ -355,7 +363,7 @@ svint32_t test_svmla_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmla_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmla_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_s64,_x,)(pg, op1, op2, op3); } @@ -370,7 +378,7 @@ svint64_t test_svmla_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmla_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmla_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u8,_x,)(pg, op1, op2, op3); } @@ -387,7 +395,7 @@ svuint8_t test_svmla_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmla_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmla_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u16,_x,)(pg, op1, op2, op3); } @@ -404,7 +412,7 @@ svuint16_t test_svmla_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmla_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmla_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u32,_x,)(pg, op1, op2, op3); } @@ -421,7 +429,7 @@ svuint32_t test_svmla_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmla_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmla_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_u64,_x,)(pg, op1, op2, op3); } @@ -442,7 +450,7 @@ svuint64_t test_svmla_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmla_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmla_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s8,_z,)(pg, op1, op2, op3); } @@ -465,7 +473,7 @@ svint8_t test_svmla_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmla_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmla_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s16,_z,)(pg, op1, op2, op3); } @@ -488,7 +496,7 @@ svint16_t test_svmla_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmla_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmla_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s32,_z,)(pg, op1, op2, op3); } @@ -511,7 +519,7 @@ svint32_t test_svmla_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmla_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmla_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s64,_z,)(pg, op1, op2, op3); } @@ -532,7 +540,7 @@ svint64_t test_svmla_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmla_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmla_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u8,_z,)(pg, op1, op2, op3); } @@ -555,7 +563,7 @@ svuint8_t test_svmla_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmla_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmla_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u16,_z,)(pg, op1, op2, op3); } @@ -578,7 +586,7 @@ svuint16_t test_svmla_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmla_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmla_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u32,_z,)(pg, op1, op2, op3); } @@ -601,7 +609,7 @@ svuint32_t test_svmla_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmla_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmla_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u64,_z,)(pg, op1, op2, op3); } @@ -620,7 +628,7 @@ svuint64_t test_svmla_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmla_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmla_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s8,_m,)(pg, op1, op2, op3); } @@ -641,7 +649,7 @@ svint8_t test_svmla_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmla_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmla_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s16,_m,)(pg, op1, op2, op3); } @@ -662,7 +670,7 @@ svint16_t test_svmla_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmla_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmla_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s32,_m,)(pg, op1, op2, op3); } @@ -683,7 +691,7 @@ svint32_t test_svmla_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmla_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmla_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s64,_m,)(pg, op1, op2, op3); } @@ -702,7 +710,7 @@ svint64_t test_svmla_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmla_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmla_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u8,_m,)(pg, op1, op2, op3); } @@ -723,7 +731,7 @@ svuint8_t test_svmla_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmla_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmla_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u16,_m,)(pg, op1, op2, op3); } @@ -744,7 +752,7 @@ svuint16_t test_svmla_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmla_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmla_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u32,_m,)(pg, op1, op2, op3); } @@ -765,7 +773,7 @@ svuint32_t test_svmla_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmla_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmla_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u64,_m,)(pg, op1, op2, op3); } @@ -784,7 +792,7 @@ svuint64_t test_svmla_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmla_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmla_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s8,_x,)(pg, op1, op2, op3); } @@ -805,7 +813,7 @@ svint8_t test_svmla_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmla_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmla_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s16,_x,)(pg, op1, op2, op3); } @@ -826,7 +834,7 @@ svint16_t test_svmla_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmla_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmla_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s32,_x,)(pg, op1, op2, op3); } @@ -847,7 +855,7 @@ svint32_t test_svmla_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmla_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmla_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_s64,_x,)(pg, op1, op2, op3); } @@ -866,7 +874,7 @@ svint64_t test_svmla_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmla_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmla_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u8,_x,)(pg, op1, op2, op3); } @@ -887,7 +895,7 @@ svuint8_t test_svmla_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmla_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmla_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u16,_x,)(pg, op1, op2, op3); } @@ -908,7 +916,7 @@ svuint16_t test_svmla_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmla_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmla_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u32,_x,)(pg, op1, op2, op3); } @@ -929,7 +937,7 @@ svuint32_t test_svmla_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mla.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmla_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmla_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_u64,_x,)(pg, op1, op2, op3); } @@ -948,7 +956,7 @@ svuint64_t test_svmla_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f16,_z,)(pg, op1, op2, op3); } @@ -967,7 +975,7 @@ svfloat16_t test_svmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f32,_z,)(pg, op1, op2, op3); } @@ -986,7 +994,7 @@ svfloat32_t test_svmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f64,_z,)(pg, op1, op2, op3); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f16,_m,)(pg, op1, op2, op3); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f32,_m,)(pg, op1, op2, op3); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f64,_m,)(pg, op1, op2, op3); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f16,_x,)(pg, op1, op2, op3); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f32,_x,)(pg, op1, op2, op3); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_f64,_x,)(pg, op1, op2, op3); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmla_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmla_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f16,_z,)(pg, op1, op2, op3); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svmla_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmla_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmla_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f32,_z,)(pg, op1, op2, op3); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svmla_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmla_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmla_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f64,_z,)(pg, op1, op2, op3); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svmla_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmla_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmla_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f16,_m,)(pg, op1, op2, op3); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svmla_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmla_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmla_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f32,_m,)(pg, op1, op2, op3); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svmla_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmla_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmla_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f64,_m,)(pg, op1, op2, op3); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svmla_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmla_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmla_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f16,_x,)(pg, op1, op2, op3); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svmla_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmla_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmla_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f32,_x,)(pg, op1, op2, op3); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svmla_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmla.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmla_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmla_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla,_n_f64,_x,)(pg, op1, op2, op3); } @@ -1298,7 +1306,7 @@ svfloat64_t test_svmla_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmla.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svmla_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmla_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla_lane,_f16,,)(op1, op2, op3, 0); } @@ -1313,7 +1321,7 @@ svfloat16_t test_svmla_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmla.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 7) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svmla_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmla_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla_lane,_f16,,)(op1, op2, op3, 7); } @@ -1328,7 +1336,7 @@ svfloat16_t test_svmla_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmla.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svmla_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmla_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla_lane,_f32,,)(op1, op2, op3, 0); } @@ -1343,7 +1351,7 @@ svfloat32_t test_svmla_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmla.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svmla_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmla_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla_lane,_f32,,)(op1, op2, op3, 3); } @@ -1358,7 +1366,7 @@ svfloat32_t test_svmla_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmla.lane.nxv2f64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svmla_lane_f64(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmla_lane_f64(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla_lane,_f64,,)(op1, op2, op3, 0); } @@ -1373,7 +1381,7 @@ svfloat64_t test_svmla_lane_f64(svfloat64_t op1, svfloat64_t op2, svfloat64_t op // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmla.lane.nxv2f64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svmla_lane_f64_1(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmla_lane_f64_1(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmla_lane,_f64,,)(op1, op2, op3, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mls.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mls.c index 650b844e8ed0c5d..bbffece5348b372 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mls.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mls.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmls_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmls_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s8,_z,)(pg, op1, op2, op3); } @@ -45,7 +53,7 @@ svint8_t test_svmls_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmls_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmls_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s16,_z,)(pg, op1, op2, op3); } @@ -64,7 +72,7 @@ svint16_t test_svmls_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmls_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmls_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s32,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svint32_t test_svmls_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmls_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmls_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s64,_z,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svint64_t test_svmls_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmls_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmls_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u8,_z,)(pg, op1, op2, op3); } @@ -119,7 +127,7 @@ svuint8_t test_svmls_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmls_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmls_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u16,_z,)(pg, op1, op2, op3); } @@ -138,7 +146,7 @@ svuint16_t test_svmls_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmls_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmls_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u32,_z,)(pg, op1, op2, op3); } @@ -157,7 +165,7 @@ svuint32_t test_svmls_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmls_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmls_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u64,_z,)(pg, op1, op2, op3); } @@ -172,7 +180,7 @@ svuint64_t test_svmls_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmls_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmls_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s8,_m,)(pg, op1, op2, op3); } @@ -189,7 +197,7 @@ svint8_t test_svmls_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmls_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmls_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s16,_m,)(pg, op1, op2, op3); } @@ -206,7 +214,7 @@ svint16_t test_svmls_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmls_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmls_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s32,_m,)(pg, op1, op2, op3); } @@ -223,7 +231,7 @@ svint32_t test_svmls_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmls_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmls_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s64,_m,)(pg, op1, op2, op3); } @@ -238,7 +246,7 @@ svint64_t test_svmls_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmls_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmls_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u8,_m,)(pg, op1, op2, op3); } @@ -255,7 +263,7 @@ svuint8_t test_svmls_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmls_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmls_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u16,_m,)(pg, op1, op2, op3); } @@ -272,7 +280,7 @@ svuint16_t test_svmls_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmls_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmls_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u32,_m,)(pg, op1, op2, op3); } @@ -289,7 +297,7 @@ svuint32_t test_svmls_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmls_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmls_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u64,_m,)(pg, op1, op2, op3); } @@ -304,7 +312,7 @@ svuint64_t test_svmls_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmls_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmls_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s8,_x,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svint8_t test_svmls_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmls_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmls_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s16,_x,)(pg, op1, op2, op3); } @@ -338,7 +346,7 @@ svint16_t test_svmls_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmls_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmls_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s32,_x,)(pg, op1, op2, op3); } @@ -355,7 +363,7 @@ svint32_t test_svmls_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmls_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmls_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_s64,_x,)(pg, op1, op2, op3); } @@ -370,7 +378,7 @@ svint64_t test_svmls_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmls_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmls_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u8,_x,)(pg, op1, op2, op3); } @@ -387,7 +395,7 @@ svuint8_t test_svmls_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmls_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmls_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u16,_x,)(pg, op1, op2, op3); } @@ -404,7 +412,7 @@ svuint16_t test_svmls_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmls_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmls_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u32,_x,)(pg, op1, op2, op3); } @@ -421,7 +429,7 @@ svuint32_t test_svmls_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmls_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmls_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_u64,_x,)(pg, op1, op2, op3); } @@ -442,7 +450,7 @@ svuint64_t test_svmls_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmls_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmls_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s8,_z,)(pg, op1, op2, op3); } @@ -465,7 +473,7 @@ svint8_t test_svmls_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmls_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmls_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s16,_z,)(pg, op1, op2, op3); } @@ -488,7 +496,7 @@ svint16_t test_svmls_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmls_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmls_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s32,_z,)(pg, op1, op2, op3); } @@ -511,7 +519,7 @@ svint32_t test_svmls_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmls_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmls_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s64,_z,)(pg, op1, op2, op3); } @@ -532,7 +540,7 @@ svint64_t test_svmls_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmls_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmls_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u8,_z,)(pg, op1, op2, op3); } @@ -555,7 +563,7 @@ svuint8_t test_svmls_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmls_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmls_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u16,_z,)(pg, op1, op2, op3); } @@ -578,7 +586,7 @@ svuint16_t test_svmls_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmls_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmls_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u32,_z,)(pg, op1, op2, op3); } @@ -601,7 +609,7 @@ svuint32_t test_svmls_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmls_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmls_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u64,_z,)(pg, op1, op2, op3); } @@ -620,7 +628,7 @@ svuint64_t test_svmls_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmls_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmls_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s8,_m,)(pg, op1, op2, op3); } @@ -641,7 +649,7 @@ svint8_t test_svmls_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmls_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmls_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s16,_m,)(pg, op1, op2, op3); } @@ -662,7 +670,7 @@ svint16_t test_svmls_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmls_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmls_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s32,_m,)(pg, op1, op2, op3); } @@ -683,7 +691,7 @@ svint32_t test_svmls_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmls_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmls_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s64,_m,)(pg, op1, op2, op3); } @@ -702,7 +710,7 @@ svint64_t test_svmls_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmls_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmls_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u8,_m,)(pg, op1, op2, op3); } @@ -723,7 +731,7 @@ svuint8_t test_svmls_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmls_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmls_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u16,_m,)(pg, op1, op2, op3); } @@ -744,7 +752,7 @@ svuint16_t test_svmls_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmls_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmls_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u32,_m,)(pg, op1, op2, op3); } @@ -765,7 +773,7 @@ svuint32_t test_svmls_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmls_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmls_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u64,_m,)(pg, op1, op2, op3); } @@ -784,7 +792,7 @@ svuint64_t test_svmls_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmls_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmls_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s8,_x,)(pg, op1, op2, op3); } @@ -805,7 +813,7 @@ svint8_t test_svmls_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmls_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmls_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s16,_x,)(pg, op1, op2, op3); } @@ -826,7 +834,7 @@ svint16_t test_svmls_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmls_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmls_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s32,_x,)(pg, op1, op2, op3); } @@ -847,7 +855,7 @@ svint32_t test_svmls_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmls_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmls_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_s64,_x,)(pg, op1, op2, op3); } @@ -866,7 +874,7 @@ svint64_t test_svmls_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmls_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmls_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u8,_x,)(pg, op1, op2, op3); } @@ -887,7 +895,7 @@ svuint8_t test_svmls_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmls_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmls_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u16,_x,)(pg, op1, op2, op3); } @@ -908,7 +916,7 @@ svuint16_t test_svmls_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmls_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmls_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u32,_x,)(pg, op1, op2, op3); } @@ -929,7 +937,7 @@ svuint32_t test_svmls_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmls_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmls_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_u64,_x,)(pg, op1, op2, op3); } @@ -948,7 +956,7 @@ svuint64_t test_svmls_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmls_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmls_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f16,_z,)(pg, op1, op2, op3); } @@ -967,7 +975,7 @@ svfloat16_t test_svmls_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmls_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmls_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f32,_z,)(pg, op1, op2, op3); } @@ -986,7 +994,7 @@ svfloat32_t test_svmls_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmls_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmls_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f64,_z,)(pg, op1, op2, op3); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svmls_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmls_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmls_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f16,_m,)(pg, op1, op2, op3); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svmls_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmls_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmls_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f32,_m,)(pg, op1, op2, op3); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svmls_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmls_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmls_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f64,_m,)(pg, op1, op2, op3); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svmls_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmls_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmls_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f16,_x,)(pg, op1, op2, op3); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svmls_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmls_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmls_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f32,_x,)(pg, op1, op2, op3); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svmls_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmls_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmls_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_f64,_x,)(pg, op1, op2, op3); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svmls_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmls_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmls_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f16,_z,)(pg, op1, op2, op3); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svmls_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmls_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmls_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f32,_z,)(pg, op1, op2, op3); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svmls_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmls_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmls_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f64,_z,)(pg, op1, op2, op3); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svmls_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmls_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmls_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f16,_m,)(pg, op1, op2, op3); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svmls_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmls_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmls_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f32,_m,)(pg, op1, op2, op3); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svmls_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmls_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmls_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f64,_m,)(pg, op1, op2, op3); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svmls_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmls_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmls_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f16,_x,)(pg, op1, op2, op3); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svmls_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmls_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmls_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f32,_x,)(pg, op1, op2, op3); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svmls_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmls_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmls_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls,_n_f64,_x,)(pg, op1, op2, op3); } @@ -1298,7 +1306,7 @@ svfloat64_t test_svmls_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmls.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svmls_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmls_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls_lane,_f16,,)(op1, op2, op3, 0); } @@ -1313,7 +1321,7 @@ svfloat16_t test_svmls_lane_f16(svfloat16_t op1, svfloat16_t op2, svfloat16_t op // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmls.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 7) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svmls_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmls_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls_lane,_f16,,)(op1, op2, op3, 7); } @@ -1328,7 +1336,7 @@ svfloat16_t test_svmls_lane_f16_1(svfloat16_t op1, svfloat16_t op2, svfloat16_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmls.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svmls_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmls_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls_lane,_f32,,)(op1, op2, op3, 0); } @@ -1343,7 +1351,7 @@ svfloat32_t test_svmls_lane_f32(svfloat32_t op1, svfloat32_t op2, svfloat32_t op // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmls.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svmls_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmls_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls_lane,_f32,,)(op1, op2, op3, 3); } @@ -1358,7 +1366,7 @@ svfloat32_t test_svmls_lane_f32_1(svfloat32_t op1, svfloat32_t op2, svfloat32_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmls.lane.nxv2f64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svmls_lane_f64(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmls_lane_f64(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls_lane,_f64,,)(op1, op2, op3, 0); } @@ -1373,7 +1381,7 @@ svfloat64_t test_svmls_lane_f64(svfloat64_t op1, svfloat64_t op2, svfloat64_t op // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmls.lane.nxv2f64( [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svmls_lane_f64_1(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmls_lane_f64_1(svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmls_lane,_f64,,)(op1, op2, op3, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mov.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mov.c index 79e68be49b2b307..18c5516a24dace3 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mov.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mov.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.and.z.nxv16i1( [[PG:%.*]], [[OP:%.*]], [[OP]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svmov_b_z(svbool_t pg, svbool_t op) +svbool_t test_svmov_b_z(svbool_t pg, svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svmov,_b,_z,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_msb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_msb.c index 888b8331b6b50b6..ea2c59ff799fae1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_msb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_msb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmsb_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmsb_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s8,_z,)(pg, op1, op2, op3); } @@ -45,7 +53,7 @@ svint8_t test_svmsb_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmsb_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmsb_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s16,_z,)(pg, op1, op2, op3); } @@ -64,7 +72,7 @@ svint16_t test_svmsb_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmsb_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmsb_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s32,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svint32_t test_svmsb_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmsb_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmsb_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s64,_z,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svint64_t test_svmsb_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmsb_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmsb_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u8,_z,)(pg, op1, op2, op3); } @@ -119,7 +127,7 @@ svuint8_t test_svmsb_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmsb_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmsb_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u16,_z,)(pg, op1, op2, op3); } @@ -138,7 +146,7 @@ svuint16_t test_svmsb_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmsb_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmsb_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u32,_z,)(pg, op1, op2, op3); } @@ -157,7 +165,7 @@ svuint32_t test_svmsb_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmsb_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmsb_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u64,_z,)(pg, op1, op2, op3); } @@ -172,7 +180,7 @@ svuint64_t test_svmsb_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmsb_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmsb_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s8,_m,)(pg, op1, op2, op3); } @@ -189,7 +197,7 @@ svint8_t test_svmsb_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmsb_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmsb_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s16,_m,)(pg, op1, op2, op3); } @@ -206,7 +214,7 @@ svint16_t test_svmsb_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmsb_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmsb_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s32,_m,)(pg, op1, op2, op3); } @@ -223,7 +231,7 @@ svint32_t test_svmsb_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmsb_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmsb_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s64,_m,)(pg, op1, op2, op3); } @@ -238,7 +246,7 @@ svint64_t test_svmsb_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmsb_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmsb_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u8,_m,)(pg, op1, op2, op3); } @@ -255,7 +263,7 @@ svuint8_t test_svmsb_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmsb_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmsb_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u16,_m,)(pg, op1, op2, op3); } @@ -272,7 +280,7 @@ svuint16_t test_svmsb_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmsb_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmsb_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u32,_m,)(pg, op1, op2, op3); } @@ -289,7 +297,7 @@ svuint32_t test_svmsb_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmsb_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmsb_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u64,_m,)(pg, op1, op2, op3); } @@ -304,7 +312,7 @@ svuint64_t test_svmsb_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmsb_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) +svint8_t test_svmsb_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s8,_x,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svint8_t test_svmsb_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, svint8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmsb_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) +svint16_t test_svmsb_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s16,_x,)(pg, op1, op2, op3); } @@ -338,7 +346,7 @@ svint16_t test_svmsb_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, svint16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmsb_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) +svint32_t test_svmsb_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s32,_x,)(pg, op1, op2, op3); } @@ -355,7 +363,7 @@ svint32_t test_svmsb_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, svint32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmsb_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) +svint64_t test_svmsb_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_s64,_x,)(pg, op1, op2, op3); } @@ -370,7 +378,7 @@ svint64_t test_svmsb_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, svint64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmsb_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) +svuint8_t test_svmsb_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u8,_x,)(pg, op1, op2, op3); } @@ -387,7 +395,7 @@ svuint8_t test_svmsb_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, svuint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmsb_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) +svuint16_t test_svmsb_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u16,_x,)(pg, op1, op2, op3); } @@ -404,7 +412,7 @@ svuint16_t test_svmsb_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, svuint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmsb_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) +svuint32_t test_svmsb_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u32,_x,)(pg, op1, op2, op3); } @@ -421,7 +429,7 @@ svuint32_t test_svmsb_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, svuint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmsb_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) +svuint64_t test_svmsb_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_u64,_x,)(pg, op1, op2, op3); } @@ -442,7 +450,7 @@ svuint64_t test_svmsb_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, svuint6 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmsb_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmsb_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s8,_z,)(pg, op1, op2, op3); } @@ -465,7 +473,7 @@ svint8_t test_svmsb_n_s8_z(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmsb_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmsb_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s16,_z,)(pg, op1, op2, op3); } @@ -488,7 +496,7 @@ svint16_t test_svmsb_n_s16_z(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmsb_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmsb_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s32,_z,)(pg, op1, op2, op3); } @@ -511,7 +519,7 @@ svint32_t test_svmsb_n_s32_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmsb_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmsb_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s64,_z,)(pg, op1, op2, op3); } @@ -532,7 +540,7 @@ svint64_t test_svmsb_n_s64_z(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmsb_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmsb_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u8,_z,)(pg, op1, op2, op3); } @@ -555,7 +563,7 @@ svuint8_t test_svmsb_n_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmsb_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmsb_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u16,_z,)(pg, op1, op2, op3); } @@ -578,7 +586,7 @@ svuint16_t test_svmsb_n_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmsb_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmsb_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u32,_z,)(pg, op1, op2, op3); } @@ -601,7 +609,7 @@ svuint32_t test_svmsb_n_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmsb_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmsb_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u64,_z,)(pg, op1, op2, op3); } @@ -620,7 +628,7 @@ svuint64_t test_svmsb_n_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmsb_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmsb_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s8,_m,)(pg, op1, op2, op3); } @@ -641,7 +649,7 @@ svint8_t test_svmsb_n_s8_m(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmsb_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmsb_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s16,_m,)(pg, op1, op2, op3); } @@ -662,7 +670,7 @@ svint16_t test_svmsb_n_s16_m(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmsb_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmsb_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s32,_m,)(pg, op1, op2, op3); } @@ -683,7 +691,7 @@ svint32_t test_svmsb_n_s32_m(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmsb_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmsb_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s64,_m,)(pg, op1, op2, op3); } @@ -702,7 +710,7 @@ svint64_t test_svmsb_n_s64_m(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.msb.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmsb_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmsb_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u8,_m,)(pg, op1, op2, op3); } @@ -723,7 +731,7 @@ svuint8_t test_svmsb_n_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmsb_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmsb_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u16,_m,)(pg, op1, op2, op3); } @@ -744,7 +752,7 @@ svuint16_t test_svmsb_n_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmsb_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmsb_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u32,_m,)(pg, op1, op2, op3); } @@ -765,7 +773,7 @@ svuint32_t test_svmsb_n_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.msb.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmsb_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmsb_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u64,_m,)(pg, op1, op2, op3); } @@ -784,7 +792,7 @@ svuint64_t test_svmsb_n_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmsb_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) +svint8_t test_svmsb_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s8,_x,)(pg, op1, op2, op3); } @@ -805,7 +813,7 @@ svint8_t test_svmsb_n_s8_x(svbool_t pg, svint8_t op1, svint8_t op2, int8_t op3) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmsb_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) +svint16_t test_svmsb_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s16,_x,)(pg, op1, op2, op3); } @@ -826,7 +834,7 @@ svint16_t test_svmsb_n_s16_x(svbool_t pg, svint16_t op1, svint16_t op2, int16_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmsb_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) +svint32_t test_svmsb_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s32,_x,)(pg, op1, op2, op3); } @@ -847,7 +855,7 @@ svint32_t test_svmsb_n_s32_x(svbool_t pg, svint32_t op1, svint32_t op2, int32_t // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmsb_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) +svint64_t test_svmsb_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_s64,_x,)(pg, op1, op2, op3); } @@ -866,7 +874,7 @@ svint64_t test_svmsb_n_s64_x(svbool_t pg, svint64_t op1, svint64_t op2, int64_t // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmsb_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) +svuint8_t test_svmsb_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u8,_x,)(pg, op1, op2, op3); } @@ -887,7 +895,7 @@ svuint8_t test_svmsb_n_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2, uint8_t o // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv8i16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmsb_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) +svuint16_t test_svmsb_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u16,_x,)(pg, op1, op2, op3); } @@ -908,7 +916,7 @@ svuint16_t test_svmsb_n_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2, uint1 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmsb_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) +svuint32_t test_svmsb_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u32,_x,)(pg, op1, op2, op3); } @@ -929,7 +937,7 @@ svuint32_t test_svmsb_n_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2, uint3 // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mls.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmsb_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) +svuint64_t test_svmsb_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_u64,_x,)(pg, op1, op2, op3); } @@ -948,7 +956,7 @@ svuint64_t test_svmsb_n_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2, uint6 // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmsb_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmsb_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f16,_z,)(pg, op1, op2, op3); } @@ -967,7 +975,7 @@ svfloat16_t test_svmsb_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmsb_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmsb_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f32,_z,)(pg, op1, op2, op3); } @@ -986,7 +994,7 @@ svfloat32_t test_svmsb_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmsb_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmsb_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f64,_z,)(pg, op1, op2, op3); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svmsb_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmsb_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmsb_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f16,_m,)(pg, op1, op2, op3); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svmsb_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmsb_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmsb_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f32,_m,)(pg, op1, op2, op3); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svmsb_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmsb_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmsb_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f64,_m,)(pg, op1, op2, op3); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svmsb_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv8f16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmsb_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svmsb_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f16,_x,)(pg, op1, op2, op3); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svmsb_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv4f32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmsb_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svmsb_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f32,_x,)(pg, op1, op2, op3); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svmsb_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv2f64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmsb_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svmsb_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_f64,_x,)(pg, op1, op2, op3); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svmsb_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmsb_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmsb_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f16,_z,)(pg, op1, op2, op3); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svmsb_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmsb_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmsb_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f32,_z,)(pg, op1, op2, op3); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svmsb_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmsb_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmsb_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f64,_z,)(pg, op1, op2, op3); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svmsb_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmsb_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmsb_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f16,_m,)(pg, op1, op2, op3); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svmsb_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmsb_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmsb_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f32,_m,)(pg, op1, op2, op3); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svmsb_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmsb.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmsb_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmsb_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f64,_m,)(pg, op1, op2, op3); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svmsb_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv8f16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmsb_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svmsb_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f16,_x,)(pg, op1, op2, op3); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svmsb_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv4f32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmsb_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svmsb_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f32,_x,)(pg, op1, op2, op3); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svmsb_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, fl // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmls.u.nxv2f64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmsb_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svmsb_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svmsb,_n_f64,_x,)(pg, op1, op2, op3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mul.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mul.c index f58f78eacb98071..e122b57d532dda6 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mul.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mul.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmul_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmul_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svmul_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmul_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmul_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svmul_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmul_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmul_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svmul_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmul_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmul_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svmul_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmul_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmul_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svmul_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmul_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmul_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svmul_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmul_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmul_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svmul_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmul_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmul_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svmul_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmul_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmul_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svmul_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmul_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmul_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svmul_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmul_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmul_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svmul_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmul_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmul_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svmul_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmul_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmul_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svmul_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmul_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmul_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svmul_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmul_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmul_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svmul_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmul_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmul_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svmul_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmul_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmul_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svmul_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmul_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmul_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svmul_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmul_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmul_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svmul_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmul_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmul_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svmul_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmul_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmul_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svmul_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmul_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmul_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svmul_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmul_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmul_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svmul_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmul_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmul_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svmul_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmul_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmul_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svmul_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmul_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmul_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svmul_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmul_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmul_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svmul_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmul_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmul_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svmul_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmul_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmul_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svmul_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmul_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmul_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svmul_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmul_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmul_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svmul_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmul_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmul_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svmul_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmul_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmul_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svmul_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmul_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmul_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svmul_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmul_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmul_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svmul_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmul_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmul_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svmul_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmul_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmul_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svmul_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmul_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmul_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svmul_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmul_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmul_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svmul_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmul_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmul_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svmul_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmul_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmul_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svmul_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmul_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmul_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svmul_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmul_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmul_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svmul_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmul_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmul_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svmul_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmul_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmul_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svmul_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmul_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmul_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svmul_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmul_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmul_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svmul_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.mul.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmul_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmul_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_u64,_x,)(pg, op1, op2); } @@ -948,7 +956,7 @@ svuint64_t test_svmul_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmul_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmul_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f16,_z,)(pg, op1, op2); } @@ -967,7 +975,7 @@ svfloat16_t test_svmul_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmul_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmul_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f32,_z,)(pg, op1, op2); } @@ -986,7 +994,7 @@ svfloat32_t test_svmul_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmul_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmul_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f64,_z,)(pg, op1, op2); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svmul_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmul_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmul_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f16,_m,)(pg, op1, op2); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svmul_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmul_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmul_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f32,_m,)(pg, op1, op2); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svmul_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmul_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmul_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f64,_m,)(pg, op1, op2); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svmul_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmul_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmul_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f16,_x,)(pg, op1, op2); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svmul_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmul_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmul_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f32,_x,)(pg, op1, op2); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svmul_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmul_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmul_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_f64,_x,)(pg, op1, op2); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svmul_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmul_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmul_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f16,_z,)(pg, op1, op2); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svmul_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmul_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmul_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f32,_z,)(pg, op1, op2); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svmul_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmul_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmul_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f64,_z,)(pg, op1, op2); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svmul_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmul_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmul_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f16,_m,)(pg, op1, op2); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svmul_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmul_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmul_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f32,_m,)(pg, op1, op2); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svmul_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmul_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmul_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f64,_m,)(pg, op1, op2); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svmul_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmul_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmul_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f16,_x,)(pg, op1, op2); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svmul_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmul_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmul_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f32,_x,)(pg, op1, op2); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svmul_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmul.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmul_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmul_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul,_n_f64,_x,)(pg, op1, op2); } @@ -1298,7 +1306,7 @@ svfloat64_t test_svmul_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmul.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svmul_lane_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmul_lane_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul_lane,_f16,,)(op1, op2, 0); } @@ -1313,7 +1321,7 @@ svfloat16_t test_svmul_lane_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmul.lane.nxv8f16( [[OP1:%.*]], [[OP2:%.*]], i32 7) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svmul_lane_f16_1(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmul_lane_f16_1(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul_lane,_f16,,)(op1, op2, 7); } @@ -1328,7 +1336,7 @@ svfloat16_t test_svmul_lane_f16_1(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmul.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svmul_lane_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmul_lane_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul_lane,_f32,,)(op1, op2, 0); } @@ -1343,7 +1351,7 @@ svfloat32_t test_svmul_lane_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmul.lane.nxv4f32( [[OP1:%.*]], [[OP2:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svmul_lane_f32_1(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmul_lane_f32_1(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul_lane,_f32,,)(op1, op2, 3); } @@ -1358,7 +1366,7 @@ svfloat32_t test_svmul_lane_f32_1(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmul.lane.nxv2f64( [[OP1:%.*]], [[OP2:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svmul_lane_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmul_lane_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul_lane,_f64,,)(op1, op2, 0); } @@ -1373,7 +1381,7 @@ svfloat64_t test_svmul_lane_f64(svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.fmul.lane.nxv2f64( [[OP1:%.*]], [[OP2:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svmul_lane_f64_1(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmul_lane_f64_1(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmul_lane,_f64,,)(op1, op2, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulh.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulh.c index 6698fdfca836ee3..898911c840197e7 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulh.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulh.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmulh_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmulh_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svmulh_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmulh_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmulh_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svmulh_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmulh_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmulh_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svmulh_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmulh_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmulh_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svmulh_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmulh_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmulh_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svmulh_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmulh_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmulh_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svmulh_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmulh_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmulh_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svmulh_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmulh_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmulh_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svmulh_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmulh_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmulh_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svmulh_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmulh_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmulh_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svmulh_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmulh_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmulh_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svmulh_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmulh_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmulh_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svmulh_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmulh_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmulh_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svmulh_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmulh_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmulh_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svmulh_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmulh_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmulh_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svmulh_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmulh_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmulh_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svmulh_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmulh_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svmulh_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svmulh_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmulh_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svmulh_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svmulh_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmulh_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svmulh_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svmulh_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmulh_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svmulh_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svmulh_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmulh_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svmulh_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svmulh_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmulh_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svmulh_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svmulh_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmulh_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svmulh_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svmulh_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmulh_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svmulh_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svmulh_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svmulh_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmulh_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svmulh_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svmulh_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmulh_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svmulh_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svmulh_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmulh_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svmulh_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svmulh_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmulh_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svmulh_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svmulh_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmulh_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svmulh_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svmulh_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmulh_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svmulh_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svmulh_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmulh_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svmulh_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svmulh_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmulh_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svmulh_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmulh_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmulh_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svmulh_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmulh_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmulh_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svmulh_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmulh_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmulh_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svmulh_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmulh_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmulh_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svmulh_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmulh_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmulh_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svmulh_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmulh_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmulh_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svmulh_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmulh_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmulh_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svmulh_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmulh_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmulh_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svmulh_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svmulh_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svmulh_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svmulh_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svmulh_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svmulh_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svmulh_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svmulh_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svmulh_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svmulh_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.smulh.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svmulh_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svmulh_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svmulh_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svmulh_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svmulh_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svmulh_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svmulh_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svmulh_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svmulh_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svmulh_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svmulh_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svmulh_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.umulh.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svmulh_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svmulh_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulh,_n_u64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulx.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulx.c index e615b3eab17cd61..e7b9e62436709ce 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulx.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mulx.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmulx_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmulx_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f16,_z,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svfloat16_t test_svmulx_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmulx_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmulx_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f32,_z,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svfloat32_t test_svmulx_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmulx_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmulx_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f64,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svfloat64_t test_svmulx_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmulx_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmulx_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f16,_m,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svfloat16_t test_svmulx_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmulx_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmulx_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f32,_m,)(pg, op1, op2); } @@ -117,7 +125,7 @@ svfloat32_t test_svmulx_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmulx_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmulx_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f64,_m,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svfloat64_t test_svmulx_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmulx_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svmulx_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f16,_x,)(pg, op1, op2); } @@ -151,7 +159,7 @@ svfloat16_t test_svmulx_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmulx_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svmulx_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f32,_x,)(pg, op1, op2); } @@ -168,7 +176,7 @@ svfloat32_t test_svmulx_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmulx_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svmulx_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_f64,_x,)(pg, op1, op2); } @@ -191,7 +199,7 @@ svfloat64_t test_svmulx_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svmulx_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmulx_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f16,_z,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svfloat16_t test_svmulx_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svmulx_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmulx_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f32,_z,)(pg, op1, op2); } @@ -237,7 +245,7 @@ svfloat32_t test_svmulx_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svmulx_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmulx_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f64,_z,)(pg, op1, op2); } @@ -258,7 +266,7 @@ svfloat64_t test_svmulx_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmulx_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmulx_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f16,_m,)(pg, op1, op2); } @@ -279,7 +287,7 @@ svfloat16_t test_svmulx_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmulx_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmulx_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f32,_m,)(pg, op1, op2); } @@ -300,7 +308,7 @@ svfloat32_t test_svmulx_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmulx_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmulx_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f64,_m,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svfloat64_t test_svmulx_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svmulx_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svmulx_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f16,_x,)(pg, op1, op2); } @@ -342,7 +350,7 @@ svfloat16_t test_svmulx_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svmulx_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svmulx_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f32,_x,)(pg, op1, op2); } @@ -363,7 +371,7 @@ svfloat32_t test_svmulx_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fmulx.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svmulx_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svmulx_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svmulx,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nand.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nand.c index 26e29149df2c623..5b8bede05af7d3a 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nand.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nand.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.nand.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svnand_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svnand_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svnand,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_neg.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_neg.c index f591b84930d4ad6..64b4d68951102ab 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_neg.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_neg.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.neg.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svneg_s8_z(svbool_t pg, svint8_t op) +svint8_t test_svneg_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svint8_t test_svneg_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svneg_s16_z(svbool_t pg, svint16_t op) +svint16_t test_svneg_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svint16_t test_svneg_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svneg_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svneg_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svint32_t test_svneg_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svneg_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svneg_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svint64_t test_svneg_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.neg.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svneg_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) +svint8_t test_svneg_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s8,_m,)(inactive, pg, op); } @@ -107,7 +115,7 @@ svint8_t test_svneg_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svneg_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) +svint16_t test_svneg_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s16,_m,)(inactive, pg, op); } @@ -124,7 +132,7 @@ svint16_t test_svneg_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svneg_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svneg_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s32,_m,)(inactive, pg, op); } @@ -141,7 +149,7 @@ svint32_t test_svneg_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svneg_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svneg_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s64,_m,)(inactive, pg, op); } @@ -156,7 +164,7 @@ svint64_t test_svneg_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.neg.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svneg_s8_x(svbool_t pg, svint8_t op) +svint8_t test_svneg_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s8,_x,)(pg, op); } @@ -173,7 +181,7 @@ svint8_t test_svneg_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svneg_s16_x(svbool_t pg, svint16_t op) +svint16_t test_svneg_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s16,_x,)(pg, op); } @@ -190,7 +198,7 @@ svint16_t test_svneg_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svneg_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svneg_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s32,_x,)(pg, op); } @@ -207,7 +215,7 @@ svint32_t test_svneg_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.neg.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svneg_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svneg_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_s64,_x,)(pg, op); } @@ -224,7 +232,7 @@ svint64_t test_svneg_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svneg_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svneg_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f16,_z,)(pg, op); } @@ -241,7 +249,7 @@ svfloat16_t test_svneg_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svneg_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svneg_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f32,_z,)(pg, op); } @@ -258,7 +266,7 @@ svfloat32_t test_svneg_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svneg_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svneg_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f64,_z,)(pg, op); } @@ -275,7 +283,7 @@ svfloat64_t test_svneg_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svneg_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svneg_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f16,_m,)(inactive, pg, op); } @@ -292,7 +300,7 @@ svfloat16_t test_svneg_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svneg_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svneg_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f32,_m,)(inactive, pg, op); } @@ -309,7 +317,7 @@ svfloat32_t test_svneg_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svneg_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svneg_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f64,_m,)(inactive, pg, op); } @@ -326,7 +334,7 @@ svfloat64_t test_svneg_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svneg_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svneg_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f16,_x,)(pg, op); } @@ -343,7 +351,7 @@ svfloat16_t test_svneg_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svneg_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svneg_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f32,_x,)(pg, op); } @@ -360,7 +368,7 @@ svfloat32_t test_svneg_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fneg.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svneg_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svneg_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svneg,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmad.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmad.c index 1a3edeae057c887..e56c554f385e44a 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmad.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmad.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmad_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmad_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f16,_z,)(pg, op1, op2, op3); } @@ -47,7 +55,7 @@ svfloat16_t test_svnmad_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmad_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmad_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f32,_z,)(pg, op1, op2, op3); } @@ -66,7 +74,7 @@ svfloat32_t test_svnmad_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmad_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmad_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f64,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svfloat64_t test_svnmad_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmad_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmad_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f16,_m,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svfloat16_t test_svnmad_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmad_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmad_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f32,_m,)(pg, op1, op2, op3); } @@ -117,7 +125,7 @@ svfloat32_t test_svnmad_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmad_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmad_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f64,_m,)(pg, op1, op2, op3); } @@ -134,7 +142,7 @@ svfloat64_t test_svnmad_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv8f16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmad_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmad_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f16,_x,)(pg, op1, op2, op3); } @@ -151,7 +159,7 @@ svfloat16_t test_svnmad_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv4f32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmad_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmad_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f32,_x,)(pg, op1, op2, op3); } @@ -168,7 +176,7 @@ svfloat32_t test_svnmad_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv2f64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmad_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmad_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_f64,_x,)(pg, op1, op2, op3); } @@ -191,7 +199,7 @@ svfloat64_t test_svnmad_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmad_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmad_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f16,_z,)(pg, op1, op2, op3); } @@ -214,7 +222,7 @@ svfloat16_t test_svnmad_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmad_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmad_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f32,_z,)(pg, op1, op2, op3); } @@ -237,7 +245,7 @@ svfloat32_t test_svnmad_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmad_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmad_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f64,_z,)(pg, op1, op2, op3); } @@ -258,7 +266,7 @@ svfloat64_t test_svnmad_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmad_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmad_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f16,_m,)(pg, op1, op2, op3); } @@ -279,7 +287,7 @@ svfloat16_t test_svnmad_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmad_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmad_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f32,_m,)(pg, op1, op2, op3); } @@ -300,7 +308,7 @@ svfloat32_t test_svnmad_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmad.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmad_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmad_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f64,_m,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svfloat64_t test_svnmad_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv8f16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmad_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmad_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f16,_x,)(pg, op1, op2, op3); } @@ -342,7 +350,7 @@ svfloat16_t test_svnmad_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv4f32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmad_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmad_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f32,_x,)(pg, op1, op2, op3); } @@ -363,7 +371,7 @@ svfloat32_t test_svnmad_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv2f64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmad_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmad_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmad,_n_f64,_x,)(pg, op1, op2, op3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmla.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmla.c index 9545ec736f0df13..a6d5a0a2039d9a0 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmla.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmla.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f16,_z,)(pg, op1, op2, op3); } @@ -47,7 +55,7 @@ svfloat16_t test_svnmla_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f32,_z,)(pg, op1, op2, op3); } @@ -66,7 +74,7 @@ svfloat32_t test_svnmla_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f64,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svfloat64_t test_svnmla_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f16,_m,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svfloat16_t test_svnmla_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f32,_m,)(pg, op1, op2, op3); } @@ -117,7 +125,7 @@ svfloat32_t test_svnmla_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f64,_m,)(pg, op1, op2, op3); } @@ -134,7 +142,7 @@ svfloat64_t test_svnmla_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f16,_x,)(pg, op1, op2, op3); } @@ -151,7 +159,7 @@ svfloat16_t test_svnmla_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f32,_x,)(pg, op1, op2, op3); } @@ -168,7 +176,7 @@ svfloat32_t test_svnmla_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_f64,_x,)(pg, op1, op2, op3); } @@ -191,7 +199,7 @@ svfloat64_t test_svnmla_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmla_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmla_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f16,_z,)(pg, op1, op2, op3); } @@ -214,7 +222,7 @@ svfloat16_t test_svnmla_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmla_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmla_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f32,_z,)(pg, op1, op2, op3); } @@ -237,7 +245,7 @@ svfloat32_t test_svnmla_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmla_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmla_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f64,_z,)(pg, op1, op2, op3); } @@ -258,7 +266,7 @@ svfloat64_t test_svnmla_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmla_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmla_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f16,_m,)(pg, op1, op2, op3); } @@ -279,7 +287,7 @@ svfloat16_t test_svnmla_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmla_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmla_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f32,_m,)(pg, op1, op2, op3); } @@ -300,7 +308,7 @@ svfloat32_t test_svnmla_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmla_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmla_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f64,_m,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svfloat64_t test_svnmla_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmla_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmla_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f16,_x,)(pg, op1, op2, op3); } @@ -342,7 +350,7 @@ svfloat16_t test_svnmla_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmla_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmla_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f32,_x,)(pg, op1, op2, op3); } @@ -363,7 +371,7 @@ svfloat32_t test_svnmla_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmla.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmla_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmla_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmla,_n_f64,_x,)(pg, op1, op2, op3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmls.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmls.c index 12d564e04feb3b2..d0f12cfc59f16d1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmls.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmls.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmls_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmls_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f16,_z,)(pg, op1, op2, op3); } @@ -47,7 +55,7 @@ svfloat16_t test_svnmls_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmls_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmls_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f32,_z,)(pg, op1, op2, op3); } @@ -66,7 +74,7 @@ svfloat32_t test_svnmls_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmls_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmls_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f64,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svfloat64_t test_svnmls_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmls_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmls_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f16,_m,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svfloat16_t test_svnmls_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmls_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmls_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f32,_m,)(pg, op1, op2, op3); } @@ -117,7 +125,7 @@ svfloat32_t test_svnmls_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmls_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmls_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f64,_m,)(pg, op1, op2, op3); } @@ -134,7 +142,7 @@ svfloat64_t test_svnmls_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmls_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmls_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f16,_x,)(pg, op1, op2, op3); } @@ -151,7 +159,7 @@ svfloat16_t test_svnmls_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmls_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmls_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f32,_x,)(pg, op1, op2, op3); } @@ -168,7 +176,7 @@ svfloat32_t test_svnmls_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmls_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmls_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_f64,_x,)(pg, op1, op2, op3); } @@ -191,7 +199,7 @@ svfloat64_t test_svnmls_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmls_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmls_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f16,_z,)(pg, op1, op2, op3); } @@ -214,7 +222,7 @@ svfloat16_t test_svnmls_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmls_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmls_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f32,_z,)(pg, op1, op2, op3); } @@ -237,7 +245,7 @@ svfloat32_t test_svnmls_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmls_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmls_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f64,_z,)(pg, op1, op2, op3); } @@ -258,7 +266,7 @@ svfloat64_t test_svnmls_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmls_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmls_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f16,_m,)(pg, op1, op2, op3); } @@ -279,7 +287,7 @@ svfloat16_t test_svnmls_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmls_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmls_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f32,_m,)(pg, op1, op2, op3); } @@ -300,7 +308,7 @@ svfloat32_t test_svnmls_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmls_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmls_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f64,_m,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svfloat64_t test_svnmls_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmls_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmls_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f16,_x,)(pg, op1, op2, op3); } @@ -342,7 +350,7 @@ svfloat16_t test_svnmls_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmls_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmls_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f32,_x,)(pg, op1, op2, op3); } @@ -363,7 +371,7 @@ svfloat32_t test_svnmls_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmls_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmls_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmls,_n_f64,_x,)(pg, op1, op2, op3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmsb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmsb.c index e12b13d0469f1f2..1a5eea19cb48610 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmsb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmsb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmsb_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmsb_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f16,_z,)(pg, op1, op2, op3); } @@ -47,7 +55,7 @@ svfloat16_t test_svnmsb_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmsb_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmsb_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f32,_z,)(pg, op1, op2, op3); } @@ -66,7 +74,7 @@ svfloat32_t test_svnmsb_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmsb_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmsb_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f64,_z,)(pg, op1, op2, op3); } @@ -83,7 +91,7 @@ svfloat64_t test_svnmsb_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmsb_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmsb_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f16,_m,)(pg, op1, op2, op3); } @@ -100,7 +108,7 @@ svfloat16_t test_svnmsb_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmsb_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmsb_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f32,_m,)(pg, op1, op2, op3); } @@ -117,7 +125,7 @@ svfloat32_t test_svnmsb_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[OP3:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmsb_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmsb_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f64,_m,)(pg, op1, op2, op3); } @@ -134,7 +142,7 @@ svfloat64_t test_svnmsb_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv8f16( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmsb_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) +svfloat16_t test_svnmsb_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svfloat16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f16,_x,)(pg, op1, op2, op3); } @@ -151,7 +159,7 @@ svfloat16_t test_svnmsb_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv4f32( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmsb_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) +svfloat32_t test_svnmsb_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svfloat32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f32,_x,)(pg, op1, op2, op3); } @@ -168,7 +176,7 @@ svfloat32_t test_svnmsb_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, svf // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv2f64( [[TMP0]], [[OP3:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmsb_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) +svfloat64_t test_svnmsb_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svfloat64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_f64,_x,)(pg, op1, op2, op3); } @@ -191,7 +199,7 @@ svfloat64_t test_svnmsb_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, svf // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svnmsb_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmsb_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f16,_z,)(pg, op1, op2, op3); } @@ -214,7 +222,7 @@ svfloat16_t test_svnmsb_n_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svnmsb_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmsb_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f32,_z,)(pg, op1, op2, op3); } @@ -237,7 +245,7 @@ svfloat32_t test_svnmsb_n_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svnmsb_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmsb_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f64,_z,)(pg, op1, op2, op3); } @@ -258,7 +266,7 @@ svfloat64_t test_svnmsb_n_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmsb_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmsb_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f16,_m,)(pg, op1, op2, op3); } @@ -279,7 +287,7 @@ svfloat16_t test_svnmsb_n_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmsb_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmsb_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f32,_m,)(pg, op1, op2, op3); } @@ -300,7 +308,7 @@ svfloat32_t test_svnmsb_n_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmsb.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmsb_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmsb_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f64,_m,)(pg, op1, op2, op3); } @@ -321,7 +329,7 @@ svfloat64_t test_svnmsb_n_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv8f16( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svnmsb_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) +svfloat16_t test_svnmsb_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, float16_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f16,_x,)(pg, op1, op2, op3); } @@ -342,7 +350,7 @@ svfloat16_t test_svnmsb_n_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv4f32( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svnmsb_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) +svfloat32_t test_svnmsb_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, float32_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f32,_x,)(pg, op1, op2, op3); } @@ -363,7 +371,7 @@ svfloat32_t test_svnmsb_n_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2, f // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fnmls.u.nxv2f64( [[TMP0]], [[DOTSPLAT]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svnmsb_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) +svfloat64_t test_svnmsb_n_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2, float64_t op3) MODE_ATTR { return SVE_ACLE_FUNC(svnmsb,_n_f64,_x,)(pg, op1, op2, op3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nor.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nor.c index d10b592dae815cd..ae09bed7fff728f 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nor.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nor.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.nor.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svnor_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svnor_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svnor,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_not.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_not.c index 68e538b758a96f6..c329d9e1137a20a 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_not.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_not.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.not.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svnot_s8_z(svbool_t pg, svint8_t op) +svint8_t test_svnot_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svint8_t test_svnot_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svnot_s16_z(svbool_t pg, svint16_t op) +svint16_t test_svnot_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svint16_t test_svnot_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svnot_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svnot_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svint32_t test_svnot_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svnot_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svnot_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svint64_t test_svnot_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.not.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svnot_u8_z(svbool_t pg, svuint8_t op) +svuint8_t test_svnot_u8_z(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u8,_z,)(pg, op); } @@ -107,7 +115,7 @@ svuint8_t test_svnot_u8_z(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svnot_u16_z(svbool_t pg, svuint16_t op) +svuint16_t test_svnot_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u16,_z,)(pg, op); } @@ -124,7 +132,7 @@ svuint16_t test_svnot_u16_z(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svnot_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svnot_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u32,_z,)(pg, op); } @@ -141,7 +149,7 @@ svuint32_t test_svnot_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svnot_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svnot_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u64,_z,)(pg, op); } @@ -156,7 +164,7 @@ svuint64_t test_svnot_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.not.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svnot_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) +svint8_t test_svnot_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s8,_m,)(inactive, pg, op); } @@ -173,7 +181,7 @@ svint8_t test_svnot_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svnot_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) +svint16_t test_svnot_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s16,_m,)(inactive, pg, op); } @@ -190,7 +198,7 @@ svint16_t test_svnot_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svnot_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svnot_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s32,_m,)(inactive, pg, op); } @@ -207,7 +215,7 @@ svint32_t test_svnot_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svnot_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svnot_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s64,_m,)(inactive, pg, op); } @@ -222,7 +230,7 @@ svint64_t test_svnot_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.not.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svnot_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) +svuint8_t test_svnot_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u8,_m,)(inactive, pg, op); } @@ -239,7 +247,7 @@ svuint8_t test_svnot_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svnot_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) +svuint16_t test_svnot_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u16,_m,)(inactive, pg, op); } @@ -256,7 +264,7 @@ svuint16_t test_svnot_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svnot_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svnot_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u32,_m,)(inactive, pg, op); } @@ -273,7 +281,7 @@ svuint32_t test_svnot_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svnot_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svnot_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u64,_m,)(inactive, pg, op); } @@ -288,7 +296,7 @@ svuint64_t test_svnot_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.not.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svnot_s8_x(svbool_t pg, svint8_t op) +svint8_t test_svnot_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s8,_x,)(pg, op); } @@ -305,7 +313,7 @@ svint8_t test_svnot_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svnot_s16_x(svbool_t pg, svint16_t op) +svint16_t test_svnot_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s16,_x,)(pg, op); } @@ -322,7 +330,7 @@ svint16_t test_svnot_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svnot_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svnot_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s32,_x,)(pg, op); } @@ -339,7 +347,7 @@ svint32_t test_svnot_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svnot_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svnot_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_s64,_x,)(pg, op); } @@ -354,7 +362,7 @@ svint64_t test_svnot_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.not.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svnot_u8_x(svbool_t pg, svuint8_t op) +svuint8_t test_svnot_u8_x(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u8,_x,)(pg, op); } @@ -371,7 +379,7 @@ svuint8_t test_svnot_u8_x(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svnot_u16_x(svbool_t pg, svuint16_t op) +svuint16_t test_svnot_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u16,_x,)(pg, op); } @@ -388,7 +396,7 @@ svuint16_t test_svnot_u16_x(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svnot_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svnot_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u32,_x,)(pg, op); } @@ -405,7 +413,7 @@ svuint32_t test_svnot_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.not.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svnot_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svnot_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_u64,_x,)(pg, op); } @@ -420,7 +428,7 @@ svuint64_t test_svnot_u64_x(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.eor.z.nxv16i1( [[PG:%.*]], [[OP:%.*]], [[PG]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svnot_b_z(svbool_t pg, svbool_t op) +svbool_t test_svnot_b_z(svbool_t pg, svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svnot,_b,_z,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orn.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orn.c index 6cec937818a173e..43b6f32771b9793 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orn.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orn.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orn.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svorn_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svorn_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorn,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orr.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orr.c index 111ed80f96e6244..259b031bb817ec1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orr.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orr.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svorr_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svorr_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svorr_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svorr_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svorr_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svorr_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svorr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svorr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svorr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svorr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svorr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svorr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svorr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svorr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svorr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svorr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svorr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svorr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svorr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svorr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svorr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svorr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svorr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svorr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svorr_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svorr_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svorr_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svorr_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svorr_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svorr_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svorr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svorr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svorr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svorr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svorr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svorr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svorr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svorr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svorr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svorr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svorr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svorr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svorr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svorr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svorr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svorr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svorr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svorr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svorr_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svorr_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svorr_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svorr_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svorr_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svorr_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svorr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svorr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svorr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svorr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svorr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svorr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svorr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svorr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svorr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svorr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svorr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svorr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svorr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svorr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svorr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svorr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svorr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svorr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svorr_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svorr_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svorr_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svorr_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svorr_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svorr_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svorr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svorr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svorr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svorr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svorr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svorr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svorr_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svorr_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svorr_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svorr_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svorr_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svorr_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svorr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svorr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svorr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svorr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svorr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svorr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svorr_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svorr_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svorr_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svorr_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svorr_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svorr_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svorr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svorr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svorr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svorr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svorr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svorr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svorr_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svorr_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svorr_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svorr_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svorr_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svorr_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svorr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svorr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svorr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svorr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svorr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svorr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svorr_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svorr_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svorr_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svorr_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svorr_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svorr_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svorr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svorr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svorr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svorr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svorr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svorr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svorr_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svorr_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svorr_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svorr_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svorr_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svorr_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svorr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svorr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svorr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.orr.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svorr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svorr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_n_u64,_x,)(pg, op1, op2); } @@ -944,7 +952,7 @@ svuint64_t test_svorr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.orr.z.nxv16i1( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svorr_b_z(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svorr_b_z(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svorr,_b,_z,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orv.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orv.c index 74759eba210b2ca..548baecbc3e3bf6 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orv.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_orv.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.orv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -int8_t test_svorv_s8(svbool_t pg, svint8_t op) +int8_t test_svorv_s8(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_s8,,)(pg, op); } @@ -41,7 +49,7 @@ int8_t test_svorv_s8(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.orv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -int16_t test_svorv_s16(svbool_t pg, svint16_t op) +int16_t test_svorv_s16(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_s16,,)(pg, op); } @@ -58,7 +66,7 @@ int16_t test_svorv_s16(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.orv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svorv_s32(svbool_t pg, svint32_t op) +int32_t test_svorv_s32(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_s32,,)(pg, op); } @@ -75,7 +83,7 @@ int32_t test_svorv_s32(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.orv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svorv_s64(svbool_t pg, svint64_t op) +int64_t test_svorv_s64(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_s64,,)(pg, op); } @@ -90,7 +98,7 @@ int64_t test_svorv_s64(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i8 @llvm.aarch64.sve.orv.nxv16i8( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // -uint8_t test_svorv_u8(svbool_t pg, svuint8_t op) +uint8_t test_svorv_u8(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_u8,,)(pg, op); } @@ -107,7 +115,7 @@ uint8_t test_svorv_u8(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i16 @llvm.aarch64.sve.orv.nxv8i16( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // -uint16_t test_svorv_u16(svbool_t pg, svuint16_t op) +uint16_t test_svorv_u16(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_u16,,)(pg, op); } @@ -124,7 +132,7 @@ uint16_t test_svorv_u16(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.orv.nxv4i32( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svorv_u32(svbool_t pg, svuint32_t op) +uint32_t test_svorv_u32(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_u32,,)(pg, op); } @@ -141,7 +149,7 @@ uint32_t test_svorv_u32(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.orv.nxv2i64( [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svorv_u64(svbool_t pg, svuint64_t op) +uint64_t test_svorv_u64(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svorv,_u64,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfalse.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfalse.c index 846ec490e986c7b..375ed4ed9604433 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfalse.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfalse.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -22,7 +30,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret zeroinitializer // -svbool_t test_svpfalse_b() +svbool_t test_svpfalse_b(void) MODE_ATTR { return SVE_ACLE_FUNC(svpfalse,_b,,)(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfirst.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfirst.c index 82960d0bad41659..d27dda2eb26bd12 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfirst.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pfirst.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.pfirst.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svpfirst_b(svbool_t pg, svbool_t op) +svbool_t test_svpfirst_b(svbool_t pg, svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svpfirst,_b,,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pnext.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pnext.c index 9b23c760700af67..7bbbccdd22f0872 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pnext.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_pnext.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svpnext_b8( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.pnext.nxv16i1( [[PG:%.*]], [[OP:%.*]]) @@ -15,7 +23,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.pnext.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svpnext_b8(svbool_t pg, svbool_t op) +svbool_t test_svpnext_b8(svbool_t pg, svbool_t op) MODE_ATTR { return svpnext_b8(pg, op); } @@ -36,7 +44,7 @@ svbool_t test_svpnext_b8(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP2]]) // CPP-CHECK-NEXT: ret [[TMP3]] // -svbool_t test_svpnext_b16(svbool_t pg, svbool_t op) +svbool_t test_svpnext_b16(svbool_t pg, svbool_t op) MODE_ATTR { return svpnext_b16(pg, op); } @@ -57,7 +65,7 @@ svbool_t test_svpnext_b16(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP2]]) // CPP-CHECK-NEXT: ret [[TMP3]] // -svbool_t test_svpnext_b32(svbool_t pg, svbool_t op) +svbool_t test_svpnext_b32(svbool_t pg, svbool_t op) MODE_ATTR { return svpnext_b32(pg, op); } @@ -78,7 +86,7 @@ svbool_t test_svpnext_b32(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP2]]) // CPP-CHECK-NEXT: ret [[TMP3]] // -svbool_t test_svpnext_b64(svbool_t pg, svbool_t op) +svbool_t test_svpnext_b64(svbool_t pg, svbool_t op) MODE_ATTR { return svpnext_b64(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfb.c index ee183399671c441..767b1d0ddc9600a 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfb(svbool_t pg, const void *base) +void test_svprfb(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PLDL1KEEP); } @@ -39,7 +47,7 @@ void test_svprfb(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 1) // CPP-CHECK-NEXT: ret void // -void test_svprfb_1(svbool_t pg, const void *base) +void test_svprfb_1(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PLDL1STRM); } @@ -54,7 +62,7 @@ void test_svprfb_1(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 2) // CPP-CHECK-NEXT: ret void // -void test_svprfb_2(svbool_t pg, const void *base) +void test_svprfb_2(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PLDL2KEEP); } @@ -69,7 +77,7 @@ void test_svprfb_2(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 3) // CPP-CHECK-NEXT: ret void // -void test_svprfb_3(svbool_t pg, const void *base) +void test_svprfb_3(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PLDL2STRM); } @@ -84,7 +92,7 @@ void test_svprfb_3(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 4) // CPP-CHECK-NEXT: ret void // -void test_svprfb_4(svbool_t pg, const void *base) +void test_svprfb_4(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PLDL3KEEP); } @@ -99,7 +107,7 @@ void test_svprfb_4(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 5) // CPP-CHECK-NEXT: ret void // -void test_svprfb_5(svbool_t pg, const void *base) +void test_svprfb_5(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PLDL3STRM); } @@ -114,7 +122,7 @@ void test_svprfb_5(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 8) // CPP-CHECK-NEXT: ret void // -void test_svprfb_6(svbool_t pg, const void *base) +void test_svprfb_6(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PSTL1KEEP); } @@ -129,7 +137,7 @@ void test_svprfb_6(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 9) // CPP-CHECK-NEXT: ret void // -void test_svprfb_7(svbool_t pg, const void *base) +void test_svprfb_7(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PSTL1STRM); } @@ -144,7 +152,7 @@ void test_svprfb_7(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 10) // CPP-CHECK-NEXT: ret void // -void test_svprfb_8(svbool_t pg, const void *base) +void test_svprfb_8(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PSTL2KEEP); } @@ -159,7 +167,7 @@ void test_svprfb_8(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 11) // CPP-CHECK-NEXT: ret void // -void test_svprfb_9(svbool_t pg, const void *base) +void test_svprfb_9(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PSTL2STRM); } @@ -174,7 +182,7 @@ void test_svprfb_9(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 12) // CPP-CHECK-NEXT: ret void // -void test_svprfb_10(svbool_t pg, const void *base) +void test_svprfb_10(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PSTL3KEEP); } @@ -189,7 +197,7 @@ void test_svprfb_10(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[BASE:%.*]], i32 13) // CPP-CHECK-NEXT: ret void // -void test_svprfb_11(svbool_t pg, const void *base) +void test_svprfb_11(svbool_t pg, const void *base) MODE_ATTR { return svprfb(pg, base, SV_PSTL3STRM); } @@ -206,11 +214,13 @@ void test_svprfb_11(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1( [[PG:%.*]], ptr [[TMP0]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfb_vnum(svbool_t pg, const void *base, int64_t vnum) +void test_svprfb_vnum(svbool_t pg, const void *base, int64_t vnum) MODE_ATTR { return svprfb_vnum(pg, base, vnum, SV_PLDL1KEEP); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svprfb_gather_u32base( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -347,3 +357,5 @@ void test_svprfb_gather_u64base_offset(svbool_t pg, svuint64_t bases, int64_t of { return SVE_ACLE_FUNC(svprfb_gather,_u64base,_offset,)(pg, bases, offset, SV_PLDL1KEEP); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfd.c index 360fb5be010907c..8d6ee3024e7035b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfd.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfd(svbool_t pg, const void *base) +void test_svprfd(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PLDL1KEEP); } @@ -43,7 +51,7 @@ void test_svprfd(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 1) // CPP-CHECK-NEXT: ret void // -void test_svprfd_1(svbool_t pg, const void *base) +void test_svprfd_1(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PLDL1STRM); } @@ -60,7 +68,7 @@ void test_svprfd_1(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 2) // CPP-CHECK-NEXT: ret void // -void test_svprfd_2(svbool_t pg, const void *base) +void test_svprfd_2(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PLDL2KEEP); } @@ -77,7 +85,7 @@ void test_svprfd_2(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 3) // CPP-CHECK-NEXT: ret void // -void test_svprfd_3(svbool_t pg, const void *base) +void test_svprfd_3(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PLDL2STRM); } @@ -94,7 +102,7 @@ void test_svprfd_3(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 4) // CPP-CHECK-NEXT: ret void // -void test_svprfd_4(svbool_t pg, const void *base) +void test_svprfd_4(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PLDL3KEEP); } @@ -111,7 +119,7 @@ void test_svprfd_4(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 5) // CPP-CHECK-NEXT: ret void // -void test_svprfd_5(svbool_t pg, const void *base) +void test_svprfd_5(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PLDL3STRM); } @@ -128,7 +136,7 @@ void test_svprfd_5(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 8) // CPP-CHECK-NEXT: ret void // -void test_svprfd_6(svbool_t pg, const void *base) +void test_svprfd_6(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PSTL1KEEP); } @@ -145,7 +153,7 @@ void test_svprfd_6(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 9) // CPP-CHECK-NEXT: ret void // -void test_svprfd_7(svbool_t pg, const void *base) +void test_svprfd_7(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PSTL1STRM); } @@ -162,7 +170,7 @@ void test_svprfd_7(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 10) // CPP-CHECK-NEXT: ret void // -void test_svprfd_8(svbool_t pg, const void *base) +void test_svprfd_8(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PSTL2KEEP); } @@ -179,7 +187,7 @@ void test_svprfd_8(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 11) // CPP-CHECK-NEXT: ret void // -void test_svprfd_9(svbool_t pg, const void *base) +void test_svprfd_9(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PSTL2STRM); } @@ -196,7 +204,7 @@ void test_svprfd_9(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 12) // CPP-CHECK-NEXT: ret void // -void test_svprfd_10(svbool_t pg, const void *base) +void test_svprfd_10(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PSTL3KEEP); } @@ -213,7 +221,7 @@ void test_svprfd_10(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[BASE:%.*]], i32 13) // CPP-CHECK-NEXT: ret void // -void test_svprfd_11(svbool_t pg, const void *base) +void test_svprfd_11(svbool_t pg, const void *base) MODE_ATTR { return svprfd(pg, base, SV_PSTL3STRM); } @@ -232,11 +240,13 @@ void test_svprfd_11(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv2i1( [[TMP0]], ptr [[TMP1]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfd_vnum(svbool_t pg, const void *base, int64_t vnum) +void test_svprfd_vnum(svbool_t pg, const void *base, int64_t vnum) MODE_ATTR { return svprfd_vnum(pg, base, vnum, SV_PLDL1KEEP); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svprfd_gather_u32base( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -376,3 +386,5 @@ void test_svprfd_gather_u64base_index(svbool_t pg, svuint64_t bases, int64_t ind { return SVE_ACLE_FUNC(svprfd_gather,_u64base,_index,)(pg, bases, index, SV_PLDL1KEEP); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfh.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfh.c index 40c0993f14529e0..d7b9c47372763b6 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfh.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfh.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfh(svbool_t pg, const void *base) +void test_svprfh(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PLDL1KEEP); } @@ -43,7 +51,7 @@ void test_svprfh(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 1) // CPP-CHECK-NEXT: ret void // -void test_svprfh_1(svbool_t pg, const void *base) +void test_svprfh_1(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PLDL1STRM); } @@ -60,7 +68,7 @@ void test_svprfh_1(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 2) // CPP-CHECK-NEXT: ret void // -void test_svprfh_2(svbool_t pg, const void *base) +void test_svprfh_2(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PLDL2KEEP); } @@ -77,7 +85,7 @@ void test_svprfh_2(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 3) // CPP-CHECK-NEXT: ret void // -void test_svprfh_3(svbool_t pg, const void *base) +void test_svprfh_3(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PLDL2STRM); } @@ -94,7 +102,7 @@ void test_svprfh_3(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 4) // CPP-CHECK-NEXT: ret void // -void test_svprfh_4(svbool_t pg, const void *base) +void test_svprfh_4(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PLDL3KEEP); } @@ -111,7 +119,7 @@ void test_svprfh_4(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 5) // CPP-CHECK-NEXT: ret void // -void test_svprfh_5(svbool_t pg, const void *base) +void test_svprfh_5(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PLDL3STRM); } @@ -128,7 +136,7 @@ void test_svprfh_5(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 8) // CPP-CHECK-NEXT: ret void // -void test_svprfh_6(svbool_t pg, const void *base) +void test_svprfh_6(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PSTL1KEEP); } @@ -145,7 +153,7 @@ void test_svprfh_6(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 9) // CPP-CHECK-NEXT: ret void // -void test_svprfh_7(svbool_t pg, const void *base) +void test_svprfh_7(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PSTL1STRM); } @@ -162,7 +170,7 @@ void test_svprfh_7(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 10) // CPP-CHECK-NEXT: ret void // -void test_svprfh_8(svbool_t pg, const void *base) +void test_svprfh_8(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PSTL2KEEP); } @@ -179,7 +187,7 @@ void test_svprfh_8(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 11) // CPP-CHECK-NEXT: ret void // -void test_svprfh_9(svbool_t pg, const void *base) +void test_svprfh_9(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PSTL2STRM); } @@ -196,7 +204,7 @@ void test_svprfh_9(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 12) // CPP-CHECK-NEXT: ret void // -void test_svprfh_10(svbool_t pg, const void *base) +void test_svprfh_10(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PSTL3KEEP); } @@ -213,7 +221,7 @@ void test_svprfh_10(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[BASE:%.*]], i32 13) // CPP-CHECK-NEXT: ret void // -void test_svprfh_11(svbool_t pg, const void *base) +void test_svprfh_11(svbool_t pg, const void *base) MODE_ATTR { return svprfh(pg, base, SV_PSTL3STRM); } @@ -232,11 +240,13 @@ void test_svprfh_11(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv8i1( [[TMP0]], ptr [[TMP1]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfh_vnum(svbool_t pg, const void *base, int64_t vnum) +void test_svprfh_vnum(svbool_t pg, const void *base, int64_t vnum) MODE_ATTR { return svprfh_vnum(pg, base, vnum, SV_PLDL1KEEP); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svprfh_gather_u32base( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -376,3 +386,5 @@ void test_svprfh_gather_u64base_index(svbool_t pg, svuint64_t bases, int64_t ind { return SVE_ACLE_FUNC(svprfh_gather,_u64base,_index,)(pg, bases, index, SV_PLDL1KEEP); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfw.c index a0d8203e64f6cee..5e29c4408b46725 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_prfw.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfw(svbool_t pg, const void *base) +void test_svprfw(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PLDL1KEEP); } @@ -43,7 +51,7 @@ void test_svprfw(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 1) // CPP-CHECK-NEXT: ret void // -void test_svprfw_1(svbool_t pg, const void *base) +void test_svprfw_1(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PLDL1STRM); } @@ -60,7 +68,7 @@ void test_svprfw_1(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 2) // CPP-CHECK-NEXT: ret void // -void test_svprfw_2(svbool_t pg, const void *base) +void test_svprfw_2(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PLDL2KEEP); } @@ -77,7 +85,7 @@ void test_svprfw_2(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 3) // CPP-CHECK-NEXT: ret void // -void test_svprfw_3(svbool_t pg, const void *base) +void test_svprfw_3(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PLDL2STRM); } @@ -94,7 +102,7 @@ void test_svprfw_3(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 4) // CPP-CHECK-NEXT: ret void // -void test_svprfw_4(svbool_t pg, const void *base) +void test_svprfw_4(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PLDL3KEEP); } @@ -111,7 +119,7 @@ void test_svprfw_4(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 5) // CPP-CHECK-NEXT: ret void // -void test_svprfw_5(svbool_t pg, const void *base) +void test_svprfw_5(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PLDL3STRM); } @@ -128,7 +136,7 @@ void test_svprfw_5(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 8) // CPP-CHECK-NEXT: ret void // -void test_svprfw_6(svbool_t pg, const void *base) +void test_svprfw_6(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PSTL1KEEP); } @@ -145,7 +153,7 @@ void test_svprfw_6(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 9) // CPP-CHECK-NEXT: ret void // -void test_svprfw_7(svbool_t pg, const void *base) +void test_svprfw_7(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PSTL1STRM); } @@ -162,7 +170,7 @@ void test_svprfw_7(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 10) // CPP-CHECK-NEXT: ret void // -void test_svprfw_8(svbool_t pg, const void *base) +void test_svprfw_8(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PSTL2KEEP); } @@ -179,7 +187,7 @@ void test_svprfw_8(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 11) // CPP-CHECK-NEXT: ret void // -void test_svprfw_9(svbool_t pg, const void *base) +void test_svprfw_9(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PSTL2STRM); } @@ -196,7 +204,7 @@ void test_svprfw_9(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 12) // CPP-CHECK-NEXT: ret void // -void test_svprfw_10(svbool_t pg, const void *base) +void test_svprfw_10(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PSTL3KEEP); } @@ -213,7 +221,7 @@ void test_svprfw_10(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[BASE:%.*]], i32 13) // CPP-CHECK-NEXT: ret void // -void test_svprfw_11(svbool_t pg, const void *base) +void test_svprfw_11(svbool_t pg, const void *base) MODE_ATTR { return svprfw(pg, base, SV_PSTL3STRM); } @@ -232,11 +240,13 @@ void test_svprfw_11(svbool_t pg, const void *base) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1( [[TMP0]], ptr [[TMP1]], i32 0) // CPP-CHECK-NEXT: ret void // -void test_svprfw_vnum(svbool_t pg, const void *base, int64_t vnum) +void test_svprfw_vnum(svbool_t pg, const void *base, int64_t vnum) MODE_ATTR { return svprfw_vnum(pg, base, vnum, SV_PLDL1KEEP); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svprfw_gather_u32base( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -376,3 +386,5 @@ void test_svprfw_gather_u64base_index(svbool_t pg, svuint64_t bases, int64_t ind { return SVE_ACLE_FUNC(svprfw_gather,_u64base,_index,)(pg, bases, index, SV_PLDL1KEEP); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptest.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptest.c index 4a640dd69adafa8..8f12562b994abe4 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptest.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptest.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svptest_any( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.any.nxv16i1( [[PG:%.*]], [[OP:%.*]]) @@ -15,7 +23,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.any.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i1 [[TMP0]] // -bool test_svptest_any(svbool_t pg, svbool_t op) +bool test_svptest_any(svbool_t pg, svbool_t op) MODE_ATTR { return svptest_any(pg, op); } @@ -30,7 +38,7 @@ bool test_svptest_any(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.first.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i1 [[TMP0]] // -bool test_svptest_first(svbool_t pg, svbool_t op) +bool test_svptest_first(svbool_t pg, svbool_t op) MODE_ATTR { return svptest_first(pg, op); } @@ -45,7 +53,7 @@ bool test_svptest_first(svbool_t pg, svbool_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.last.nxv16i1( [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret i1 [[TMP0]] // -bool test_svptest_last(svbool_t pg, svbool_t op) +bool test_svptest_last(svbool_t pg, svbool_t op) MODE_ATTR { return svptest_last(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptrue.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptrue.c index 808f6aa061f57a8..a16a02baa11bc9a 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptrue.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ptrue.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svptrue_b8( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 31) @@ -15,7 +23,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 31) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_b8() +svbool_t test_svptrue_b8(void) MODE_ATTR { return svptrue_b8(); } @@ -32,7 +40,7 @@ svbool_t test_svptrue_b8() // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svptrue_b16() +svbool_t test_svptrue_b16(void) MODE_ATTR { return svptrue_b16(); } @@ -49,7 +57,7 @@ svbool_t test_svptrue_b16() // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svptrue_b32() +svbool_t test_svptrue_b32(void) MODE_ATTR { return svptrue_b32(); } @@ -66,7 +74,7 @@ svbool_t test_svptrue_b32() // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svptrue_b64() +svbool_t test_svptrue_b64(void) MODE_ATTR { return svptrue_b64(); } @@ -81,7 +89,7 @@ svbool_t test_svptrue_b64() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8() +svbool_t test_svptrue_pat_b8(void) MODE_ATTR { return svptrue_pat_b8(SV_POW2); } @@ -96,7 +104,7 @@ svbool_t test_svptrue_pat_b8() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_1() +svbool_t test_svptrue_pat_b8_1(void) MODE_ATTR { return svptrue_pat_b8(SV_VL1); } @@ -111,7 +119,7 @@ svbool_t test_svptrue_pat_b8_1() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 2) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_2() +svbool_t test_svptrue_pat_b8_2(void) MODE_ATTR { return svptrue_pat_b8(SV_VL2); } @@ -126,7 +134,7 @@ svbool_t test_svptrue_pat_b8_2() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_3() +svbool_t test_svptrue_pat_b8_3(void) MODE_ATTR { return svptrue_pat_b8(SV_VL3); } @@ -141,7 +149,7 @@ svbool_t test_svptrue_pat_b8_3() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 4) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_4() +svbool_t test_svptrue_pat_b8_4(void) MODE_ATTR { return svptrue_pat_b8(SV_VL4); } @@ -156,7 +164,7 @@ svbool_t test_svptrue_pat_b8_4() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 5) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_5() +svbool_t test_svptrue_pat_b8_5(void) MODE_ATTR { return svptrue_pat_b8(SV_VL5); } @@ -171,7 +179,7 @@ svbool_t test_svptrue_pat_b8_5() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 6) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_6() +svbool_t test_svptrue_pat_b8_6(void) MODE_ATTR { return svptrue_pat_b8(SV_VL6); } @@ -186,7 +194,7 @@ svbool_t test_svptrue_pat_b8_6() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 7) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_7() +svbool_t test_svptrue_pat_b8_7(void) MODE_ATTR { return svptrue_pat_b8(SV_VL7); } @@ -201,7 +209,7 @@ svbool_t test_svptrue_pat_b8_7() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 8) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_8() +svbool_t test_svptrue_pat_b8_8(void) MODE_ATTR { return svptrue_pat_b8(SV_VL8); } @@ -216,7 +224,7 @@ svbool_t test_svptrue_pat_b8_8() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 9) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_9() +svbool_t test_svptrue_pat_b8_9(void) MODE_ATTR { return svptrue_pat_b8(SV_VL16); } @@ -231,7 +239,7 @@ svbool_t test_svptrue_pat_b8_9() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 10) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_10() +svbool_t test_svptrue_pat_b8_10(void) MODE_ATTR { return svptrue_pat_b8(SV_VL32); } @@ -246,7 +254,7 @@ svbool_t test_svptrue_pat_b8_10() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 11) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_11() +svbool_t test_svptrue_pat_b8_11(void) MODE_ATTR { return svptrue_pat_b8(SV_VL64); } @@ -261,7 +269,7 @@ svbool_t test_svptrue_pat_b8_11() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 12) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_12() +svbool_t test_svptrue_pat_b8_12(void) MODE_ATTR { return svptrue_pat_b8(SV_VL128); } @@ -276,7 +284,7 @@ svbool_t test_svptrue_pat_b8_12() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 13) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_13() +svbool_t test_svptrue_pat_b8_13(void) MODE_ATTR { return svptrue_pat_b8(SV_VL256); } @@ -291,7 +299,7 @@ svbool_t test_svptrue_pat_b8_13() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 29) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_14() +svbool_t test_svptrue_pat_b8_14(void) MODE_ATTR { return svptrue_pat_b8(SV_MUL4); } @@ -306,7 +314,7 @@ svbool_t test_svptrue_pat_b8_14() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 30) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_15() +svbool_t test_svptrue_pat_b8_15(void) MODE_ATTR { return svptrue_pat_b8(SV_MUL3); } @@ -321,7 +329,7 @@ svbool_t test_svptrue_pat_b8_15() // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.ptrue.nxv16i1(i32 31) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svptrue_pat_b8_16() +svbool_t test_svptrue_pat_b8_16(void) MODE_ATTR { return svptrue_pat_b8(SV_ALL); } @@ -338,7 +346,7 @@ svbool_t test_svptrue_pat_b8_16() // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svptrue_pat_b16() +svbool_t test_svptrue_pat_b16(void) MODE_ATTR { return svptrue_pat_b16(SV_POW2); } @@ -355,7 +363,7 @@ svbool_t test_svptrue_pat_b16() // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svptrue_pat_b32() +svbool_t test_svptrue_pat_b32(void) MODE_ATTR { return svptrue_pat_b32(SV_VL1); } @@ -372,7 +380,7 @@ svbool_t test_svptrue_pat_b32() // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svptrue_pat_b64() +svbool_t test_svptrue_pat_b64(void) MODE_ATTR { return svptrue_pat_b64(SV_VL2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qadd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qadd.c index b536bcb52a50aae..33a52973deadcb1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qadd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qadd.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svqadd_s8(svint8_t op1, svint8_t op2) +svint8_t test_svqadd_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svqadd_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqadd_s16(svint16_t op1, svint16_t op2) +svint16_t test_svqadd_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svqadd_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqadd_s32(svint32_t op1, svint32_t op2) +svint32_t test_svqadd_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svqadd_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqadd_s64(svint64_t op1, svint64_t op2) +svint64_t test_svqadd_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svqadd_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svqadd_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svqadd_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svqadd_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqadd_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svqadd_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svqadd_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqadd_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svqadd_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svqadd_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqadd_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svqadd_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_u64,,)(op1, op2); } @@ -148,7 +156,7 @@ svuint64_t test_svqadd_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv16i8( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svqadd_n_s8(svint8_t op1, int8_t op2) +svint8_t test_svqadd_n_s8(svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_s8,,)(op1, op2); } @@ -167,7 +175,7 @@ svint8_t test_svqadd_n_s8(svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv8i16( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqadd_n_s16(svint16_t op1, int16_t op2) +svint16_t test_svqadd_n_s16(svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_s16,,)(op1, op2); } @@ -186,7 +194,7 @@ svint16_t test_svqadd_n_s16(svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv4i32( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqadd_n_s32(svint32_t op1, int32_t op2) +svint32_t test_svqadd_n_s32(svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_s32,,)(op1, op2); } @@ -205,7 +213,7 @@ svint32_t test_svqadd_n_s32(svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqadd.x.nxv2i64( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqadd_n_s64(svint64_t op1, int64_t op2) +svint64_t test_svqadd_n_s64(svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_s64,,)(op1, op2); } @@ -224,7 +232,7 @@ svint64_t test_svqadd_n_s64(svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv16i8( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svqadd_n_u8(svuint8_t op1, uint8_t op2) +svuint8_t test_svqadd_n_u8(svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_u8,,)(op1, op2); } @@ -243,7 +251,7 @@ svuint8_t test_svqadd_n_u8(svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv8i16( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqadd_n_u16(svuint16_t op1, uint16_t op2) +svuint16_t test_svqadd_n_u16(svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_u16,,)(op1, op2); } @@ -262,7 +270,7 @@ svuint16_t test_svqadd_n_u16(svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv4i32( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqadd_n_u32(svuint32_t op1, uint32_t op2) +svuint32_t test_svqadd_n_u32(svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_u32,,)(op1, op2); } @@ -281,7 +289,7 @@ svuint32_t test_svqadd_n_u32(svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqadd.x.nxv2i64( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqadd_n_u64(svuint64_t op1, uint64_t op2) +svuint64_t test_svqadd_n_u64(svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqadd,_n_u64,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecb.c index 70fff215aa3b652..3a4c8e561e1189d 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecb.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecb_n_s32(int32_t op) +int32_t test_svqdecb_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqdecb_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecb.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecb_n_s32_1(int32_t op) +int32_t test_svqdecb_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqdecb_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecb.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdecb_n_s64(int64_t op) +int64_t test_svqdecb_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqdecb_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecb.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdecb_n_u32(uint32_t op) +uint32_t test_svqdecb_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqdecb_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecb.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdecb_n_u64(uint64_t op) +uint64_t test_svqdecb_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqdecb_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecb.n32(i32 [[OP:%.*]], i32 0, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecb_pat_n_s32(int32_t op) +int32_t test_svqdecb_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb_pat,_n_s32,,)(op, SV_POW2, 16); } @@ -114,7 +122,7 @@ int32_t test_svqdecb_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecb.n64(i64 [[OP:%.*]], i32 1, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdecb_pat_n_s64(int64_t op) +int64_t test_svqdecb_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb_pat,_n_s64,,)(op, SV_VL1, 1); } @@ -129,7 +137,7 @@ int64_t test_svqdecb_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecb.n32(i32 [[OP:%.*]], i32 2, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdecb_pat_n_u32(uint32_t op) +uint32_t test_svqdecb_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb_pat,_n_u32,,)(op, SV_VL2, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqdecb_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecb.n64(i64 [[OP:%.*]], i32 3, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdecb_pat_n_u64(uint64_t op) +uint64_t test_svqdecb_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecb_pat,_n_u64,,)(op, SV_VL3, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecd.c index 3b1fcf11ef50937..26020908c5d9210 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecd.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecd.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecd_n_s32(int32_t op) +int32_t test_svqdecd_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqdecd_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecd.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecd_n_s32_1(int32_t op) +int32_t test_svqdecd_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqdecd_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecd.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdecd_n_s64(int64_t op) +int64_t test_svqdecd_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqdecd_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecd.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdecd_n_u32(uint32_t op) +uint32_t test_svqdecd_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqdecd_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecd.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdecd_n_u64(uint64_t op) +uint64_t test_svqdecd_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqdecd_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecd.n32(i32 [[OP:%.*]], i32 4, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecd_pat_n_s32(int32_t op) +int32_t test_svqdecd_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd_pat,_n_s32,,)(op, SV_VL4, 16); } @@ -114,7 +122,7 @@ int32_t test_svqdecd_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecd.n64(i64 [[OP:%.*]], i32 5, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdecd_pat_n_s64(int64_t op) +int64_t test_svqdecd_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd_pat,_n_s64,,)(op, SV_VL5, 1); } @@ -129,7 +137,7 @@ int64_t test_svqdecd_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecd.n32(i32 [[OP:%.*]], i32 6, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdecd_pat_n_u32(uint32_t op) +uint32_t test_svqdecd_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd_pat,_n_u32,,)(op, SV_VL6, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqdecd_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecd.n64(i64 [[OP:%.*]], i32 7, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdecd_pat_n_u64(uint64_t op) +uint64_t test_svqdecd_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd_pat,_n_u64,,)(op, SV_VL7, 1); } @@ -159,7 +167,7 @@ uint64_t test_svqdecd_pat_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqdecd.nxv2i64( [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqdecd_s64(svint64_t op) +svint64_t test_svqdecd_s64(svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd,_s64,,)(op, 16); } @@ -174,7 +182,7 @@ svint64_t test_svqdecd_s64(svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqdecd.nxv2i64( [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqdecd_u64(svuint64_t op) +svuint64_t test_svqdecd_u64(svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd,_u64,,)(op, 1); } @@ -189,7 +197,7 @@ svuint64_t test_svqdecd_u64(svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqdecd.nxv2i64( [[OP:%.*]], i32 8, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqdecd_pat_s64(svint64_t op) +svint64_t test_svqdecd_pat_s64(svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd_pat,_s64,,)(op, SV_VL8, 16); } @@ -204,7 +212,7 @@ svint64_t test_svqdecd_pat_s64(svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqdecd.nxv2i64( [[OP:%.*]], i32 9, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqdecd_pat_u64(svuint64_t op) +svuint64_t test_svqdecd_pat_u64(svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecd_pat,_u64,,)(op, SV_VL16, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdech.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdech.c index 847113c986fbbc9..2e851f1cbbbd937 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdech.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdech.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdech.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdech_n_s32(int32_t op) +int32_t test_svqdech_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqdech_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdech.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdech_n_s32_1(int32_t op) +int32_t test_svqdech_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqdech_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdech.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdech_n_s64(int64_t op) +int64_t test_svqdech_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqdech_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdech.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdech_n_u32(uint32_t op) +uint32_t test_svqdech_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqdech_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdech.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdech_n_u64(uint64_t op) +uint64_t test_svqdech_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqdech_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdech.n32(i32 [[OP:%.*]], i32 10, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdech_pat_n_s32(int32_t op) +int32_t test_svqdech_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech_pat,_n_s32,,)(op, SV_VL32, 16); } @@ -114,7 +122,7 @@ int32_t test_svqdech_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdech.n64(i64 [[OP:%.*]], i32 11, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdech_pat_n_s64(int64_t op) +int64_t test_svqdech_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech_pat,_n_s64,,)(op, SV_VL64, 1); } @@ -129,7 +137,7 @@ int64_t test_svqdech_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdech.n32(i32 [[OP:%.*]], i32 12, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdech_pat_n_u32(uint32_t op) +uint32_t test_svqdech_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech_pat,_n_u32,,)(op, SV_VL128, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqdech_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdech.n64(i64 [[OP:%.*]], i32 13, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdech_pat_n_u64(uint64_t op) +uint64_t test_svqdech_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech_pat,_n_u64,,)(op, SV_VL256, 1); } @@ -159,7 +167,7 @@ uint64_t test_svqdech_pat_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqdech.nxv8i16( [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqdech_s16(svint16_t op) +svint16_t test_svqdech_s16(svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech,_s16,,)(op, 16); } @@ -174,7 +182,7 @@ svint16_t test_svqdech_s16(svint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqdech.nxv8i16( [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqdech_u16(svuint16_t op) +svuint16_t test_svqdech_u16(svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech,_u16,,)(op, 1); } @@ -189,7 +197,7 @@ svuint16_t test_svqdech_u16(svuint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqdech.nxv8i16( [[OP:%.*]], i32 29, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqdech_pat_s16(svint16_t op) +svint16_t test_svqdech_pat_s16(svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech_pat,_s16,,)(op, SV_MUL4, 16); } @@ -204,7 +212,7 @@ svint16_t test_svqdech_pat_s16(svint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqdech.nxv8i16( [[OP:%.*]], i32 30, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqdech_pat_u16(svuint16_t op) +svuint16_t test_svqdech_pat_u16(svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdech_pat,_u16,,)(op, SV_MUL3, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecp.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecp.c index ca24390d6cf7a3a..a88f826a18e2797 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecp.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecp.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecp.n32.nxv16i1(i32 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecp_n_s32_b8(int32_t op, svbool_t pg) +int32_t test_svqdecp_n_s32_b8(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s32,_b8,)(op, pg); } @@ -41,7 +49,7 @@ int32_t test_svqdecp_n_s32_b8(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecp.n32.nxv8i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svqdecp_n_s32_b16(int32_t op, svbool_t pg) +int32_t test_svqdecp_n_s32_b16(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s32,_b16,)(op, pg); } @@ -58,7 +66,7 @@ int32_t test_svqdecp_n_s32_b16(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecp.n32.nxv4i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svqdecp_n_s32_b32(int32_t op, svbool_t pg) +int32_t test_svqdecp_n_s32_b32(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s32,_b32,)(op, pg); } @@ -75,7 +83,7 @@ int32_t test_svqdecp_n_s32_b32(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecp.n32.nxv2i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svqdecp_n_s32_b64(int32_t op, svbool_t pg) +int32_t test_svqdecp_n_s32_b64(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s32,_b64,)(op, pg); } @@ -90,7 +98,7 @@ int32_t test_svqdecp_n_s32_b64(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecp.n64.nxv16i1(i64 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdecp_n_s64_b8(int64_t op, svbool_t pg) +int64_t test_svqdecp_n_s64_b8(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s64,_b8,)(op, pg); } @@ -107,7 +115,7 @@ int64_t test_svqdecp_n_s64_b8(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecp.n64.nxv8i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svqdecp_n_s64_b16(int64_t op, svbool_t pg) +int64_t test_svqdecp_n_s64_b16(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s64,_b16,)(op, pg); } @@ -124,7 +132,7 @@ int64_t test_svqdecp_n_s64_b16(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecp.n64.nxv4i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svqdecp_n_s64_b32(int64_t op, svbool_t pg) +int64_t test_svqdecp_n_s64_b32(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s64,_b32,)(op, pg); } @@ -141,7 +149,7 @@ int64_t test_svqdecp_n_s64_b32(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecp.n64.nxv2i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svqdecp_n_s64_b64(int64_t op, svbool_t pg) +int64_t test_svqdecp_n_s64_b64(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_s64,_b64,)(op, pg); } @@ -156,7 +164,7 @@ int64_t test_svqdecp_n_s64_b64(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecp.n32.nxv16i1(i32 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdecp_n_u32_b8(uint32_t op, svbool_t pg) +uint32_t test_svqdecp_n_u32_b8(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u32,_b8,)(op, pg); } @@ -173,7 +181,7 @@ uint32_t test_svqdecp_n_u32_b8(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecp.n32.nxv8i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svqdecp_n_u32_b16(uint32_t op, svbool_t pg) +uint32_t test_svqdecp_n_u32_b16(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u32,_b16,)(op, pg); } @@ -190,7 +198,7 @@ uint32_t test_svqdecp_n_u32_b16(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecp.n32.nxv4i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svqdecp_n_u32_b32(uint32_t op, svbool_t pg) +uint32_t test_svqdecp_n_u32_b32(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u32,_b32,)(op, pg); } @@ -207,7 +215,7 @@ uint32_t test_svqdecp_n_u32_b32(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecp.n32.nxv2i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svqdecp_n_u32_b64(uint32_t op, svbool_t pg) +uint32_t test_svqdecp_n_u32_b64(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u32,_b64,)(op, pg); } @@ -222,7 +230,7 @@ uint32_t test_svqdecp_n_u32_b64(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecp.n64.nxv16i1(i64 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdecp_n_u64_b8(uint64_t op, svbool_t pg) +uint64_t test_svqdecp_n_u64_b8(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u64,_b8,)(op, pg); } @@ -239,7 +247,7 @@ uint64_t test_svqdecp_n_u64_b8(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecp.n64.nxv8i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svqdecp_n_u64_b16(uint64_t op, svbool_t pg) +uint64_t test_svqdecp_n_u64_b16(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u64,_b16,)(op, pg); } @@ -256,7 +264,7 @@ uint64_t test_svqdecp_n_u64_b16(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecp.n64.nxv4i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svqdecp_n_u64_b32(uint64_t op, svbool_t pg) +uint64_t test_svqdecp_n_u64_b32(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u64,_b32,)(op, pg); } @@ -273,7 +281,7 @@ uint64_t test_svqdecp_n_u64_b32(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecp.n64.nxv2i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svqdecp_n_u64_b64(uint64_t op, svbool_t pg) +uint64_t test_svqdecp_n_u64_b64(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_n_u64,_b64,)(op, pg); } @@ -290,7 +298,7 @@ uint64_t test_svqdecp_n_u64_b64(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sqdecp.nxv8i16( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svqdecp_s16(svint16_t op, svbool_t pg) +svint16_t test_svqdecp_s16(svint16_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_s16,,)(op, pg); } @@ -307,7 +315,7 @@ svint16_t test_svqdecp_s16(svint16_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sqdecp.nxv4i32( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svqdecp_s32(svint32_t op, svbool_t pg) +svint32_t test_svqdecp_s32(svint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_s32,,)(op, pg); } @@ -324,7 +332,7 @@ svint32_t test_svqdecp_s32(svint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sqdecp.nxv2i64( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svqdecp_s64(svint64_t op, svbool_t pg) +svint64_t test_svqdecp_s64(svint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_s64,,)(op, pg); } @@ -341,7 +349,7 @@ svint64_t test_svqdecp_s64(svint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uqdecp.nxv8i16( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svqdecp_u16(svuint16_t op, svbool_t pg) +svuint16_t test_svqdecp_u16(svuint16_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_u16,,)(op, pg); } @@ -358,7 +366,7 @@ svuint16_t test_svqdecp_u16(svuint16_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uqdecp.nxv4i32( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svqdecp_u32(svuint32_t op, svbool_t pg) +svuint32_t test_svqdecp_u32(svuint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_u32,,)(op, pg); } @@ -375,7 +383,7 @@ svuint32_t test_svqdecp_u32(svuint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uqdecp.nxv2i64( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svqdecp_u64(svuint64_t op, svbool_t pg) +svuint64_t test_svqdecp_u64(svuint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqdecp,_u64,,)(op, pg); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecw.c index 740f48f4fa0d23b..0e0d184791e15aa 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qdecw.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecw.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecw_n_s32(int32_t op) +int32_t test_svqdecw_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqdecw_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecw.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecw_n_s32_1(int32_t op) +int32_t test_svqdecw_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqdecw_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecw.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdecw_n_s64(int64_t op) +int64_t test_svqdecw_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqdecw_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecw.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdecw_n_u32(uint32_t op) +uint32_t test_svqdecw_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqdecw_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecw.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdecw_n_u64(uint64_t op) +uint64_t test_svqdecw_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqdecw_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqdecw.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqdecw_pat_n_s32(int32_t op) +int32_t test_svqdecw_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw_pat,_n_s32,,)(op, SV_ALL, 16); } @@ -114,7 +122,7 @@ int32_t test_svqdecw_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqdecw.n64(i64 [[OP:%.*]], i32 0, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqdecw_pat_n_s64(int64_t op) +int64_t test_svqdecw_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw_pat,_n_s64,,)(op, SV_POW2, 1); } @@ -129,7 +137,7 @@ int64_t test_svqdecw_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqdecw.n32(i32 [[OP:%.*]], i32 1, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqdecw_pat_n_u32(uint32_t op) +uint32_t test_svqdecw_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw_pat,_n_u32,,)(op, SV_VL1, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqdecw_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqdecw.n64(i64 [[OP:%.*]], i32 2, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqdecw_pat_n_u64(uint64_t op) +uint64_t test_svqdecw_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw_pat,_n_u64,,)(op, SV_VL2, 1); } @@ -159,7 +167,7 @@ uint64_t test_svqdecw_pat_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqdecw.nxv4i32( [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqdecw_s32(svint32_t op) +svint32_t test_svqdecw_s32(svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw,_s32,,)(op, 16); } @@ -174,7 +182,7 @@ svint32_t test_svqdecw_s32(svint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqdecw.nxv4i32( [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqdecw_u32(svuint32_t op) +svuint32_t test_svqdecw_u32(svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw,_u32,,)(op, 1); } @@ -189,7 +197,7 @@ svuint32_t test_svqdecw_u32(svuint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqdecw.nxv4i32( [[OP:%.*]], i32 3, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqdecw_pat_s32(svint32_t op) +svint32_t test_svqdecw_pat_s32(svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw_pat,_s32,,)(op, SV_VL3, 16); } @@ -204,7 +212,7 @@ svint32_t test_svqdecw_pat_s32(svint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqdecw.nxv4i32( [[OP:%.*]], i32 4, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqdecw_pat_u32(svuint32_t op) +svuint32_t test_svqdecw_pat_u32(svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqdecw_pat,_u32,,)(op, SV_VL4, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincb.c index 30f9d9f9423e557..f2b69e7436f304f 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincb.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincb_n_s32(int32_t op) +int32_t test_svqincb_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqincb_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincb.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincb_n_s32_1(int32_t op) +int32_t test_svqincb_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqincb_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqincb.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqincb_n_s64(int64_t op) +int64_t test_svqincb_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqincb_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqincb.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqincb_n_u32(uint32_t op) +uint32_t test_svqincb_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqincb_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqincb.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqincb_n_u64(uint64_t op) +uint64_t test_svqincb_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqincb_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincb.n32(i32 [[OP:%.*]], i32 5, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincb_pat_n_s32(int32_t op) +int32_t test_svqincb_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb_pat,_n_s32,,)(op, SV_VL5, 16); } @@ -114,7 +122,7 @@ int32_t test_svqincb_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqincb.n64(i64 [[OP:%.*]], i32 6, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqincb_pat_n_s64(int64_t op) +int64_t test_svqincb_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb_pat,_n_s64,,)(op, SV_VL6, 1); } @@ -129,7 +137,7 @@ int64_t test_svqincb_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqincb.n32(i32 [[OP:%.*]], i32 7, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqincb_pat_n_u32(uint32_t op) +uint32_t test_svqincb_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb_pat,_n_u32,,)(op, SV_VL7, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqincb_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqincb.n64(i64 [[OP:%.*]], i32 8, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqincb_pat_n_u64(uint64_t op) +uint64_t test_svqincb_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincb_pat,_n_u64,,)(op, SV_VL8, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincd.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincd.c index 706fbbd9e167d0b..27d0964fae5d2fd 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincd.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincd.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincd.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincd_n_s32(int32_t op) +int32_t test_svqincd_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqincd_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincd.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincd_n_s32_1(int32_t op) +int32_t test_svqincd_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqincd_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqincd.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqincd_n_s64(int64_t op) +int64_t test_svqincd_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqincd_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqincd.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqincd_n_u32(uint32_t op) +uint32_t test_svqincd_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqincd_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqincd.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqincd_n_u64(uint64_t op) +uint64_t test_svqincd_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqincd_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincd.n32(i32 [[OP:%.*]], i32 9, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincd_pat_n_s32(int32_t op) +int32_t test_svqincd_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd_pat,_n_s32,,)(op, SV_VL16, 16); } @@ -114,7 +122,7 @@ int32_t test_svqincd_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqincd.n64(i64 [[OP:%.*]], i32 10, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqincd_pat_n_s64(int64_t op) +int64_t test_svqincd_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd_pat,_n_s64,,)(op, SV_VL32, 1); } @@ -129,7 +137,7 @@ int64_t test_svqincd_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqincd.n32(i32 [[OP:%.*]], i32 11, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqincd_pat_n_u32(uint32_t op) +uint32_t test_svqincd_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd_pat,_n_u32,,)(op, SV_VL64, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqincd_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqincd.n64(i64 [[OP:%.*]], i32 12, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqincd_pat_n_u64(uint64_t op) +uint64_t test_svqincd_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd_pat,_n_u64,,)(op, SV_VL128, 1); } @@ -159,7 +167,7 @@ uint64_t test_svqincd_pat_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqincd.nxv2i64( [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqincd_s64(svint64_t op) +svint64_t test_svqincd_s64(svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd,_s64,,)(op, 16); } @@ -174,7 +182,7 @@ svint64_t test_svqincd_s64(svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqincd.nxv2i64( [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqincd_u64(svuint64_t op) +svuint64_t test_svqincd_u64(svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd,_u64,,)(op, 1); } @@ -189,7 +197,7 @@ svuint64_t test_svqincd_u64(svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqincd.nxv2i64( [[OP:%.*]], i32 13, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqincd_pat_s64(svint64_t op) +svint64_t test_svqincd_pat_s64(svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd_pat,_s64,,)(op, SV_VL256, 16); } @@ -204,7 +212,7 @@ svint64_t test_svqincd_pat_s64(svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqincd.nxv2i64( [[OP:%.*]], i32 29, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqincd_pat_u64(svuint64_t op) +svuint64_t test_svqincd_pat_u64(svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincd_pat,_u64,,)(op, SV_MUL4, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qinch.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qinch.c index 5fdb898d635064e..05471619ad7e698 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qinch.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qinch.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqinch.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqinch_n_s32(int32_t op) +int32_t test_svqinch_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqinch_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqinch.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqinch_n_s32_1(int32_t op) +int32_t test_svqinch_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqinch_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqinch.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqinch_n_s64(int64_t op) +int64_t test_svqinch_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqinch_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqinch.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqinch_n_u32(uint32_t op) +uint32_t test_svqinch_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqinch_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqinch.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqinch_n_u64(uint64_t op) +uint64_t test_svqinch_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqinch_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqinch.n32(i32 [[OP:%.*]], i32 30, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqinch_pat_n_s32(int32_t op) +int32_t test_svqinch_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch_pat,_n_s32,,)(op, SV_MUL3, 16); } @@ -114,7 +122,7 @@ int32_t test_svqinch_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqinch.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqinch_pat_n_s64(int64_t op) +int64_t test_svqinch_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch_pat,_n_s64,,)(op, SV_ALL, 1); } @@ -129,7 +137,7 @@ int64_t test_svqinch_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqinch.n32(i32 [[OP:%.*]], i32 0, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqinch_pat_n_u32(uint32_t op) +uint32_t test_svqinch_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch_pat,_n_u32,,)(op, SV_POW2, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqinch_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqinch.n64(i64 [[OP:%.*]], i32 1, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqinch_pat_n_u64(uint64_t op) +uint64_t test_svqinch_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch_pat,_n_u64,,)(op, SV_VL1, 1); } @@ -159,7 +167,7 @@ uint64_t test_svqinch_pat_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqinch.nxv8i16( [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqinch_s16(svint16_t op) +svint16_t test_svqinch_s16(svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch,_s16,,)(op, 16); } @@ -174,7 +182,7 @@ svint16_t test_svqinch_s16(svint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqinch.nxv8i16( [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqinch_u16(svuint16_t op) +svuint16_t test_svqinch_u16(svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch,_u16,,)(op, 1); } @@ -189,7 +197,7 @@ svuint16_t test_svqinch_u16(svuint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqinch.nxv8i16( [[OP:%.*]], i32 2, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqinch_pat_s16(svint16_t op) +svint16_t test_svqinch_pat_s16(svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch_pat,_s16,,)(op, SV_VL2, 16); } @@ -204,7 +212,7 @@ svint16_t test_svqinch_pat_s16(svint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqinch.nxv8i16( [[OP:%.*]], i32 3, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqinch_pat_u16(svuint16_t op) +svuint16_t test_svqinch_pat_u16(svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqinch_pat,_u16,,)(op, SV_VL3, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincp.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincp.c index a0f0991302a4c2c..6f48aa1972b8511 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincp.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincp.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincp.n32.nxv16i1(i32 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincp_n_s32_b8(int32_t op, svbool_t pg) +int32_t test_svqincp_n_s32_b8(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s32,_b8,)(op, pg); } @@ -41,7 +49,7 @@ int32_t test_svqincp_n_s32_b8(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.sqincp.n32.nxv8i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svqincp_n_s32_b16(int32_t op, svbool_t pg) +int32_t test_svqincp_n_s32_b16(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s32,_b16,)(op, pg); } @@ -58,7 +66,7 @@ int32_t test_svqincp_n_s32_b16(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.sqincp.n32.nxv4i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svqincp_n_s32_b32(int32_t op, svbool_t pg) +int32_t test_svqincp_n_s32_b32(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s32,_b32,)(op, pg); } @@ -75,7 +83,7 @@ int32_t test_svqincp_n_s32_b32(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.sqincp.n32.nxv2i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -int32_t test_svqincp_n_s32_b64(int32_t op, svbool_t pg) +int32_t test_svqincp_n_s32_b64(int32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s32,_b64,)(op, pg); } @@ -90,7 +98,7 @@ int32_t test_svqincp_n_s32_b64(int32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqincp.n64.nxv16i1(i64 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqincp_n_s64_b8(int64_t op, svbool_t pg) +int64_t test_svqincp_n_s64_b8(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s64,_b8,)(op, pg); } @@ -107,7 +115,7 @@ int64_t test_svqincp_n_s64_b8(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.sqincp.n64.nxv8i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svqincp_n_s64_b16(int64_t op, svbool_t pg) +int64_t test_svqincp_n_s64_b16(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s64,_b16,)(op, pg); } @@ -124,7 +132,7 @@ int64_t test_svqincp_n_s64_b16(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.sqincp.n64.nxv4i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svqincp_n_s64_b32(int64_t op, svbool_t pg) +int64_t test_svqincp_n_s64_b32(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s64,_b32,)(op, pg); } @@ -141,7 +149,7 @@ int64_t test_svqincp_n_s64_b32(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.sqincp.n64.nxv2i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -int64_t test_svqincp_n_s64_b64(int64_t op, svbool_t pg) +int64_t test_svqincp_n_s64_b64(int64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_s64,_b64,)(op, pg); } @@ -156,7 +164,7 @@ int64_t test_svqincp_n_s64_b64(int64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqincp.n32.nxv16i1(i32 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqincp_n_u32_b8(uint32_t op, svbool_t pg) +uint32_t test_svqincp_n_u32_b8(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u32,_b8,)(op, pg); } @@ -173,7 +181,7 @@ uint32_t test_svqincp_n_u32_b8(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.uqincp.n32.nxv8i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svqincp_n_u32_b16(uint32_t op, svbool_t pg) +uint32_t test_svqincp_n_u32_b16(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u32,_b16,)(op, pg); } @@ -190,7 +198,7 @@ uint32_t test_svqincp_n_u32_b16(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.uqincp.n32.nxv4i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svqincp_n_u32_b32(uint32_t op, svbool_t pg) +uint32_t test_svqincp_n_u32_b32(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u32,_b32,)(op, pg); } @@ -207,7 +215,7 @@ uint32_t test_svqincp_n_u32_b32(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.aarch64.sve.uqincp.n32.nxv2i1(i32 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // -uint32_t test_svqincp_n_u32_b64(uint32_t op, svbool_t pg) +uint32_t test_svqincp_n_u32_b64(uint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u32,_b64,)(op, pg); } @@ -222,7 +230,7 @@ uint32_t test_svqincp_n_u32_b64(uint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqincp.n64.nxv16i1(i64 [[OP:%.*]], [[PG:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqincp_n_u64_b8(uint64_t op, svbool_t pg) +uint64_t test_svqincp_n_u64_b8(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u64,_b8,)(op, pg); } @@ -239,7 +247,7 @@ uint64_t test_svqincp_n_u64_b8(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uqincp.n64.nxv8i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svqincp_n_u64_b16(uint64_t op, svbool_t pg) +uint64_t test_svqincp_n_u64_b16(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u64,_b16,)(op, pg); } @@ -256,7 +264,7 @@ uint64_t test_svqincp_n_u64_b16(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uqincp.n64.nxv4i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svqincp_n_u64_b32(uint64_t op, svbool_t pg) +uint64_t test_svqincp_n_u64_b32(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u64,_b32,)(op, pg); } @@ -273,7 +281,7 @@ uint64_t test_svqincp_n_u64_b32(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @llvm.aarch64.sve.uqincp.n64.nxv2i1(i64 [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // -uint64_t test_svqincp_n_u64_b64(uint64_t op, svbool_t pg) +uint64_t test_svqincp_n_u64_b64(uint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_n_u64,_b64,)(op, pg); } @@ -290,7 +298,7 @@ uint64_t test_svqincp_n_u64_b64(uint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sqincp.nxv8i16( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svqincp_s16(svint16_t op, svbool_t pg) +svint16_t test_svqincp_s16(svint16_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_s16,,)(op, pg); } @@ -307,7 +315,7 @@ svint16_t test_svqincp_s16(svint16_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sqincp.nxv4i32( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svqincp_s32(svint32_t op, svbool_t pg) +svint32_t test_svqincp_s32(svint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_s32,,)(op, pg); } @@ -324,7 +332,7 @@ svint32_t test_svqincp_s32(svint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sqincp.nxv2i64( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svqincp_s64(svint64_t op, svbool_t pg) +svint64_t test_svqincp_s64(svint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_s64,,)(op, pg); } @@ -341,7 +349,7 @@ svint64_t test_svqincp_s64(svint64_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uqincp.nxv8i16( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svqincp_u16(svuint16_t op, svbool_t pg) +svuint16_t test_svqincp_u16(svuint16_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_u16,,)(op, pg); } @@ -358,7 +366,7 @@ svuint16_t test_svqincp_u16(svuint16_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uqincp.nxv4i32( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svqincp_u32(svuint32_t op, svbool_t pg) +svuint32_t test_svqincp_u32(svuint32_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_u32,,)(op, pg); } @@ -375,7 +383,7 @@ svuint32_t test_svqincp_u32(svuint32_t op, svbool_t pg) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.uqincp.nxv2i64( [[OP:%.*]], [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svqincp_u64(svuint64_t op, svbool_t pg) +svuint64_t test_svqincp_u64(svuint64_t op, svbool_t pg) MODE_ATTR { return SVE_ACLE_FUNC(svqincp,_u64,,)(op, pg); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincw.c index 664328a8268781a..2cb0be931db8fbc 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qincw.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincw.n32(i32 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincw_n_s32(int32_t op) +int32_t test_svqincw_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw,_n_s32,,)(op, 1); } @@ -39,7 +47,7 @@ int32_t test_svqincw_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincw.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincw_n_s32_1(int32_t op) +int32_t test_svqincw_n_s32_1(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw,_n_s32,,)(op, 16); } @@ -54,7 +62,7 @@ int32_t test_svqincw_n_s32_1(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqincw.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqincw_n_s64(int64_t op) +int64_t test_svqincw_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw,_n_s64,,)(op, 1); } @@ -69,7 +77,7 @@ int64_t test_svqincw_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqincw.n32(i32 [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqincw_n_u32(uint32_t op) +uint32_t test_svqincw_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw,_n_u32,,)(op, 16); } @@ -84,7 +92,7 @@ uint32_t test_svqincw_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqincw.n64(i64 [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqincw_n_u64(uint64_t op) +uint64_t test_svqincw_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw,_n_u64,,)(op, 1); } @@ -99,7 +107,7 @@ uint64_t test_svqincw_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.sqincw.n32(i32 [[OP:%.*]], i32 4, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -int32_t test_svqincw_pat_n_s32(int32_t op) +int32_t test_svqincw_pat_n_s32(int32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw_pat,_n_s32,,)(op, SV_VL4, 16); } @@ -114,7 +122,7 @@ int32_t test_svqincw_pat_n_s32(int32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.sqincw.n64(i64 [[OP:%.*]], i32 5, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -int64_t test_svqincw_pat_n_s64(int64_t op) +int64_t test_svqincw_pat_n_s64(int64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw_pat,_n_s64,,)(op, SV_VL5, 1); } @@ -129,7 +137,7 @@ int64_t test_svqincw_pat_n_s64(int64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.aarch64.sve.uqincw.n32(i32 [[OP:%.*]], i32 6, i32 16) // CPP-CHECK-NEXT: ret i32 [[TMP0]] // -uint32_t test_svqincw_pat_n_u32(uint32_t op) +uint32_t test_svqincw_pat_n_u32(uint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw_pat,_n_u32,,)(op, SV_VL6, 16); } @@ -144,7 +152,7 @@ uint32_t test_svqincw_pat_n_u32(uint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sve.uqincw.n64(i64 [[OP:%.*]], i32 7, i32 1) // CPP-CHECK-NEXT: ret i64 [[TMP0]] // -uint64_t test_svqincw_pat_n_u64(uint64_t op) +uint64_t test_svqincw_pat_n_u64(uint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw_pat,_n_u64,,)(op, SV_VL7, 1); } @@ -159,7 +167,7 @@ uint64_t test_svqincw_pat_n_u64(uint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqincw.nxv4i32( [[OP:%.*]], i32 31, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqincw_s32(svint32_t op) +svint32_t test_svqincw_s32(svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw,_s32,,)(op, 16); } @@ -174,7 +182,7 @@ svint32_t test_svqincw_s32(svint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqincw.nxv4i32( [[OP:%.*]], i32 31, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqincw_u32(svuint32_t op) +svuint32_t test_svqincw_u32(svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw,_u32,,)(op, 1); } @@ -189,7 +197,7 @@ svuint32_t test_svqincw_u32(svuint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqincw.nxv4i32( [[OP:%.*]], i32 8, i32 16) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqincw_pat_s32(svint32_t op) +svint32_t test_svqincw_pat_s32(svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw_pat,_s32,,)(op, SV_VL8, 16); } @@ -204,7 +212,7 @@ svint32_t test_svqincw_pat_s32(svint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqincw.nxv4i32( [[OP:%.*]], i32 9, i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqincw_pat_u32(svuint32_t op) +svuint32_t test_svqincw_pat_u32(svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svqincw_pat,_u32,,)(op, SV_VL16, 1); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qsub.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qsub.c index d5d413ebdff6390..7ae68897643d045 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qsub.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_qsub.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svqsub_s8(svint8_t op1, svint8_t op2) +svint8_t test_svqsub_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svqsub_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqsub_s16(svint16_t op1, svint16_t op2) +svint16_t test_svqsub_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svqsub_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqsub_s32(svint32_t op1, svint32_t op2) +svint32_t test_svqsub_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svqsub_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqsub_s64(svint64_t op1, svint64_t op2) +svint64_t test_svqsub_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svqsub_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svqsub_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svqsub_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svqsub_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqsub_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svqsub_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svqsub_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqsub_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svqsub_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svqsub_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqsub_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svqsub_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_u64,,)(op1, op2); } @@ -148,7 +156,7 @@ svuint64_t test_svqsub_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv16i8( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svqsub_n_s8(svint8_t op1, int8_t op2) +svint8_t test_svqsub_n_s8(svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_s8,,)(op1, op2); } @@ -167,7 +175,7 @@ svint8_t test_svqsub_n_s8(svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv8i16( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svqsub_n_s16(svint16_t op1, int16_t op2) +svint16_t test_svqsub_n_s16(svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_s16,,)(op1, op2); } @@ -186,7 +194,7 @@ svint16_t test_svqsub_n_s16(svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv4i32( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svqsub_n_s32(svint32_t op1, int32_t op2) +svint32_t test_svqsub_n_s32(svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_s32,,)(op1, op2); } @@ -205,7 +213,7 @@ svint32_t test_svqsub_n_s32(svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sqsub.x.nxv2i64( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svqsub_n_s64(svint64_t op1, int64_t op2) +svint64_t test_svqsub_n_s64(svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_s64,,)(op1, op2); } @@ -224,7 +232,7 @@ svint64_t test_svqsub_n_s64(svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv16i8( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svqsub_n_u8(svuint8_t op1, uint8_t op2) +svuint8_t test_svqsub_n_u8(svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_u8,,)(op1, op2); } @@ -243,7 +251,7 @@ svuint8_t test_svqsub_n_u8(svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv8i16( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svqsub_n_u16(svuint16_t op1, uint16_t op2) +svuint16_t test_svqsub_n_u16(svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_u16,,)(op1, op2); } @@ -262,7 +270,7 @@ svuint16_t test_svqsub_n_u16(svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv4i32( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svqsub_n_u32(svuint32_t op1, uint32_t op2) +svuint32_t test_svqsub_n_u32(svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_u32,,)(op1, op2); } @@ -281,7 +289,7 @@ svuint32_t test_svqsub_n_u32(svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uqsub.x.nxv2i64( [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svqsub_n_u64(svuint64_t op1, uint64_t op2) +svuint64_t test_svqsub_n_u64(svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svqsub,_n_u64,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rbit.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rbit.c index 997d53755ab273b..5b1b91e7ecfde7f 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rbit.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rbit.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svrbit_s8_z(svbool_t pg, svint8_t op) +svint8_t test_svrbit_s8_z(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s8,_z,)(pg, op); } @@ -41,7 +49,7 @@ svint8_t test_svrbit_s8_z(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svrbit_s16_z(svbool_t pg, svint16_t op) +svint16_t test_svrbit_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s16,_z,)(pg, op); } @@ -58,7 +66,7 @@ svint16_t test_svrbit_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrbit_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svrbit_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s32,_z,)(pg, op); } @@ -75,7 +83,7 @@ svint32_t test_svrbit_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrbit_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svrbit_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s64,_z,)(pg, op); } @@ -90,7 +98,7 @@ svint64_t test_svrbit_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv16i8( zeroinitializer, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svrbit_u8_z(svbool_t pg, svuint8_t op) +svuint8_t test_svrbit_u8_z(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u8,_z,)(pg, op); } @@ -107,7 +115,7 @@ svuint8_t test_svrbit_u8_z(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svrbit_u16_z(svbool_t pg, svuint16_t op) +svuint16_t test_svrbit_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u16,_z,)(pg, op); } @@ -124,7 +132,7 @@ svuint16_t test_svrbit_u16_z(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrbit_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svrbit_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u32,_z,)(pg, op); } @@ -141,7 +149,7 @@ svuint32_t test_svrbit_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrbit_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svrbit_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u64,_z,)(pg, op); } @@ -156,7 +164,7 @@ svuint64_t test_svrbit_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svrbit_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) +svint8_t test_svrbit_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s8,_m,)(inactive, pg, op); } @@ -173,7 +181,7 @@ svint8_t test_svrbit_s8_m(svint8_t inactive, svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svrbit_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) +svint16_t test_svrbit_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s16,_m,)(inactive, pg, op); } @@ -190,7 +198,7 @@ svint16_t test_svrbit_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrbit_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svrbit_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s32,_m,)(inactive, pg, op); } @@ -207,7 +215,7 @@ svint32_t test_svrbit_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrbit_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svrbit_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s64,_m,)(inactive, pg, op); } @@ -222,7 +230,7 @@ svint64_t test_svrbit_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv16i8( [[INACTIVE:%.*]], [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svrbit_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) +svuint8_t test_svrbit_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u8,_m,)(inactive, pg, op); } @@ -239,7 +247,7 @@ svuint8_t test_svrbit_u8_m(svuint8_t inactive, svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svrbit_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) +svuint16_t test_svrbit_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u16,_m,)(inactive, pg, op); } @@ -256,7 +264,7 @@ svuint16_t test_svrbit_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrbit_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svrbit_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u32,_m,)(inactive, pg, op); } @@ -273,7 +281,7 @@ svuint32_t test_svrbit_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrbit_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svrbit_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u64,_m,)(inactive, pg, op); } @@ -288,7 +296,7 @@ svuint64_t test_svrbit_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svrbit_s8_x(svbool_t pg, svint8_t op) +svint8_t test_svrbit_s8_x(svbool_t pg, svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s8,_x,)(pg, op); } @@ -305,7 +313,7 @@ svint8_t test_svrbit_s8_x(svbool_t pg, svint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svrbit_s16_x(svbool_t pg, svint16_t op) +svint16_t test_svrbit_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s16,_x,)(pg, op); } @@ -322,7 +330,7 @@ svint16_t test_svrbit_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrbit_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svrbit_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s32,_x,)(pg, op); } @@ -339,7 +347,7 @@ svint32_t test_svrbit_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrbit_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svrbit_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_s64,_x,)(pg, op); } @@ -354,7 +362,7 @@ svint64_t test_svrbit_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv16i8( undef, [[PG:%.*]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svrbit_u8_x(svbool_t pg, svuint8_t op) +svuint8_t test_svrbit_u8_x(svbool_t pg, svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u8,_x,)(pg, op); } @@ -371,7 +379,7 @@ svuint8_t test_svrbit_u8_x(svbool_t pg, svuint8_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svrbit_u16_x(svbool_t pg, svuint16_t op) +svuint16_t test_svrbit_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u16,_x,)(pg, op); } @@ -388,7 +396,7 @@ svuint16_t test_svrbit_u16_x(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrbit_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svrbit_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u32,_x,)(pg, op); } @@ -405,7 +413,7 @@ svuint32_t test_svrbit_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.rbit.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrbit_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svrbit_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrbit,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpe.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpe.c index 344ea90299dd89e..067512d27d57fcc 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpe.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpe.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frecpe.x.nxv8f16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svrecpe_f16(svfloat16_t op) +svfloat16_t test_svrecpe_f16(svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpe,_f16,,)(op); } @@ -39,7 +47,7 @@ svfloat16_t test_svrecpe_f16(svfloat16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frecpe.x.nxv4f32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svrecpe_f32(svfloat32_t op) +svfloat32_t test_svrecpe_f32(svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpe,_f32,,)(op); } @@ -54,7 +62,7 @@ svfloat32_t test_svrecpe_f32(svfloat32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frecpe.x.nxv2f64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svrecpe_f64(svfloat64_t op) +svfloat64_t test_svrecpe_f64(svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpe,_f64,,)(op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recps.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recps.c index 7be5b15674a0679..e1a5743d672375e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recps.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recps.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frecps.x.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svrecps_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svrecps_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svrecps,_f16,,)(op1, op2); } @@ -39,7 +47,7 @@ svfloat16_t test_svrecps_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frecps.x.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svrecps_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svrecps_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svrecps,_f32,,)(op1, op2); } @@ -54,7 +62,7 @@ svfloat32_t test_svrecps_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frecps.x.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svrecps_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svrecps_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svrecps,_f64,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpx.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpx.c index bfccfb840c47ad8..623bdc89a20cc5b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpx.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_recpx.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrecpx_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrecpx_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrecpx_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrecpx_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrecpx_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrecpx_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrecpx_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrecpx_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrecpx_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrecpx_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrecpx_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrecpx_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrecpx_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrecpx_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrecpx_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrecpx_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrecpx_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrecpx_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrecpx_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrecpx_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrecpx_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrecpx_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrecpx_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrecpx_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frecpx.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrecpx_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrecpx_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrecpx,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev-bfloat.c index ff436a62f807f33..9b3e813fa969472 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv8bf16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svrev_bf16(svbfloat16_t op) +svbfloat16_t test_svrev_bf16(svbfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_bf16,,)(op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev.c index 0bd7fe5e7d22620..3c0ae7df79644fa 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rev.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv16i8( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svrev_s8(svint8_t op) +svint8_t test_svrev_s8(svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_s8,,)(op); } @@ -39,7 +47,7 @@ svint8_t test_svrev_s8(svint8_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv8i16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svrev_s16(svint16_t op) +svint16_t test_svrev_s16(svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_s16,,)(op); } @@ -54,7 +62,7 @@ svint16_t test_svrev_s16(svint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv4i32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svrev_s32(svint32_t op) +svint32_t test_svrev_s32(svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_s32,,)(op); } @@ -69,7 +77,7 @@ svint32_t test_svrev_s32(svint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv2i64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svrev_s64(svint64_t op) +svint64_t test_svrev_s64(svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_s64,,)(op); } @@ -84,7 +92,7 @@ svint64_t test_svrev_s64(svint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv16i8( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svrev_u8(svuint8_t op) +svuint8_t test_svrev_u8(svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_u8,,)(op); } @@ -99,7 +107,7 @@ svuint8_t test_svrev_u8(svuint8_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv8i16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svrev_u16(svuint16_t op) +svuint16_t test_svrev_u16(svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_u16,,)(op); } @@ -114,7 +122,7 @@ svuint16_t test_svrev_u16(svuint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv4i32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svrev_u32(svuint32_t op) +svuint32_t test_svrev_u32(svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_u32,,)(op); } @@ -129,7 +137,7 @@ svuint32_t test_svrev_u32(svuint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv2i64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svrev_u64(svuint64_t op) +svuint64_t test_svrev_u64(svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_u64,,)(op); } @@ -144,7 +152,7 @@ svuint64_t test_svrev_u64(svuint64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv8f16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svrev_f16(svfloat16_t op) +svfloat16_t test_svrev_f16(svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_f16,,)(op); } @@ -159,7 +167,7 @@ svfloat16_t test_svrev_f16(svfloat16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv4f32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svrev_f32(svfloat32_t op) +svfloat32_t test_svrev_f32(svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_f32,,)(op); } @@ -174,7 +182,7 @@ svfloat32_t test_svrev_f32(svfloat32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv2f64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svrev_f64(svfloat64_t op) +svfloat64_t test_svrev_f64(svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrev,_f64,,)(op); } @@ -189,7 +197,7 @@ svfloat64_t test_svrev_f64(svfloat64_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.nxv16i1( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svrev_b8(svbool_t op) +svbool_t test_svrev_b8(svbool_t op) MODE_ATTR { return svrev_b8(op); } @@ -204,7 +212,7 @@ svbool_t test_svrev_b8(svbool_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.b16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svrev_b16(svbool_t op) +svbool_t test_svrev_b16(svbool_t op) MODE_ATTR { return svrev_b16(op); } @@ -219,7 +227,7 @@ svbool_t test_svrev_b16(svbool_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.b32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svrev_b32(svbool_t op) +svbool_t test_svrev_b32(svbool_t op) MODE_ATTR { return svrev_b32(op); } @@ -234,7 +242,7 @@ svbool_t test_svrev_b32(svbool_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.rev.b64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svrev_b64(svbool_t op) +svbool_t test_svrev_b64(svbool_t op) MODE_ATTR { return svrev_b64(op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revb.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revb.c index f5508d2c8d9d66c..a6fc93eb5164ab8 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revb.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revb.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svrevb_s16_z(svbool_t pg, svint16_t op) +svint16_t test_svrevb_s16_z(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svint16_t test_svrevb_s16_z(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrevb_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svrevb_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svint32_t test_svrevb_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevb_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svrevb_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svint64_t test_svrevb_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv8i16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svrevb_u16_z(svbool_t pg, svuint16_t op) +svuint16_t test_svrevb_u16_z(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u16,_z,)(pg, op); } @@ -94,7 +102,7 @@ svuint16_t test_svrevb_u16_z(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrevb_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svrevb_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u32,_z,)(pg, op); } @@ -111,7 +119,7 @@ svuint32_t test_svrevb_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevb_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svrevb_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u64,_z,)(pg, op); } @@ -128,7 +136,7 @@ svuint64_t test_svrevb_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svrevb_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) +svint16_t test_svrevb_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s16,_m,)(inactive, pg, op); } @@ -145,7 +153,7 @@ svint16_t test_svrevb_s16_m(svint16_t inactive, svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrevb_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svrevb_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s32,_m,)(inactive, pg, op); } @@ -162,7 +170,7 @@ svint32_t test_svrevb_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevb_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svrevb_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s64,_m,)(inactive, pg, op); } @@ -179,7 +187,7 @@ svint64_t test_svrevb_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv8i16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svrevb_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) +svuint16_t test_svrevb_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u16,_m,)(inactive, pg, op); } @@ -196,7 +204,7 @@ svuint16_t test_svrevb_u16_m(svuint16_t inactive, svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrevb_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svrevb_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u32,_m,)(inactive, pg, op); } @@ -213,7 +221,7 @@ svuint32_t test_svrevb_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevb_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svrevb_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u64,_m,)(inactive, pg, op); } @@ -230,7 +238,7 @@ svuint64_t test_svrevb_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svrevb_s16_x(svbool_t pg, svint16_t op) +svint16_t test_svrevb_s16_x(svbool_t pg, svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s16,_x,)(pg, op); } @@ -247,7 +255,7 @@ svint16_t test_svrevb_s16_x(svbool_t pg, svint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrevb_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svrevb_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s32,_x,)(pg, op); } @@ -264,7 +272,7 @@ svint32_t test_svrevb_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevb_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svrevb_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_s64,_x,)(pg, op); } @@ -281,7 +289,7 @@ svint64_t test_svrevb_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv8i16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svrevb_u16_x(svbool_t pg, svuint16_t op) +svuint16_t test_svrevb_u16_x(svbool_t pg, svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u16,_x,)(pg, op); } @@ -298,7 +306,7 @@ svuint16_t test_svrevb_u16_x(svbool_t pg, svuint16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrevb_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svrevb_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u32,_x,)(pg, op); } @@ -315,7 +323,7 @@ svuint32_t test_svrevb_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revb.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevb_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svrevb_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevb,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revh.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revh.c index e1ceeda3423ed7f..7a21eee46cfc574 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revh.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revh.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrevh_s32_z(svbool_t pg, svint32_t op) +svint32_t test_svrevh_s32_z(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_s32,_z,)(pg, op); } @@ -43,7 +51,7 @@ svint32_t test_svrevh_s32_z(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevh_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svrevh_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_s64,_z,)(pg, op); } @@ -60,7 +68,7 @@ svint64_t test_svrevh_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv4i32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrevh_u32_z(svbool_t pg, svuint32_t op) +svuint32_t test_svrevh_u32_z(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_u32,_z,)(pg, op); } @@ -77,7 +85,7 @@ svuint32_t test_svrevh_u32_z(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevh_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svrevh_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_u64,_z,)(pg, op); } @@ -94,7 +102,7 @@ svuint64_t test_svrevh_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrevh_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) +svint32_t test_svrevh_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_s32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svint32_t test_svrevh_s32_m(svint32_t inactive, svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevh_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svrevh_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_s64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svint64_t test_svrevh_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv4i32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrevh_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) +svuint32_t test_svrevh_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_u32,_m,)(inactive, pg, op); } @@ -145,7 +153,7 @@ svuint32_t test_svrevh_u32_m(svuint32_t inactive, svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevh_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svrevh_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_u64,_m,)(inactive, pg, op); } @@ -162,7 +170,7 @@ svuint64_t test_svrevh_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svrevh_s32_x(svbool_t pg, svint32_t op) +svint32_t test_svrevh_s32_x(svbool_t pg, svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_s32,_x,)(pg, op); } @@ -179,7 +187,7 @@ svint32_t test_svrevh_s32_x(svbool_t pg, svint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevh_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svrevh_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_s64,_x,)(pg, op); } @@ -196,7 +204,7 @@ svint64_t test_svrevh_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv4i32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svrevh_u32_x(svbool_t pg, svuint32_t op) +svuint32_t test_svrevh_u32_x(svbool_t pg, svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_u32,_x,)(pg, op); } @@ -213,7 +221,7 @@ svuint32_t test_svrevh_u32_x(svbool_t pg, svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revh.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevh_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svrevh_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevh,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revw.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revw.c index 8798f11adf27b7a..9ec50cb65ad32db 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revw.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_revw.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revw.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevw_s64_z(svbool_t pg, svint64_t op) +svint64_t test_svrevw_s64_z(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevw,_s64,_z,)(pg, op); } @@ -43,7 +51,7 @@ svint64_t test_svrevw_s64_z(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revw.nxv2i64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevw_u64_z(svbool_t pg, svuint64_t op) +svuint64_t test_svrevw_u64_z(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevw,_u64,_z,)(pg, op); } @@ -60,7 +68,7 @@ svuint64_t test_svrevw_u64_z(svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revw.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevw_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) +svint64_t test_svrevw_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevw,_s64,_m,)(inactive, pg, op); } @@ -77,7 +85,7 @@ svint64_t test_svrevw_s64_m(svint64_t inactive, svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revw.nxv2i64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevw_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) +svuint64_t test_svrevw_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevw,_u64,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svuint64_t test_svrevw_u64_m(svuint64_t inactive, svbool_t pg, svuint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revw.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svrevw_s64_x(svbool_t pg, svint64_t op) +svint64_t test_svrevw_s64_x(svbool_t pg, svint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevw,_s64,_x,)(pg, op); } @@ -111,7 +119,7 @@ svint64_t test_svrevw_s64_x(svbool_t pg, svint64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.revw.nxv2i64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svrevw_u64_x(svbool_t pg, svuint64_t op) +svuint64_t test_svrevw_u64_x(svbool_t pg, svuint64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrevw,_u64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinta.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinta.c index 124cbce2dbc90b1..efba77f9becfba8 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinta.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinta.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrinta_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrinta_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrinta_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrinta_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrinta_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrinta_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrinta_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrinta_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrinta_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrinta_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrinta_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrinta_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrinta_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrinta_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrinta_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrinta_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrinta_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrinta_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrinta_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrinta_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrinta_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrinta_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrinta_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrinta_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinta.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrinta_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrinta_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinta,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinti.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinti.c index 4086d4f65072bd5..aa33c01b689faa4 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinti.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rinti.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrinti_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrinti_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrinti_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrinti_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrinti_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrinti_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrinti_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrinti_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrinti_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrinti_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrinti_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrinti_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrinti_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrinti_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrinti_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrinti_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrinti_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrinti_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrinti_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrinti_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrinti_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrinti_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrinti_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrinti_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frinti.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrinti_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrinti_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrinti,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintm.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintm.c index 03f3a667812f070..d9f6451cd2e371f 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintm.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintm.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintm_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintm_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrintm_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintm_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintm_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrintm_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintm_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintm_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrintm_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintm_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintm_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrintm_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintm_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintm_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrintm_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintm_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintm_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrintm_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintm_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintm_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrintm_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintm_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintm_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrintm_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintm.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintm_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintm_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintm,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintn.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintn.c index 4f00f7d4a7f535a..acc0c71d18e197e 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintn.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintn.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintn_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintn_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrintn_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintn_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintn_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrintn_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintn_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintn_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrintn_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintn_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintn_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrintn_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintn_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintn_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrintn_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintn_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintn_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrintn_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintn_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintn_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrintn_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintn_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintn_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrintn_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintn.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintn_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintn_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintn,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintp.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintp.c index fb5e9a5f55eee09..2d3a888a8ba025c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintp.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintp.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintp_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintp_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrintp_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintp_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintp_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrintp_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintp_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintp_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrintp_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintp_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintp_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrintp_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintp_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintp_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrintp_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintp_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintp_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrintp_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintp_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintp_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrintp_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintp_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintp_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrintp_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintp.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintp_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintp_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintp,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintx.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintx.c index fc257faaf83e8bc..849a75fff02fc10 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintx.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintx.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintx_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintx_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrintx_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintx_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintx_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrintx_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintx_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintx_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrintx_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintx_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintx_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrintx_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintx_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintx_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrintx_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintx_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintx_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrintx_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintx_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintx_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrintx_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintx_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintx_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrintx_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintx.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintx_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintx_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintx,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintz.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintz.c index 2e405ae59996a94..9efe452f78d20b2 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintz.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rintz.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintz_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintz_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svrintz_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintz_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintz_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svrintz_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintz_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintz_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svrintz_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintz_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintz_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svrintz_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintz_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintz_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svrintz_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintz_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintz_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svrintz_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svrintz_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svrintz_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svrintz_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svrintz_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svrintz_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svrintz_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.frintz.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svrintz_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svrintz_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrintz,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrte.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrte.c index b124a6d586f7d82..2c276ec83a0589c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrte.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrte.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frsqrte.x.nxv8f16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svrsqrte_f16(svfloat16_t op) +svfloat16_t test_svrsqrte_f16(svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrsqrte,_f16,,)(op); } @@ -39,7 +47,7 @@ svfloat16_t test_svrsqrte_f16(svfloat16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frsqrte.x.nxv4f32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svrsqrte_f32(svfloat32_t op) +svfloat32_t test_svrsqrte_f32(svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrsqrte,_f32,,)(op); } @@ -54,7 +62,7 @@ svfloat32_t test_svrsqrte_f32(svfloat32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frsqrte.x.nxv2f64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svrsqrte_f64(svfloat64_t op) +svfloat64_t test_svrsqrte_f64(svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svrsqrte,_f64,,)(op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrts.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrts.c index 4a32324f007cbe9..8dc65ff93a08bd3 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrts.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rsqrts.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frsqrts.x.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svrsqrts_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svrsqrts_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svrsqrts,_f16,,)(op1, op2); } @@ -39,7 +47,7 @@ svfloat16_t test_svrsqrts_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frsqrts.x.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svrsqrts_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svrsqrts_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svrsqrts,_f32,,)(op1, op2); } @@ -54,7 +62,7 @@ svfloat32_t test_svrsqrts_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.frsqrts.x.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svrsqrts_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svrsqrts_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svrsqrts,_f64,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_scale.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_scale.c index e4cc4cb287da1ad..460bd4b1c849d8d 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_scale.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_scale.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svscale_f16_z(svbool_t pg, svfloat16_t op1, svint16_t op2) +svfloat16_t test_svscale_f16_z(svbool_t pg, svfloat16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f16,_z,)(pg, op1, op2); } @@ -47,7 +55,7 @@ svfloat16_t test_svscale_f16_z(svbool_t pg, svfloat16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svscale_f32_z(svbool_t pg, svfloat32_t op1, svint32_t op2) +svfloat32_t test_svscale_f32_z(svbool_t pg, svfloat32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f32,_z,)(pg, op1, op2); } @@ -66,7 +74,7 @@ svfloat32_t test_svscale_f32_z(svbool_t pg, svfloat32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svscale_f64_z(svbool_t pg, svfloat64_t op1, svint64_t op2) +svfloat64_t test_svscale_f64_z(svbool_t pg, svfloat64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f64,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svfloat64_t test_svscale_f64_z(svbool_t pg, svfloat64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svscale_f16_m(svbool_t pg, svfloat16_t op1, svint16_t op2) +svfloat16_t test_svscale_f16_m(svbool_t pg, svfloat16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f16,_m,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svfloat16_t test_svscale_f16_m(svbool_t pg, svfloat16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svscale_f32_m(svbool_t pg, svfloat32_t op1, svint32_t op2) +svfloat32_t test_svscale_f32_m(svbool_t pg, svfloat32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f32,_m,)(pg, op1, op2); } @@ -117,7 +125,7 @@ svfloat32_t test_svscale_f32_m(svbool_t pg, svfloat32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svscale_f64_m(svbool_t pg, svfloat64_t op1, svint64_t op2) +svfloat64_t test_svscale_f64_m(svbool_t pg, svfloat64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f64,_m,)(pg, op1, op2); } @@ -134,7 +142,7 @@ svfloat64_t test_svscale_f64_m(svbool_t pg, svfloat64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svscale_f16_x(svbool_t pg, svfloat16_t op1, svint16_t op2) +svfloat16_t test_svscale_f16_x(svbool_t pg, svfloat16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f16,_x,)(pg, op1, op2); } @@ -151,7 +159,7 @@ svfloat16_t test_svscale_f16_x(svbool_t pg, svfloat16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svscale_f32_x(svbool_t pg, svfloat32_t op1, svint32_t op2) +svfloat32_t test_svscale_f32_x(svbool_t pg, svfloat32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f32,_x,)(pg, op1, op2); } @@ -168,7 +176,7 @@ svfloat32_t test_svscale_f32_x(svbool_t pg, svfloat32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svscale_f64_x(svbool_t pg, svfloat64_t op1, svint64_t op2) +svfloat64_t test_svscale_f64_x(svbool_t pg, svfloat64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_f64,_x,)(pg, op1, op2); } @@ -191,7 +199,7 @@ svfloat64_t test_svscale_f64_x(svbool_t pg, svfloat64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svscale_n_f16_z(svbool_t pg, svfloat16_t op1, int16_t op2) +svfloat16_t test_svscale_n_f16_z(svbool_t pg, svfloat16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f16,_z,)(pg, op1, op2); } @@ -214,7 +222,7 @@ svfloat16_t test_svscale_n_f16_z(svbool_t pg, svfloat16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svscale_n_f32_z(svbool_t pg, svfloat32_t op1, int32_t op2) +svfloat32_t test_svscale_n_f32_z(svbool_t pg, svfloat32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f32,_z,)(pg, op1, op2); } @@ -237,7 +245,7 @@ svfloat32_t test_svscale_n_f32_z(svbool_t pg, svfloat32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svscale_n_f64_z(svbool_t pg, svfloat64_t op1, int64_t op2) +svfloat64_t test_svscale_n_f64_z(svbool_t pg, svfloat64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f64,_z,)(pg, op1, op2); } @@ -258,7 +266,7 @@ svfloat64_t test_svscale_n_f64_z(svbool_t pg, svfloat64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svscale_n_f16_m(svbool_t pg, svfloat16_t op1, int16_t op2) +svfloat16_t test_svscale_n_f16_m(svbool_t pg, svfloat16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f16,_m,)(pg, op1, op2); } @@ -279,7 +287,7 @@ svfloat16_t test_svscale_n_f16_m(svbool_t pg, svfloat16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svscale_n_f32_m(svbool_t pg, svfloat32_t op1, int32_t op2) +svfloat32_t test_svscale_n_f32_m(svbool_t pg, svfloat32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f32,_m,)(pg, op1, op2); } @@ -300,7 +308,7 @@ svfloat32_t test_svscale_n_f32_m(svbool_t pg, svfloat32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svscale_n_f64_m(svbool_t pg, svfloat64_t op1, int64_t op2) +svfloat64_t test_svscale_n_f64_m(svbool_t pg, svfloat64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f64,_m,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svfloat64_t test_svscale_n_f64_m(svbool_t pg, svfloat64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svscale_n_f16_x(svbool_t pg, svfloat16_t op1, int16_t op2) +svfloat16_t test_svscale_n_f16_x(svbool_t pg, svfloat16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f16,_x,)(pg, op1, op2); } @@ -342,7 +350,7 @@ svfloat16_t test_svscale_n_f16_x(svbool_t pg, svfloat16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svscale_n_f32_x(svbool_t pg, svfloat32_t op1, int32_t op2) +svfloat32_t test_svscale_n_f32_x(svbool_t pg, svfloat32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f32,_x,)(pg, op1, op2); } @@ -363,7 +371,7 @@ svfloat32_t test_svscale_n_f32_x(svbool_t pg, svfloat32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fscale.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svscale_n_f64_x(svbool_t pg, svfloat64_t op1, int64_t op2) +svfloat64_t test_svscale_n_f64_x(svbool_t pg, svfloat64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svscale,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel-bfloat.c index 0665b4411830119..82be1904f6770ee 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel-bfloat.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svsel_bf16(svbool_t pg, svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svsel_bf16(svbool_t pg, svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svsel_bf16'}} return SVE_ACLE_FUNC(svsel,_bf16,,)(pg, op1, op2); diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel.c index af7f8da11399681..9cf7f4d7f45cca2 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = select [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsel_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsel_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_s8,,)(pg, op1, op2); } @@ -41,7 +49,7 @@ svint8_t test_svsel_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsel_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsel_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_s16,,)(pg, op1, op2); } @@ -58,7 +66,7 @@ svint16_t test_svsel_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsel_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsel_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_s32,,)(pg, op1, op2); } @@ -75,7 +83,7 @@ svint32_t test_svsel_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsel_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsel_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_s64,,)(pg, op1, op2); } @@ -90,7 +98,7 @@ svint64_t test_svsel_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = select [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsel_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsel_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_u8,,)(pg, op1, op2); } @@ -107,7 +115,7 @@ svuint8_t test_svsel_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsel_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsel_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_u16,,)(pg, op1, op2); } @@ -124,7 +132,7 @@ svuint16_t test_svsel_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsel_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsel_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_u32,,)(pg, op1, op2); } @@ -141,7 +149,7 @@ svuint32_t test_svsel_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsel_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsel_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_u64,,)(pg, op1, op2); } @@ -158,7 +166,7 @@ svuint64_t test_svsel_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsel_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsel_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_f16,,)(pg, op1, op2); } @@ -175,7 +183,7 @@ svfloat16_t test_svsel_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsel_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsel_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_f32,,)(pg, op1, op2); } @@ -192,7 +200,7 @@ svfloat32_t test_svsel_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsel_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsel_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_f64,,)(pg, op1, op2); } @@ -207,7 +215,7 @@ svfloat64_t test_svsel_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = select [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]] // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svsel_b(svbool_t pg, svbool_t op1, svbool_t op2) +svbool_t test_svsel_b(svbool_t pg, svbool_t op1, svbool_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsel,_b,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2-bfloat.c index d10dc84e9865e2d..7298666b3b1db12 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2.c index 4a4b8969a111088..71527c321f1e223 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3-bfloat.c index 0ad7f09cc407b48..72cd7e9dc001ad8 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3.c index 0d0f611400d6dfb..17a808f72edac55 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set3.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4-bfloat.c index d4abce07b401db4..49fcb15b9b3cd80 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4-bfloat.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +bf16 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4.c index 7e1aa74003d079c..7eec14b84a9f9fd 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set4.c @@ -1,11 +1,11 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice-bfloat.c index e3959ac34f000f4..266e32fb59dd3de 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice-bfloat.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv8bf16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbfloat16_t test_svsplice_bf16(svbool_t pg, svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svsplice_bf16(svbool_t pg, svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svsplice_bf16'}} return SVE_ACLE_FUNC(svsplice,_bf16,,)(pg, op1, op2); diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice.c index 6070da575850c10..fe4e910e37aaec6 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_splice.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.splice.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsplice_s8(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsplice_s8(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_s8,,)(pg, op1, op2); } @@ -41,7 +49,7 @@ svint8_t test_svsplice_s8(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsplice_s16(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsplice_s16(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_s16,,)(pg, op1, op2); } @@ -58,7 +66,7 @@ svint16_t test_svsplice_s16(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsplice_s32(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsplice_s32(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_s32,,)(pg, op1, op2); } @@ -75,7 +83,7 @@ svint32_t test_svsplice_s32(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsplice_s64(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsplice_s64(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_s64,,)(pg, op1, op2); } @@ -90,7 +98,7 @@ svint64_t test_svsplice_s64(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.splice.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsplice_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsplice_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_u8,,)(pg, op1, op2); } @@ -107,7 +115,7 @@ svuint8_t test_svsplice_u8(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsplice_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsplice_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_u16,,)(pg, op1, op2); } @@ -124,7 +132,7 @@ svuint16_t test_svsplice_u16(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsplice_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsplice_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_u32,,)(pg, op1, op2); } @@ -141,7 +149,7 @@ svuint32_t test_svsplice_u32(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsplice_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsplice_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_u64,,)(pg, op1, op2); } @@ -158,7 +166,7 @@ svuint64_t test_svsplice_u64(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsplice_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsplice_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_f16,,)(pg, op1, op2); } @@ -175,7 +183,7 @@ svfloat16_t test_svsplice_f16(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsplice_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsplice_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_f32,,)(pg, op1, op2); } @@ -192,7 +200,7 @@ svfloat32_t test_svsplice_f32(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.splice.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsplice_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsplice_f64(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsplice,_f64,,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sqrt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sqrt.c index 2c51c473bdc2aea..8c3ac5dbfb18261 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sqrt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sqrt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv8f16( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsqrt_f16_z(svbool_t pg, svfloat16_t op) +svfloat16_t test_svsqrt_f16_z(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f16,_z,)(pg, op); } @@ -43,7 +51,7 @@ svfloat16_t test_svsqrt_f16_z(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv4f32( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsqrt_f32_z(svbool_t pg, svfloat32_t op) +svfloat32_t test_svsqrt_f32_z(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f32,_z,)(pg, op); } @@ -60,7 +68,7 @@ svfloat32_t test_svsqrt_f32_z(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv2f64( zeroinitializer, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsqrt_f64_z(svbool_t pg, svfloat64_t op) +svfloat64_t test_svsqrt_f64_z(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f64,_z,)(pg, op); } @@ -77,7 +85,7 @@ svfloat64_t test_svsqrt_f64_z(svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv8f16( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsqrt_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) +svfloat16_t test_svsqrt_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f16,_m,)(inactive, pg, op); } @@ -94,7 +102,7 @@ svfloat16_t test_svsqrt_f16_m(svfloat16_t inactive, svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv4f32( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsqrt_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) +svfloat32_t test_svsqrt_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f32,_m,)(inactive, pg, op); } @@ -111,7 +119,7 @@ svfloat32_t test_svsqrt_f32_m(svfloat32_t inactive, svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv2f64( [[INACTIVE:%.*]], [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsqrt_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) +svfloat64_t test_svsqrt_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f64,_m,)(inactive, pg, op); } @@ -128,7 +136,7 @@ svfloat64_t test_svsqrt_f64_m(svfloat64_t inactive, svbool_t pg, svfloat64_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv8f16( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsqrt_f16_x(svbool_t pg, svfloat16_t op) +svfloat16_t test_svsqrt_f16_x(svbool_t pg, svfloat16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f16,_x,)(pg, op); } @@ -145,7 +153,7 @@ svfloat16_t test_svsqrt_f16_x(svbool_t pg, svfloat16_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv4f32( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsqrt_f32_x(svbool_t pg, svfloat32_t op) +svfloat32_t test_svsqrt_f32_x(svbool_t pg, svfloat32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f32,_x,)(pg, op); } @@ -162,7 +170,7 @@ svfloat32_t test_svsqrt_f32_x(svbool_t pg, svfloat32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsqrt.nxv2f64( undef, [[TMP0]], [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsqrt_f64_x(svbool_t pg, svfloat64_t op) +svfloat64_t test_svsqrt_f64_x(svbool_t pg, svfloat64_t op) MODE_ATTR { return SVE_ACLE_FUNC(svsqrt,_f64,_x,)(pg, op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1-bfloat.c index 7075e96d62c5bc4..c1254e03102d723 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8bf16.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_bf16(svbool_t pg, bfloat16_t *base, svbfloat16_t data) +void test_svst1_bf16(svbool_t pg, bfloat16_t *base, svbfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_bf16,,)(pg, base, data); } @@ -52,7 +60,7 @@ void test_svst1_bf16(svbool_t pg, bfloat16_t *base, svbfloat16_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8bf16.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16_t data) +void test_svst1_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_bf16,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1.c index 987ec6c3e878982..519f0c90614a54d 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv16i8.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[PG:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_s8(svbool_t pg, int8_t *base, svint8_t data) +void test_svst1_s8(svbool_t pg, int8_t *base, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_s8,,)(pg, base, data); } @@ -41,7 +49,7 @@ void test_svst1_s8(svbool_t pg, int8_t *base, svint8_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8i16.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_s16(svbool_t pg, int16_t *base, svint16_t data) +void test_svst1_s16(svbool_t pg, int16_t *base, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_s16,,)(pg, base, data); } @@ -58,7 +66,7 @@ void test_svst1_s16(svbool_t pg, int16_t *base, svint16_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv4i32.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_s32(svbool_t pg, int32_t *base, svint32_t data) +void test_svst1_s32(svbool_t pg, int32_t *base, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_s32,,)(pg, base, data); } @@ -75,7 +83,7 @@ void test_svst1_s32(svbool_t pg, int32_t *base, svint32_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv2i64.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_s64(svbool_t pg, int64_t *base, svint64_t data) +void test_svst1_s64(svbool_t pg, int64_t *base, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_s64,,)(pg, base, data); } @@ -90,7 +98,7 @@ void test_svst1_s64(svbool_t pg, int64_t *base, svint64_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv16i8.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[PG:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_u8(svbool_t pg, uint8_t *base, svuint8_t data) +void test_svst1_u8(svbool_t pg, uint8_t *base, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_u8,,)(pg, base, data); } @@ -107,7 +115,7 @@ void test_svst1_u8(svbool_t pg, uint8_t *base, svuint8_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8i16.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_u16(svbool_t pg, uint16_t *base, svuint16_t data) +void test_svst1_u16(svbool_t pg, uint16_t *base, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_u16,,)(pg, base, data); } @@ -124,7 +132,7 @@ void test_svst1_u16(svbool_t pg, uint16_t *base, svuint16_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv4i32.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_u32(svbool_t pg, uint32_t *base, svuint32_t data) +void test_svst1_u32(svbool_t pg, uint32_t *base, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_u32,,)(pg, base, data); } @@ -141,7 +149,7 @@ void test_svst1_u32(svbool_t pg, uint32_t *base, svuint32_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv2i64.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_u64(svbool_t pg, uint64_t *base, svuint64_t data) +void test_svst1_u64(svbool_t pg, uint64_t *base, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_u64,,)(pg, base, data); } @@ -158,7 +166,7 @@ void test_svst1_u64(svbool_t pg, uint64_t *base, svuint64_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8f16.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_f16(svbool_t pg, float16_t *base, svfloat16_t data) +void test_svst1_f16(svbool_t pg, float16_t *base, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_f16,,)(pg, base, data); } @@ -175,7 +183,7 @@ void test_svst1_f16(svbool_t pg, float16_t *base, svfloat16_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv4f32.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_f32(svbool_t pg, float32_t *base, svfloat32_t data) +void test_svst1_f32(svbool_t pg, float32_t *base, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_f32,,)(pg, base, data); } @@ -192,7 +200,7 @@ void test_svst1_f32(svbool_t pg, float32_t *base, svfloat32_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv2f64.p0( [[DATA:%.*]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_f64(svbool_t pg, float64_t *base, svfloat64_t data) +void test_svst1_f64(svbool_t pg, float64_t *base, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1,_f64,,)(pg, base, data); } @@ -215,7 +223,7 @@ void test_svst1_f64(svbool_t pg, float64_t *base, svfloat64_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv16i8.p0( [[DATA:%.*]], ptr [[TMP2]], i32 1, [[PG:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8_t data) +void test_svst1_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_s8,,)(pg, base, vnum, data); } @@ -240,7 +248,7 @@ void test_svst1_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8_t data) // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8i16.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16_t data) +void test_svst1_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_s16,,)(pg, base, vnum, data); } @@ -265,7 +273,7 @@ void test_svst1_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16_t dat // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv4i32.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32_t data) +void test_svst1_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_s32,,)(pg, base, vnum, data); } @@ -290,7 +298,7 @@ void test_svst1_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32_t dat // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv2i64.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64_t data) +void test_svst1_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_s64,,)(pg, base, vnum, data); } @@ -313,7 +321,7 @@ void test_svst1_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64_t dat // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv16i8.p0( [[DATA:%.*]], ptr [[TMP2]], i32 1, [[PG:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8_t data) +void test_svst1_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_u8,,)(pg, base, vnum, data); } @@ -338,7 +346,7 @@ void test_svst1_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8_t data // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8i16.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16_t data) +void test_svst1_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_u16,,)(pg, base, vnum, data); } @@ -363,7 +371,7 @@ void test_svst1_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16_t d // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv4i32.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32_t data) +void test_svst1_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_u32,,)(pg, base, vnum, data); } @@ -388,7 +396,7 @@ void test_svst1_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32_t d // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv2i64.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64_t data) +void test_svst1_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_u64,,)(pg, base, vnum, data); } @@ -413,7 +421,7 @@ void test_svst1_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64_t d // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv8f16.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16_t data) +void test_svst1_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_f16,,)(pg, base, vnum, data); } @@ -438,7 +446,7 @@ void test_svst1_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16_t // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv4f32.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32_t data) +void test_svst1_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_f32,,)(pg, base, vnum, data); } @@ -463,11 +471,13 @@ void test_svst1_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32_t // CPP-CHECK-NEXT: tail call void @llvm.masked.store.nxv2f64.p0( [[DATA:%.*]], ptr [[TMP3]], i32 1, [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svst1_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64_t data) +void test_svst1_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1_vnum,_f64,,)(pg, base, vnum, data); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svst1_scatter_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG:%.*]]) @@ -1193,3 +1203,5 @@ void test_svst1_scatter_u64base_index_f64(svbool_t pg, svuint64_t bases, int64_t { return SVE_ACLE_FUNC(svst1_scatter,_u64base,_index,_f64)(pg, bases, index, data); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1b.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1b.c index 10187fba3aa6e34..152f01aab7405be 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1b.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1b.c @@ -2,8 +2,17 @@ // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -o - -emit-llvm %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -o - -emit-llvm %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -18,7 +27,7 @@ // CHECK-NEXT: tail call void @llvm.masked.store.nxv8i8.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_s16(svbool_t pg, int8_t *base, svint16_t data) +void test_svst1b_s16(svbool_t pg, int8_t *base, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b,_s16,,)(pg, base, data); } @@ -30,7 +39,7 @@ void test_svst1b_s16(svbool_t pg, int8_t *base, svint16_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i8.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_s32(svbool_t pg, int8_t *base, svint32_t data) +void test_svst1b_s32(svbool_t pg, int8_t *base, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b,_s32,,)(pg, base, data); } @@ -42,7 +51,7 @@ void test_svst1b_s32(svbool_t pg, int8_t *base, svint32_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i8.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_s64(svbool_t pg, int8_t *base, svint64_t data) +void test_svst1b_s64(svbool_t pg, int8_t *base, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b,_s64,,)(pg, base, data); } @@ -54,7 +63,7 @@ void test_svst1b_s64(svbool_t pg, int8_t *base, svint64_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv8i8.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_u16(svbool_t pg, uint8_t *base, svuint16_t data) +void test_svst1b_u16(svbool_t pg, uint8_t *base, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b,_u16,,)(pg, base, data); } @@ -66,7 +75,7 @@ void test_svst1b_u16(svbool_t pg, uint8_t *base, svuint16_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i8.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_u32(svbool_t pg, uint8_t *base, svuint32_t data) +void test_svst1b_u32(svbool_t pg, uint8_t *base, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b,_u32,,)(pg, base, data); } @@ -78,7 +87,7 @@ void test_svst1b_u32(svbool_t pg, uint8_t *base, svuint32_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i8.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_u64(svbool_t pg, uint8_t *base, svuint64_t data) +void test_svst1b_u64(svbool_t pg, uint8_t *base, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b,_u64,,)(pg, base, data); } @@ -94,7 +103,7 @@ void test_svst1b_u64(svbool_t pg, uint8_t *base, svuint64_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv8i8.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_vnum_s16(svbool_t pg, int8_t *base, int64_t vnum, svint16_t data) +void test_svst1b_vnum_s16(svbool_t pg, int8_t *base, int64_t vnum, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b_vnum,_s16,,)(pg, base, vnum, data); } @@ -110,7 +119,7 @@ void test_svst1b_vnum_s16(svbool_t pg, int8_t *base, int64_t vnum, svint16_t dat // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i8.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_vnum_s32(svbool_t pg, int8_t *base, int64_t vnum, svint32_t data) +void test_svst1b_vnum_s32(svbool_t pg, int8_t *base, int64_t vnum, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b_vnum,_s32,,)(pg, base, vnum, data); } @@ -126,7 +135,7 @@ void test_svst1b_vnum_s32(svbool_t pg, int8_t *base, int64_t vnum, svint32_t dat // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i8.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_vnum_s64(svbool_t pg, int8_t *base, int64_t vnum, svint64_t data) +void test_svst1b_vnum_s64(svbool_t pg, int8_t *base, int64_t vnum, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b_vnum,_s64,,)(pg, base, vnum, data); } @@ -142,7 +151,7 @@ void test_svst1b_vnum_s64(svbool_t pg, int8_t *base, int64_t vnum, svint64_t dat // CHECK-NEXT: tail call void @llvm.masked.store.nxv8i8.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_vnum_u16(svbool_t pg, uint8_t *base, int64_t vnum, svuint16_t data) +void test_svst1b_vnum_u16(svbool_t pg, uint8_t *base, int64_t vnum, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b_vnum,_u16,,)(pg, base, vnum, data); } @@ -158,7 +167,7 @@ void test_svst1b_vnum_u16(svbool_t pg, uint8_t *base, int64_t vnum, svuint16_t d // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i8.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_vnum_u32(svbool_t pg, uint8_t *base, int64_t vnum, svuint32_t data) +void test_svst1b_vnum_u32(svbool_t pg, uint8_t *base, int64_t vnum, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b_vnum,_u32,,)(pg, base, vnum, data); } @@ -174,11 +183,13 @@ void test_svst1b_vnum_u32(svbool_t pg, uint8_t *base, int64_t vnum, svuint32_t d // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i8.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1b_vnum_u64(svbool_t pg, uint8_t *base, int64_t vnum, svuint64_t data) +void test_svst1b_vnum_u64(svbool_t pg, uint8_t *base, int64_t vnum, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1b_vnum,_u64,,)(pg, base, vnum, data); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svst1b_scatter_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = trunc [[DATA:%.*]] to @@ -370,3 +381,5 @@ void test_svst1b_scatter_u64base_offset_u64(svbool_t pg, svuint64_t bases, int64 { return SVE_ACLE_FUNC(svst1b_scatter,_u64base,_offset,_u64)(pg, bases, offset, data); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1h.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1h.c index 598b42a5e9c26e4..9aa450f2e5457d3 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1h.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1h.c @@ -2,8 +2,17 @@ // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -o - -emit-llvm %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -o - -emit-llvm %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -18,7 +27,7 @@ // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i16.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_s32(svbool_t pg, int16_t *base, svint32_t data) +void test_svst1h_s32(svbool_t pg, int16_t *base, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h,_s32,,)(pg, base, data); } @@ -30,7 +39,7 @@ void test_svst1h_s32(svbool_t pg, int16_t *base, svint32_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i16.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_s64(svbool_t pg, int16_t *base, svint64_t data) +void test_svst1h_s64(svbool_t pg, int16_t *base, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h,_s64,,)(pg, base, data); } @@ -42,7 +51,7 @@ void test_svst1h_s64(svbool_t pg, int16_t *base, svint64_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i16.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_u32(svbool_t pg, uint16_t *base, svuint32_t data) +void test_svst1h_u32(svbool_t pg, uint16_t *base, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h,_u32,,)(pg, base, data); } @@ -54,7 +63,7 @@ void test_svst1h_u32(svbool_t pg, uint16_t *base, svuint32_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i16.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_u64(svbool_t pg, uint16_t *base, svuint64_t data) +void test_svst1h_u64(svbool_t pg, uint16_t *base, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h,_u64,,)(pg, base, data); } @@ -70,7 +79,7 @@ void test_svst1h_u64(svbool_t pg, uint16_t *base, svuint64_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i16.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_vnum_s32(svbool_t pg, int16_t *base, int64_t vnum, svint32_t data) +void test_svst1h_vnum_s32(svbool_t pg, int16_t *base, int64_t vnum, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h_vnum,_s32,,)(pg, base, vnum, data); } @@ -86,7 +95,7 @@ void test_svst1h_vnum_s32(svbool_t pg, int16_t *base, int64_t vnum, svint32_t da // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i16.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_vnum_s64(svbool_t pg, int16_t *base, int64_t vnum, svint64_t data) +void test_svst1h_vnum_s64(svbool_t pg, int16_t *base, int64_t vnum, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h_vnum,_s64,,)(pg, base, vnum, data); } @@ -102,7 +111,7 @@ void test_svst1h_vnum_s64(svbool_t pg, int16_t *base, int64_t vnum, svint64_t da // CHECK-NEXT: tail call void @llvm.masked.store.nxv4i16.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_vnum_u32(svbool_t pg, uint16_t *base, int64_t vnum, svuint32_t data) +void test_svst1h_vnum_u32(svbool_t pg, uint16_t *base, int64_t vnum, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h_vnum,_u32,,)(pg, base, vnum, data); } @@ -118,11 +127,13 @@ void test_svst1h_vnum_u32(svbool_t pg, uint16_t *base, int64_t vnum, svuint32_t // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i16.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1h_vnum_u64(svbool_t pg, uint16_t *base, int64_t vnum, svuint64_t data) +void test_svst1h_vnum_u64(svbool_t pg, uint16_t *base, int64_t vnum, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1h_vnum,_u64,,)(pg, base, vnum, data); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svst1h_scatter_u32base_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = trunc [[DATA:%.*]] to @@ -462,3 +473,5 @@ void test_svst1h_scatter_u64base_index_u64(svbool_t pg, svuint64_t bases, int64_ { return SVE_ACLE_FUNC(svst1h_scatter,_u64base,_index,_u64)(pg, bases, index, data); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1w.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1w.c index e224d944f7b9bad..f22190b3583ed9b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1w.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1w.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -o - -emit-llvm %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -o - -emit-llvm %s | opt -S -passes=mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -19,7 +27,7 @@ // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i32.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1w_s64(svbool_t pg, int32_t *base, svint64_t data) +void test_svst1w_s64(svbool_t pg, int32_t *base, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1w,_s64,,)(pg, base, data); } @@ -31,7 +39,7 @@ void test_svst1w_s64(svbool_t pg, int32_t *base, svint64_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i32.p0( [[TMP1]], ptr [[BASE:%.*]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1w_u64(svbool_t pg, uint32_t *base, svuint64_t data) +void test_svst1w_u64(svbool_t pg, uint32_t *base, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1w,_u64,,)(pg, base, data); } @@ -47,7 +55,7 @@ void test_svst1w_u64(svbool_t pg, uint32_t *base, svuint64_t data) // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i32.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1w_vnum_s64(svbool_t pg, int32_t *base, int64_t vnum, svint64_t data) +void test_svst1w_vnum_s64(svbool_t pg, int32_t *base, int64_t vnum, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1w_vnum,_s64,,)(pg, base, vnum, data); } @@ -63,11 +71,13 @@ void test_svst1w_vnum_s64(svbool_t pg, int32_t *base, int64_t vnum, svint64_t da // CHECK-NEXT: tail call void @llvm.masked.store.nxv2i32.p0( [[TMP4]], ptr [[TMP3]], i32 1, [[TMP0]]) // CHECK-NEXT: ret void // -void test_svst1w_vnum_u64(svbool_t pg, uint32_t *base, int64_t vnum, svuint64_t data) +void test_svst1w_vnum_u64(svbool_t pg, uint32_t *base, int64_t vnum, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst1w_vnum,_u64,,)(pg, base, vnum, data); } +#ifndef __ARM_FEATURE_SME + // CHECK-LABEL: @test_svst1w_scatter_u64base_s64( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = trunc [[DATA:%.*]] to @@ -237,3 +247,5 @@ void test_svst1w_scatter_u64base_index_u64(svbool_t pg, svuint64_t bases, int64_ { return SVE_ACLE_FUNC(svst1w_scatter,_u64base,_index,_u64)(pg, bases, index, data); } + +#endif diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2-bfloat.c index dae405bc2f29a19..e2c4883f7a1c854 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -30,7 +38,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8bf16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x2_t data) +void test_svst2_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_bf16,,)(pg, base, data); } @@ -53,7 +61,7 @@ void test_svst2_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8bf16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16x2_t data) +void test_svst2_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_bf16,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2.c index b6cb6dbdc0c48ac..9d87943dc35919b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -28,7 +36,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv16i8( [[TMP0]], [[TMP1]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_s8(svbool_t pg, int8_t *base, svint8x2_t data) +void test_svst2_s8(svbool_t pg, int8_t *base, svint8x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_s8,,)(pg, base, data); } @@ -49,7 +57,7 @@ void test_svst2_s8(svbool_t pg, int8_t *base, svint8x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_s16(svbool_t pg, int16_t *base, svint16x2_t data) +void test_svst2_s16(svbool_t pg, int16_t *base, svint16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_s16,,)(pg, base, data); } @@ -70,7 +78,7 @@ void test_svst2_s16(svbool_t pg, int16_t *base, svint16x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_s32(svbool_t pg, int32_t *base, svint32x2_t data) +void test_svst2_s32(svbool_t pg, int32_t *base, svint32x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_s32,,)(pg, base, data); } @@ -91,7 +99,7 @@ void test_svst2_s32(svbool_t pg, int32_t *base, svint32x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_s64(svbool_t pg, int64_t *base, svint64x2_t data) +void test_svst2_s64(svbool_t pg, int64_t *base, svint64x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_s64,,)(pg, base, data); } @@ -110,7 +118,7 @@ void test_svst2_s64(svbool_t pg, int64_t *base, svint64x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv16i8( [[TMP0]], [[TMP1]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_u8(svbool_t pg, uint8_t *base, svuint8x2_t data) +void test_svst2_u8(svbool_t pg, uint8_t *base, svuint8x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_u8,,)(pg, base, data); } @@ -131,7 +139,7 @@ void test_svst2_u8(svbool_t pg, uint8_t *base, svuint8x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_u16(svbool_t pg, uint16_t *base, svuint16x2_t data) +void test_svst2_u16(svbool_t pg, uint16_t *base, svuint16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_u16,,)(pg, base, data); } @@ -152,7 +160,7 @@ void test_svst2_u16(svbool_t pg, uint16_t *base, svuint16x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_u32(svbool_t pg, uint32_t *base, svuint32x2_t data) +void test_svst2_u32(svbool_t pg, uint32_t *base, svuint32x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_u32,,)(pg, base, data); } @@ -173,7 +181,7 @@ void test_svst2_u32(svbool_t pg, uint32_t *base, svuint32x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_u64(svbool_t pg, uint64_t *base, svuint64x2_t data) +void test_svst2_u64(svbool_t pg, uint64_t *base, svuint64x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_u64,,)(pg, base, data); } @@ -194,7 +202,7 @@ void test_svst2_u64(svbool_t pg, uint64_t *base, svuint64x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8f16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_f16(svbool_t pg, float16_t *base, svfloat16x2_t data) +void test_svst2_f16(svbool_t pg, float16_t *base, svfloat16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_f16,,)(pg, base, data); } @@ -215,7 +223,7 @@ void test_svst2_f16(svbool_t pg, float16_t *base, svfloat16x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv4f32( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_f32(svbool_t pg, float32_t *base, svfloat32x2_t data) +void test_svst2_f32(svbool_t pg, float32_t *base, svfloat32x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_f32,,)(pg, base, data); } @@ -236,7 +244,7 @@ void test_svst2_f32(svbool_t pg, float32_t *base, svfloat32x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv2f64( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_f64(svbool_t pg, float64_t *base, svfloat64x2_t data) +void test_svst2_f64(svbool_t pg, float64_t *base, svfloat64x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2,_f64,,)(pg, base, data); } @@ -257,7 +265,7 @@ void test_svst2_f64(svbool_t pg, float64_t *base, svfloat64x2_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv16i8( [[TMP0]], [[TMP1]], [[PG:%.*]], ptr [[TMP2]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x2_t data) +void test_svst2_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_s8,,)(pg, base, vnum, data); } @@ -280,7 +288,7 @@ void test_svst2_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x2_t data // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x2_t data) +void test_svst2_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_s16,,)(pg, base, vnum, data); } @@ -303,7 +311,7 @@ void test_svst2_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x2_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x2_t data) +void test_svst2_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_s32,,)(pg, base, vnum, data); } @@ -326,7 +334,7 @@ void test_svst2_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x2_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x2_t data) +void test_svst2_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_s64,,)(pg, base, vnum, data); } @@ -347,7 +355,7 @@ void test_svst2_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x2_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv16i8( [[TMP0]], [[TMP1]], [[PG:%.*]], ptr [[TMP2]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x2_t data) +void test_svst2_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_u8,,)(pg, base, vnum, data); } @@ -370,7 +378,7 @@ void test_svst2_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x2_t da // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x2_t data) +void test_svst2_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_u16,,)(pg, base, vnum, data); } @@ -393,7 +401,7 @@ void test_svst2_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x2_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x2_t data) +void test_svst2_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_u32,,)(pg, base, vnum, data); } @@ -416,7 +424,7 @@ void test_svst2_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x2_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x2_t data) +void test_svst2_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_u64,,)(pg, base, vnum, data); } @@ -439,7 +447,7 @@ void test_svst2_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x2_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv8f16( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x2_t data) +void test_svst2_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_f16,,)(pg, base, vnum, data); } @@ -462,7 +470,7 @@ void test_svst2_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x2 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv4f32( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x2_t data) +void test_svst2_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_f32,,)(pg, base, vnum, data); } @@ -485,7 +493,7 @@ void test_svst2_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x2 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st2.nxv2f64( [[TMP0]], [[TMP1]], [[TMP2]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst2_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64x2_t data) +void test_svst2_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64x2_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst2_vnum,_f64,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3-bfloat.c index fb56b830e615219..9b7db79896e48dd 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -33,7 +41,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8bf16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x3_t data) +void test_svst3_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_bf16,,)(pg, base, data); } @@ -58,7 +66,7 @@ void test_svst3_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8bf16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16x3_t data) +void test_svst3_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_bf16,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3.c index fef8c86822e4d04..23da13f0e057e88 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st3.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -30,7 +38,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_s8(svbool_t pg, int8_t *base, svint8x3_t data) +void test_svst3_s8(svbool_t pg, int8_t *base, svint8x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_s8,,)(pg, base, data); } @@ -53,7 +61,7 @@ void test_svst3_s8(svbool_t pg, int8_t *base, svint8x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_s16(svbool_t pg, int16_t *base, svint16x3_t data) +void test_svst3_s16(svbool_t pg, int16_t *base, svint16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_s16,,)(pg, base, data); } @@ -76,7 +84,7 @@ void test_svst3_s16(svbool_t pg, int16_t *base, svint16x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_s32(svbool_t pg, int32_t *base, svint32x3_t data) +void test_svst3_s32(svbool_t pg, int32_t *base, svint32x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_s32,,)(pg, base, data); } @@ -99,7 +107,7 @@ void test_svst3_s32(svbool_t pg, int32_t *base, svint32x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_s64(svbool_t pg, int64_t *base, svint64x3_t data) +void test_svst3_s64(svbool_t pg, int64_t *base, svint64x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_s64,,)(pg, base, data); } @@ -120,7 +128,7 @@ void test_svst3_s64(svbool_t pg, int64_t *base, svint64x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_u8(svbool_t pg, uint8_t *base, svuint8x3_t data) +void test_svst3_u8(svbool_t pg, uint8_t *base, svuint8x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_u8,,)(pg, base, data); } @@ -143,7 +151,7 @@ void test_svst3_u8(svbool_t pg, uint8_t *base, svuint8x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_u16(svbool_t pg, uint16_t *base, svuint16x3_t data) +void test_svst3_u16(svbool_t pg, uint16_t *base, svuint16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_u16,,)(pg, base, data); } @@ -166,7 +174,7 @@ void test_svst3_u16(svbool_t pg, uint16_t *base, svuint16x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_u32(svbool_t pg, uint32_t *base, svuint32x3_t data) +void test_svst3_u32(svbool_t pg, uint32_t *base, svuint32x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_u32,,)(pg, base, data); } @@ -189,7 +197,7 @@ void test_svst3_u32(svbool_t pg, uint32_t *base, svuint32x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_u64(svbool_t pg, uint64_t *base, svuint64x3_t data) +void test_svst3_u64(svbool_t pg, uint64_t *base, svuint64x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_u64,,)(pg, base, data); } @@ -212,7 +220,7 @@ void test_svst3_u64(svbool_t pg, uint64_t *base, svuint64x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8f16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_f16(svbool_t pg, float16_t *base, svfloat16x3_t data) +void test_svst3_f16(svbool_t pg, float16_t *base, svfloat16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_f16,,)(pg, base, data); } @@ -235,7 +243,7 @@ void test_svst3_f16(svbool_t pg, float16_t *base, svfloat16x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv4f32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_f32(svbool_t pg, float32_t *base, svfloat32x3_t data) +void test_svst3_f32(svbool_t pg, float32_t *base, svfloat32x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_f32,,)(pg, base, data); } @@ -258,7 +266,7 @@ void test_svst3_f32(svbool_t pg, float32_t *base, svfloat32x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv2f64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_f64(svbool_t pg, float64_t *base, svfloat64x3_t data) +void test_svst3_f64(svbool_t pg, float64_t *base, svfloat64x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3,_f64,,)(pg, base, data); } @@ -281,7 +289,7 @@ void test_svst3_f64(svbool_t pg, float64_t *base, svfloat64x3_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[PG:%.*]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x3_t data) +void test_svst3_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_s8,,)(pg, base, vnum, data); } @@ -306,7 +314,7 @@ void test_svst3_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x3_t data // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x3_t data) +void test_svst3_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_s16,,)(pg, base, vnum, data); } @@ -331,7 +339,7 @@ void test_svst3_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x3_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x3_t data) +void test_svst3_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_s32,,)(pg, base, vnum, data); } @@ -356,7 +364,7 @@ void test_svst3_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x3_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x3_t data) +void test_svst3_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_s64,,)(pg, base, vnum, data); } @@ -379,7 +387,7 @@ void test_svst3_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x3_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[PG:%.*]], ptr [[TMP3]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x3_t data) +void test_svst3_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_u8,,)(pg, base, vnum, data); } @@ -404,7 +412,7 @@ void test_svst3_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x3_t da // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x3_t data) +void test_svst3_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_u16,,)(pg, base, vnum, data); } @@ -429,7 +437,7 @@ void test_svst3_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x3_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x3_t data) +void test_svst3_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_u32,,)(pg, base, vnum, data); } @@ -454,7 +462,7 @@ void test_svst3_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x3_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x3_t data) +void test_svst3_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_u64,,)(pg, base, vnum, data); } @@ -479,7 +487,7 @@ void test_svst3_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x3_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv8f16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x3_t data) +void test_svst3_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_f16,,)(pg, base, vnum, data); } @@ -504,7 +512,7 @@ void test_svst3_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x3 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv4f32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x3_t data) +void test_svst3_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_f32,,)(pg, base, vnum, data); } @@ -529,7 +537,7 @@ void test_svst3_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x3 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st3.nxv2f64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst3_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64x3_t data) +void test_svst3_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64x3_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst3_vnum,_f64,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4-bfloat.c index d112624d61b3452..dd032ac0a2bf2f6 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -35,7 +43,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8bf16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x4_t data) +void test_svst4_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_bf16,,)(pg, base, data); } @@ -62,7 +70,7 @@ void test_svst4_bf16(svbool_t pg, bfloat16_t *base, svbfloat16x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8bf16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16x4_t data) +void test_svst4_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_bf16,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4.c index 2d25599fe1758ab..2ed52dff6872965 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st4.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -32,7 +40,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_s8(svbool_t pg, int8_t *base, svint8x4_t data) +void test_svst4_s8(svbool_t pg, int8_t *base, svint8x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_s8,,)(pg, base, data); } @@ -57,7 +65,7 @@ void test_svst4_s8(svbool_t pg, int8_t *base, svint8x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_s16(svbool_t pg, int16_t *base, svint16x4_t data) +void test_svst4_s16(svbool_t pg, int16_t *base, svint16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_s16,,)(pg, base, data); } @@ -82,7 +90,7 @@ void test_svst4_s16(svbool_t pg, int16_t *base, svint16x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_s32(svbool_t pg, int32_t *base, svint32x4_t data) +void test_svst4_s32(svbool_t pg, int32_t *base, svint32x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_s32,,)(pg, base, data); } @@ -107,7 +115,7 @@ void test_svst4_s32(svbool_t pg, int32_t *base, svint32x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_s64(svbool_t pg, int64_t *base, svint64x4_t data) +void test_svst4_s64(svbool_t pg, int64_t *base, svint64x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_s64,,)(pg, base, data); } @@ -130,7 +138,7 @@ void test_svst4_s64(svbool_t pg, int64_t *base, svint64x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_u8(svbool_t pg, uint8_t *base, svuint8x4_t data) +void test_svst4_u8(svbool_t pg, uint8_t *base, svuint8x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_u8,,)(pg, base, data); } @@ -155,7 +163,7 @@ void test_svst4_u8(svbool_t pg, uint8_t *base, svuint8x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_u16(svbool_t pg, uint16_t *base, svuint16x4_t data) +void test_svst4_u16(svbool_t pg, uint16_t *base, svuint16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_u16,,)(pg, base, data); } @@ -180,7 +188,7 @@ void test_svst4_u16(svbool_t pg, uint16_t *base, svuint16x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_u32(svbool_t pg, uint32_t *base, svuint32x4_t data) +void test_svst4_u32(svbool_t pg, uint32_t *base, svuint32x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_u32,,)(pg, base, data); } @@ -205,7 +213,7 @@ void test_svst4_u32(svbool_t pg, uint32_t *base, svuint32x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_u64(svbool_t pg, uint64_t *base, svuint64x4_t data) +void test_svst4_u64(svbool_t pg, uint64_t *base, svuint64x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_u64,,)(pg, base, data); } @@ -230,7 +238,7 @@ void test_svst4_u64(svbool_t pg, uint64_t *base, svuint64x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8f16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_f16(svbool_t pg, float16_t *base, svfloat16x4_t data) +void test_svst4_f16(svbool_t pg, float16_t *base, svfloat16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_f16,,)(pg, base, data); } @@ -255,7 +263,7 @@ void test_svst4_f16(svbool_t pg, float16_t *base, svfloat16x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv4f32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_f32(svbool_t pg, float32_t *base, svfloat32x4_t data) +void test_svst4_f32(svbool_t pg, float32_t *base, svfloat32x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_f32,,)(pg, base, data); } @@ -280,7 +288,7 @@ void test_svst4_f32(svbool_t pg, float32_t *base, svfloat32x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv2f64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_f64(svbool_t pg, float64_t *base, svfloat64x4_t data) +void test_svst4_f64(svbool_t pg, float64_t *base, svfloat64x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4,_f64,,)(pg, base, data); } @@ -305,7 +313,7 @@ void test_svst4_f64(svbool_t pg, float64_t *base, svfloat64x4_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[PG:%.*]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x4_t data) +void test_svst4_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_s8,,)(pg, base, vnum, data); } @@ -332,7 +340,7 @@ void test_svst4_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8x4_t data // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x4_t data) +void test_svst4_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_s16,,)(pg, base, vnum, data); } @@ -359,7 +367,7 @@ void test_svst4_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16x4_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x4_t data) +void test_svst4_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_s32,,)(pg, base, vnum, data); } @@ -386,7 +394,7 @@ void test_svst4_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32x4_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x4_t data) +void test_svst4_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_s64,,)(pg, base, vnum, data); } @@ -411,7 +419,7 @@ void test_svst4_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64x4_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv16i8( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[PG:%.*]], ptr [[TMP4]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x4_t data) +void test_svst4_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_u8,,)(pg, base, vnum, data); } @@ -438,7 +446,7 @@ void test_svst4_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8x4_t da // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8i16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x4_t data) +void test_svst4_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_u16,,)(pg, base, vnum, data); } @@ -465,7 +473,7 @@ void test_svst4_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16x4_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv4i32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x4_t data) +void test_svst4_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_u32,,)(pg, base, vnum, data); } @@ -492,7 +500,7 @@ void test_svst4_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32x4_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv2i64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x4_t data) +void test_svst4_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_u64,,)(pg, base, vnum, data); } @@ -519,7 +527,7 @@ void test_svst4_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64x4_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv8f16( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x4_t data) +void test_svst4_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_f16,,)(pg, base, vnum, data); } @@ -546,7 +554,7 @@ void test_svst4_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16x4 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv4f32( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x4_t data) +void test_svst4_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_f32,,)(pg, base, vnum, data); } @@ -573,7 +581,7 @@ void test_svst4_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32x4 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.st4.nxv2f64( [[TMP0]], [[TMP1]], [[TMP2]], [[TMP3]], [[TMP4]], ptr [[TMP5]]) // CPP-CHECK-NEXT: ret void // -void test_svst4_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64x4_t data) +void test_svst4_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64x4_t data) MODE_ATTR { return SVE_ACLE_FUNC(svst4_vnum,_f64,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1-bfloat.c index 03c0b6cb1f61312..c13f7d82caac0c0 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -27,7 +35,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8bf16( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_bf16(svbool_t pg, bfloat16_t *base, svbfloat16_t data) +void test_svstnt1_bf16(svbool_t pg, bfloat16_t *base, svbfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_bf16,,)(pg, base, data); } @@ -46,7 +54,7 @@ void test_svstnt1_bf16(svbool_t pg, bfloat16_t *base, svbfloat16_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8bf16( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16_t data) +void test_svstnt1_vnum_bf16(svbool_t pg, bfloat16_t *base, int64_t vnum, svbfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_bf16,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1.c index 9749737b0e3f260..5e0869557c8d7ea 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_stnt1.c @@ -5,9 +5,17 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include + +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv16i8( [[DATA:%.*]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_s8(svbool_t pg, int8_t *base, svint8_t data) +void test_svstnt1_s8(svbool_t pg, int8_t *base, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_s8,,)(pg, base, data); } @@ -42,7 +50,7 @@ void test_svstnt1_s8(svbool_t pg, int8_t *base, svint8_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8i16( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_s16(svbool_t pg, int16_t *base, svint16_t data) +void test_svstnt1_s16(svbool_t pg, int16_t *base, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_s16,,)(pg, base, data); } @@ -59,7 +67,7 @@ void test_svstnt1_s16(svbool_t pg, int16_t *base, svint16_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv4i32( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_s32(svbool_t pg, int32_t *base, svint32_t data) +void test_svstnt1_s32(svbool_t pg, int32_t *base, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_s32,,)(pg, base, data); } @@ -76,7 +84,7 @@ void test_svstnt1_s32(svbool_t pg, int32_t *base, svint32_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv2i64( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_s64(svbool_t pg, int64_t *base, svint64_t data) +void test_svstnt1_s64(svbool_t pg, int64_t *base, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_s64,,)(pg, base, data); } @@ -91,7 +99,7 @@ void test_svstnt1_s64(svbool_t pg, int64_t *base, svint64_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv16i8( [[DATA:%.*]], [[PG:%.*]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_u8(svbool_t pg, uint8_t *base, svuint8_t data) +void test_svstnt1_u8(svbool_t pg, uint8_t *base, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_u8,,)(pg, base, data); } @@ -108,7 +116,7 @@ void test_svstnt1_u8(svbool_t pg, uint8_t *base, svuint8_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8i16( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_u16(svbool_t pg, uint16_t *base, svuint16_t data) +void test_svstnt1_u16(svbool_t pg, uint16_t *base, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_u16,,)(pg, base, data); } @@ -125,7 +133,7 @@ void test_svstnt1_u16(svbool_t pg, uint16_t *base, svuint16_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv4i32( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_u32(svbool_t pg, uint32_t *base, svuint32_t data) +void test_svstnt1_u32(svbool_t pg, uint32_t *base, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_u32,,)(pg, base, data); } @@ -142,7 +150,7 @@ void test_svstnt1_u32(svbool_t pg, uint32_t *base, svuint32_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv2i64( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_u64(svbool_t pg, uint64_t *base, svuint64_t data) +void test_svstnt1_u64(svbool_t pg, uint64_t *base, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_u64,,)(pg, base, data); } @@ -159,7 +167,7 @@ void test_svstnt1_u64(svbool_t pg, uint64_t *base, svuint64_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8f16( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_f16(svbool_t pg, float16_t *base, svfloat16_t data) +void test_svstnt1_f16(svbool_t pg, float16_t *base, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_f16,,)(pg, base, data); } @@ -176,7 +184,7 @@ void test_svstnt1_f16(svbool_t pg, float16_t *base, svfloat16_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv4f32( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_f32(svbool_t pg, float32_t *base, svfloat32_t data) +void test_svstnt1_f32(svbool_t pg, float32_t *base, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_f32,,)(pg, base, data); } @@ -193,7 +201,7 @@ void test_svstnt1_f32(svbool_t pg, float32_t *base, svfloat32_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv2f64( [[DATA:%.*]], [[TMP0]], ptr [[BASE:%.*]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_f64(svbool_t pg, float64_t *base, svfloat64_t data) +void test_svstnt1_f64(svbool_t pg, float64_t *base, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1,_f64,,)(pg, base, data); } @@ -210,7 +218,7 @@ void test_svstnt1_f64(svbool_t pg, float64_t *base, svfloat64_t data) // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv16i8( [[DATA:%.*]], [[PG:%.*]], ptr [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8_t data) +void test_svstnt1_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_s8,,)(pg, base, vnum, data); } @@ -229,7 +237,7 @@ void test_svstnt1_vnum_s8(svbool_t pg, int8_t *base, int64_t vnum, svint8_t data // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8i16( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16_t data) +void test_svstnt1_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_s16,,)(pg, base, vnum, data); } @@ -248,7 +256,7 @@ void test_svstnt1_vnum_s16(svbool_t pg, int16_t *base, int64_t vnum, svint16_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv4i32( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32_t data) +void test_svstnt1_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_s32,,)(pg, base, vnum, data); } @@ -267,7 +275,7 @@ void test_svstnt1_vnum_s32(svbool_t pg, int32_t *base, int64_t vnum, svint32_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv2i64( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64_t data) +void test_svstnt1_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_s64,,)(pg, base, vnum, data); } @@ -284,7 +292,7 @@ void test_svstnt1_vnum_s64(svbool_t pg, int64_t *base, int64_t vnum, svint64_t d // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv16i8( [[DATA:%.*]], [[PG:%.*]], ptr [[TMP0]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8_t data) +void test_svstnt1_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_u8,,)(pg, base, vnum, data); } @@ -303,7 +311,7 @@ void test_svstnt1_vnum_u8(svbool_t pg, uint8_t *base, int64_t vnum, svuint8_t da // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8i16( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16_t data) +void test_svstnt1_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_u16,,)(pg, base, vnum, data); } @@ -322,7 +330,7 @@ void test_svstnt1_vnum_u16(svbool_t pg, uint16_t *base, int64_t vnum, svuint16_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv4i32( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32_t data) +void test_svstnt1_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_u32,,)(pg, base, vnum, data); } @@ -341,7 +349,7 @@ void test_svstnt1_vnum_u32(svbool_t pg, uint32_t *base, int64_t vnum, svuint32_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv2i64( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64_t data) +void test_svstnt1_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_u64,,)(pg, base, vnum, data); } @@ -360,7 +368,7 @@ void test_svstnt1_vnum_u64(svbool_t pg, uint64_t *base, int64_t vnum, svuint64_t // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv8f16( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16_t data) +void test_svstnt1_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_f16,,)(pg, base, vnum, data); } @@ -379,7 +387,7 @@ void test_svstnt1_vnum_f16(svbool_t pg, float16_t *base, int64_t vnum, svfloat16 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv4f32( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32_t data) +void test_svstnt1_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_f32,,)(pg, base, vnum, data); } @@ -398,7 +406,7 @@ void test_svstnt1_vnum_f32(svbool_t pg, float32_t *base, int64_t vnum, svfloat32 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.stnt1.nxv2f64( [[DATA:%.*]], [[TMP0]], ptr [[TMP1]]) // CPP-CHECK-NEXT: ret void // -void test_svstnt1_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64_t data) +void test_svstnt1_vnum_f64(svbool_t pg, float64_t *base, int64_t vnum, svfloat64_t data) MODE_ATTR { return SVE_ACLE_FUNC(svstnt1_vnum,_f64,,)(pg, base, vnum, data); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sub.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sub.c index 7f5c8aae031d5a7..383ca5b519e9ddd 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sub.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sub.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svsub_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsub_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svsub_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svsub_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsub_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svsub_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svsub_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsub_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svsub_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svsub_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsub_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svsub_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svsub_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsub_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svsub_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svsub_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsub_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svsub_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svsub_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsub_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svsub_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svsub_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsub_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svsub_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsub_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsub_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svsub_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsub_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsub_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svsub_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsub_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsub_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svsub_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsub_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsub_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svsub_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsub_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsub_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svsub_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsub_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsub_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svsub_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsub_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsub_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svsub_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsub_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsub_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svsub_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsub_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsub_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svsub_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsub_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsub_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svsub_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsub_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsub_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svsub_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsub_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsub_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svsub_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsub_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsub_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svsub_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsub_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsub_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svsub_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsub_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsub_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svsub_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsub_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsub_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svsub_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svsub_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svsub_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svsub_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svsub_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svsub_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svsub_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svsub_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svsub_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svsub_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svsub_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svsub_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svsub_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svsub_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svsub_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svsub_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svsub_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svsub_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svsub_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svsub_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svsub_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svsub_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svsub_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svsub_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svsub_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsub_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svsub_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svsub_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsub_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svsub_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svsub_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsub_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svsub_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svsub_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsub_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svsub_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svsub_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsub_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svsub_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svsub_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsub_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svsub_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svsub_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsub_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svsub_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svsub_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsub_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svsub_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svsub_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsub_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svsub_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svsub_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsub_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svsub_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svsub_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsub_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svsub_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svsub_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsub_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svsub_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svsub_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsub_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svsub_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svsub_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsub_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svsub_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svsub_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsub_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svsub_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svsub_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsub_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svsub_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_u64,_x,)(pg, op1, op2); } @@ -948,7 +956,7 @@ svuint64_t test_svsub_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svsub_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsub_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f16,_z,)(pg, op1, op2); } @@ -967,7 +975,7 @@ svfloat16_t test_svsub_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svsub_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsub_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f32,_z,)(pg, op1, op2); } @@ -986,7 +994,7 @@ svfloat32_t test_svsub_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svsub_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsub_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f64,_z,)(pg, op1, op2); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svsub_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsub_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsub_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f16,_m,)(pg, op1, op2); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svsub_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsub_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsub_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f32,_m,)(pg, op1, op2); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svsub_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsub_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsub_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f64,_m,)(pg, op1, op2); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svsub_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsub_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsub_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f16,_x,)(pg, op1, op2); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svsub_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsub_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsub_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f32,_x,)(pg, op1, op2); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svsub_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsub_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsub_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_f64,_x,)(pg, op1, op2); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svsub_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svsub_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svsub_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f16,_z,)(pg, op1, op2); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svsub_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svsub_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svsub_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f32,_z,)(pg, op1, op2); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svsub_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svsub_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svsub_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f64,_z,)(pg, op1, op2); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svsub_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsub_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svsub_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f16,_m,)(pg, op1, op2); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svsub_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsub_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svsub_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f32,_m,)(pg, op1, op2); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svsub_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsub_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svsub_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f64,_m,)(pg, op1, op2); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svsub_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsub_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svsub_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f16,_x,)(pg, op1, op2); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svsub_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsub_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svsub_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f32,_x,)(pg, op1, op2); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svsub_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsub_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svsub_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsub,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_subr.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_subr.c index d34108c323bde6c..f7d576b041b7f5f 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_subr.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_subr.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -26,7 +34,7 @@ // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svsubr_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsubr_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s8,_z,)(pg, op1, op2); } @@ -45,7 +53,7 @@ svint8_t test_svsubr_s8_z(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svsubr_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsubr_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s16,_z,)(pg, op1, op2); } @@ -64,7 +72,7 @@ svint16_t test_svsubr_s16_z(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svsubr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsubr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s32,_z,)(pg, op1, op2); } @@ -83,7 +91,7 @@ svint32_t test_svsubr_s32_z(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svsubr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsubr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s64,_z,)(pg, op1, op2); } @@ -100,7 +108,7 @@ svint64_t test_svsubr_s64_z(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG]], [[TMP0]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svsubr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsubr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u8,_z,)(pg, op1, op2); } @@ -119,7 +127,7 @@ svuint8_t test_svsubr_u8_z(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svsubr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsubr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u16,_z,)(pg, op1, op2); } @@ -138,7 +146,7 @@ svuint16_t test_svsubr_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svsubr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsubr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u32,_z,)(pg, op1, op2); } @@ -157,7 +165,7 @@ svuint32_t test_svsubr_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svsubr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsubr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u64,_z,)(pg, op1, op2); } @@ -172,7 +180,7 @@ svuint64_t test_svsubr_u64_z(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsubr_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsubr_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s8,_m,)(pg, op1, op2); } @@ -189,7 +197,7 @@ svint8_t test_svsubr_s8_m(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsubr_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsubr_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s16,_m,)(pg, op1, op2); } @@ -206,7 +214,7 @@ svint16_t test_svsubr_s16_m(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsubr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsubr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s32,_m,)(pg, op1, op2); } @@ -223,7 +231,7 @@ svint32_t test_svsubr_s32_m(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsubr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsubr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s64,_m,)(pg, op1, op2); } @@ -238,7 +246,7 @@ svint64_t test_svsubr_s64_m(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsubr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsubr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u8,_m,)(pg, op1, op2); } @@ -255,7 +263,7 @@ svuint8_t test_svsubr_u8_m(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsubr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsubr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u16,_m,)(pg, op1, op2); } @@ -272,7 +280,7 @@ svuint16_t test_svsubr_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsubr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsubr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u32,_m,)(pg, op1, op2); } @@ -289,7 +297,7 @@ svuint32_t test_svsubr_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsubr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsubr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u64,_m,)(pg, op1, op2); } @@ -304,7 +312,7 @@ svuint64_t test_svsubr_u64_m(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsubr_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) +svint8_t test_svsubr_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s8,_x,)(pg, op1, op2); } @@ -321,7 +329,7 @@ svint8_t test_svsubr_s8_x(svbool_t pg, svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsubr_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) +svint16_t test_svsubr_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s16,_x,)(pg, op1, op2); } @@ -338,7 +346,7 @@ svint16_t test_svsubr_s16_x(svbool_t pg, svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsubr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) +svint32_t test_svsubr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s32,_x,)(pg, op1, op2); } @@ -355,7 +363,7 @@ svint32_t test_svsubr_s32_x(svbool_t pg, svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsubr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) +svint64_t test_svsubr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_s64,_x,)(pg, op1, op2); } @@ -370,7 +378,7 @@ svint64_t test_svsubr_s64_x(svbool_t pg, svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsubr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) +svuint8_t test_svsubr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u8,_x,)(pg, op1, op2); } @@ -387,7 +395,7 @@ svuint8_t test_svsubr_u8_x(svbool_t pg, svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsubr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) +svuint16_t test_svsubr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u16,_x,)(pg, op1, op2); } @@ -404,7 +412,7 @@ svuint16_t test_svsubr_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsubr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) +svuint32_t test_svsubr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u32,_x,)(pg, op1, op2); } @@ -421,7 +429,7 @@ svuint32_t test_svsubr_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsubr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) +svuint64_t test_svsubr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_u64,_x,)(pg, op1, op2); } @@ -442,7 +450,7 @@ svuint64_t test_svsubr_u64_x(svbool_t pg, svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint8_t test_svsubr_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svsubr_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s8,_z,)(pg, op1, op2); } @@ -465,7 +473,7 @@ svint8_t test_svsubr_n_s8_z(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint16_t test_svsubr_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svsubr_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s16,_z,)(pg, op1, op2); } @@ -488,7 +496,7 @@ svint16_t test_svsubr_n_s16_z(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint32_t test_svsubr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svsubr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s32,_z,)(pg, op1, op2); } @@ -511,7 +519,7 @@ svint32_t test_svsubr_n_s32_z(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svint64_t test_svsubr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svsubr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s64,_z,)(pg, op1, op2); } @@ -532,7 +540,7 @@ svint64_t test_svsubr_n_s64_z(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG]], [[TMP0]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint8_t test_svsubr_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svsubr_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u8,_z,)(pg, op1, op2); } @@ -555,7 +563,7 @@ svuint8_t test_svsubr_n_u8_z(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint16_t test_svsubr_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svsubr_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u16,_z,)(pg, op1, op2); } @@ -578,7 +586,7 @@ svuint16_t test_svsubr_n_u16_z(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint32_t test_svsubr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svsubr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u32,_z,)(pg, op1, op2); } @@ -601,7 +609,7 @@ svuint32_t test_svsubr_n_u32_z(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svuint64_t test_svsubr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svsubr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u64,_z,)(pg, op1, op2); } @@ -620,7 +628,7 @@ svuint64_t test_svsubr_n_u64_z(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsubr_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svsubr_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s8,_m,)(pg, op1, op2); } @@ -641,7 +649,7 @@ svint8_t test_svsubr_n_s8_m(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsubr_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svsubr_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s16,_m,)(pg, op1, op2); } @@ -662,7 +670,7 @@ svint16_t test_svsubr_n_s16_m(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsubr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svsubr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s32,_m,)(pg, op1, op2); } @@ -683,7 +691,7 @@ svint32_t test_svsubr_n_s32_m(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsubr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svsubr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s64,_m,)(pg, op1, op2); } @@ -702,7 +710,7 @@ svint64_t test_svsubr_n_s64_m(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.subr.nxv16i8( [[PG:%.*]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsubr_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svsubr_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u8,_m,)(pg, op1, op2); } @@ -723,7 +731,7 @@ svuint8_t test_svsubr_n_u8_m(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv8i16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsubr_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svsubr_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u16,_m,)(pg, op1, op2); } @@ -744,7 +752,7 @@ svuint16_t test_svsubr_n_u16_m(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv4i32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsubr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svsubr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u32,_m,)(pg, op1, op2); } @@ -765,7 +773,7 @@ svuint32_t test_svsubr_n_u32_m(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.subr.nxv2i64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsubr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svsubr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u64,_m,)(pg, op1, op2); } @@ -784,7 +792,7 @@ svuint64_t test_svsubr_n_u64_m(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svsubr_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) +svint8_t test_svsubr_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s8,_x,)(pg, op1, op2); } @@ -805,7 +813,7 @@ svint8_t test_svsubr_n_s8_x(svbool_t pg, svint8_t op1, int8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint16_t test_svsubr_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) +svint16_t test_svsubr_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s16,_x,)(pg, op1, op2); } @@ -826,7 +834,7 @@ svint16_t test_svsubr_n_s16_x(svbool_t pg, svint16_t op1, int16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint32_t test_svsubr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) +svint32_t test_svsubr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s32,_x,)(pg, op1, op2); } @@ -847,7 +855,7 @@ svint32_t test_svsubr_n_s32_x(svbool_t pg, svint32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svint64_t test_svsubr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) +svint64_t test_svsubr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_s64,_x,)(pg, op1, op2); } @@ -866,7 +874,7 @@ svint64_t test_svsubr_n_s64_x(svbool_t pg, svint64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv16i8( [[PG:%.*]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svsubr_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) +svuint8_t test_svsubr_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u8,_x,)(pg, op1, op2); } @@ -887,7 +895,7 @@ svuint8_t test_svsubr_n_u8_x(svbool_t pg, svuint8_t op1, uint8_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv8i16( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint16_t test_svsubr_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) +svuint16_t test_svsubr_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u16,_x,)(pg, op1, op2); } @@ -908,7 +916,7 @@ svuint16_t test_svsubr_n_u16_x(svbool_t pg, svuint16_t op1, uint16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv4i32( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint32_t test_svsubr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) +svuint32_t test_svsubr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u32,_x,)(pg, op1, op2); } @@ -929,7 +937,7 @@ svuint32_t test_svsubr_n_u32_x(svbool_t pg, svuint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.sub.u.nxv2i64( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svuint64_t test_svsubr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) +svuint64_t test_svsubr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_u64,_x,)(pg, op1, op2); } @@ -948,7 +956,7 @@ svuint64_t test_svsubr_n_u64_x(svbool_t pg, svuint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv8f16( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svsubr_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsubr_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f16,_z,)(pg, op1, op2); } @@ -967,7 +975,7 @@ svfloat16_t test_svsubr_f16_z(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv4f32( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svsubr_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsubr_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f32,_z,)(pg, op1, op2); } @@ -986,7 +994,7 @@ svfloat32_t test_svsubr_f32_z(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv2f64( [[TMP0]], [[TMP1]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svsubr_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsubr_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f64,_z,)(pg, op1, op2); } @@ -1003,7 +1011,7 @@ svfloat64_t test_svsubr_f64_z(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv8f16( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsubr_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsubr_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f16,_m,)(pg, op1, op2); } @@ -1020,7 +1028,7 @@ svfloat16_t test_svsubr_f16_m(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv4f32( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsubr_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsubr_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f32,_m,)(pg, op1, op2); } @@ -1037,7 +1045,7 @@ svfloat32_t test_svsubr_f32_m(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv2f64( [[TMP0]], [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsubr_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsubr_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f64,_m,)(pg, op1, op2); } @@ -1054,7 +1062,7 @@ svfloat64_t test_svsubr_f64_m(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv8f16( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsubr_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svsubr_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f16,_x,)(pg, op1, op2); } @@ -1071,7 +1079,7 @@ svfloat16_t test_svsubr_f16_x(svbool_t pg, svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv4f32( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsubr_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svsubr_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f32,_x,)(pg, op1, op2); } @@ -1088,7 +1096,7 @@ svfloat32_t test_svsubr_f32_x(svbool_t pg, svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv2f64( [[TMP0]], [[OP2:%.*]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsubr_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svsubr_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_f64,_x,)(pg, op1, op2); } @@ -1111,7 +1119,7 @@ svfloat64_t test_svsubr_f64_x(svbool_t pg, svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat16_t test_svsubr_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svsubr_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f16,_z,)(pg, op1, op2); } @@ -1134,7 +1142,7 @@ svfloat16_t test_svsubr_n_f16_z(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat32_t test_svsubr_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svsubr_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f32,_z,)(pg, op1, op2); } @@ -1157,7 +1165,7 @@ svfloat32_t test_svsubr_n_f32_z(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP2]] // -svfloat64_t test_svsubr_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svsubr_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f64,_z,)(pg, op1, op2); } @@ -1178,7 +1186,7 @@ svfloat64_t test_svsubr_n_f64_z(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv8f16( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsubr_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svsubr_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f16,_m,)(pg, op1, op2); } @@ -1199,7 +1207,7 @@ svfloat16_t test_svsubr_n_f16_m(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv4f32( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsubr_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svsubr_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f32,_m,)(pg, op1, op2); } @@ -1220,7 +1228,7 @@ svfloat32_t test_svsubr_n_f32_m(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsubr.nxv2f64( [[TMP0]], [[OP1:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsubr_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svsubr_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f64,_m,)(pg, op1, op2); } @@ -1241,7 +1249,7 @@ svfloat64_t test_svsubr_n_f64_m(svbool_t pg, svfloat64_t op1, float64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv8f16( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat16_t test_svsubr_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) +svfloat16_t test_svsubr_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f16,_x,)(pg, op1, op2); } @@ -1262,7 +1270,7 @@ svfloat16_t test_svsubr_n_f16_x(svbool_t pg, svfloat16_t op1, float16_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv4f32( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat32_t test_svsubr_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) +svfloat32_t test_svsubr_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f32,_x,)(pg, op1, op2); } @@ -1283,7 +1291,7 @@ svfloat32_t test_svsubr_n_f32_x(svbool_t pg, svfloat32_t op1, float32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.fsub.u.nxv2f64( [[TMP0]], [[DOTSPLAT]], [[OP1:%.*]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svfloat64_t test_svsubr_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) +svfloat64_t test_svsubr_n_f64_x(svbool_t pg, svfloat64_t op1, float64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svsubr,_n_f64,_x,)(pg, op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sudot.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sudot.c index 4066c71c9ec3266..b21a72024fd9f23 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sudot.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sudot.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target - // RUN: %clang_cc1 -target-feature +i8mm -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -target-feature +i8mm -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -target-feature +i8mm -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -target-feature +i8mm -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +i8mm -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +i8mm -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.nxv4i32( [[X:%.*]], [[Z:%.*]], [[Y:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svsudot_s32(svint32_t x, svint8_t y, svuint8_t z) { +svint32_t test_svsudot_s32(svint32_t x, svint8_t y, svuint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svsudot, _s32, , )(x, y, z); } @@ -43,7 +51,7 @@ svint32_t test_svsudot_s32(svint32_t x, svint8_t y, svuint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.nxv4i32( [[X:%.*]], [[DOTSPLAT]], [[Y:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svsudot_n_s32(svint32_t x, svint8_t y, uint8_t z) { +svint32_t test_svsudot_n_s32(svint32_t x, svint8_t y, uint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svsudot, _n_s32, , )(x, y, z); } @@ -57,7 +65,7 @@ svint32_t test_svsudot_n_s32(svint32_t x, svint8_t y, uint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sudot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svsudot_lane_s32_0(svint32_t x, svint8_t y, svuint8_t z) { +svint32_t test_svsudot_lane_s32_0(svint32_t x, svint8_t y, svuint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svsudot_lane, _s32, , )(x, y, z, 0); } @@ -71,7 +79,7 @@ svint32_t test_svsudot_lane_s32_0(svint32_t x, svint8_t y, svuint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sudot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svsudot_lane_s32_1(svint32_t x, svint8_t y, svuint8_t z) { +svint32_t test_svsudot_lane_s32_1(svint32_t x, svint8_t y, svuint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svsudot_lane, _s32, , )(x, y, z, 1); } @@ -85,7 +93,7 @@ svint32_t test_svsudot_lane_s32_1(svint32_t x, svint8_t y, svuint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sudot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 2) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svsudot_lane_s32_2(svint32_t x, svint8_t y, svuint8_t z) { +svint32_t test_svsudot_lane_s32_2(svint32_t x, svint8_t y, svuint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svsudot_lane, _s32, , )(x, y, z, 2); } @@ -99,6 +107,6 @@ svint32_t test_svsudot_lane_s32_2(svint32_t x, svint8_t y, svuint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sudot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svsudot_lane_s32_3(svint32_t x, svint8_t y, svuint8_t z) { +svint32_t test_svsudot_lane_s32_3(svint32_t x, svint8_t y, svuint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svsudot_lane, _s32, , )(x, y, z, 3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl-bfloat.c index 4e1f7cb709eefd9..d4b6b6842fb9a89 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl-bfloat.c @@ -6,8 +6,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8bf16( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svtbl_bf16(svbfloat16_t data, svuint16_t indices) { +svbfloat16_t test_svtbl_bf16(svbfloat16_t data, svuint16_t indices) MODE_ATTR { // expected-warning@+1 {{implicit declaration of function 'svtbl_bf16'}} return SVE_ACLE_FUNC(svtbl, _bf16, , )(data, indices); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl.c index e8daca4c600d5a8..89fa47b5f7974a4 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_tbl.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv16i8( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svtbl_s8(svint8_t data, svuint8_t indices) +svint8_t test_svtbl_s8(svint8_t data, svuint8_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_s8,,)(data, indices); } @@ -39,7 +47,7 @@ svint8_t test_svtbl_s8(svint8_t data, svuint8_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8i16( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svtbl_s16(svint16_t data, svuint16_t indices) +svint16_t test_svtbl_s16(svint16_t data, svuint16_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_s16,,)(data, indices); } @@ -54,7 +62,7 @@ svint16_t test_svtbl_s16(svint16_t data, svuint16_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv4i32( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svtbl_s32(svint32_t data, svuint32_t indices) +svint32_t test_svtbl_s32(svint32_t data, svuint32_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_s32,,)(data, indices); } @@ -69,7 +77,7 @@ svint32_t test_svtbl_s32(svint32_t data, svuint32_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv2i64( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svtbl_s64(svint64_t data, svuint64_t indices) +svint64_t test_svtbl_s64(svint64_t data, svuint64_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_s64,,)(data, indices); } @@ -84,7 +92,7 @@ svint64_t test_svtbl_s64(svint64_t data, svuint64_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv16i8( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svtbl_u8(svuint8_t data, svuint8_t indices) +svuint8_t test_svtbl_u8(svuint8_t data, svuint8_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_u8,,)(data, indices); } @@ -99,7 +107,7 @@ svuint8_t test_svtbl_u8(svuint8_t data, svuint8_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8i16( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svtbl_u16(svuint16_t data, svuint16_t indices) +svuint16_t test_svtbl_u16(svuint16_t data, svuint16_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_u16,,)(data, indices); } @@ -114,7 +122,7 @@ svuint16_t test_svtbl_u16(svuint16_t data, svuint16_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv4i32( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svtbl_u32(svuint32_t data, svuint32_t indices) +svuint32_t test_svtbl_u32(svuint32_t data, svuint32_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_u32,,)(data, indices); } @@ -129,7 +137,7 @@ svuint32_t test_svtbl_u32(svuint32_t data, svuint32_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv2i64( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svtbl_u64(svuint64_t data, svuint64_t indices) +svuint64_t test_svtbl_u64(svuint64_t data, svuint64_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_u64,,)(data, indices); } @@ -144,7 +152,7 @@ svuint64_t test_svtbl_u64(svuint64_t data, svuint64_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv8f16( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svtbl_f16(svfloat16_t data, svuint16_t indices) +svfloat16_t test_svtbl_f16(svfloat16_t data, svuint16_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_f16,,)(data, indices); } @@ -159,7 +167,7 @@ svfloat16_t test_svtbl_f16(svfloat16_t data, svuint16_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv4f32( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svtbl_f32(svfloat32_t data, svuint32_t indices) +svfloat32_t test_svtbl_f32(svfloat32_t data, svuint32_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_f32,,)(data, indices); } @@ -174,7 +182,7 @@ svfloat32_t test_svtbl_f32(svfloat32_t data, svuint32_t indices) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.tbl.nxv2f64( [[DATA:%.*]], [[INDICES:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svtbl_f64(svfloat64_t data, svuint64_t indices) +svfloat64_t test_svtbl_f64(svfloat64_t data, svuint64_t indices) MODE_ATTR { return SVE_ACLE_FUNC(svtbl,_f64,,)(data, indices); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1-bfloat.c index 6fce83b6c046716..a6c6dcc571e28ea 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv8bf16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svtrn1_bf16(svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svtrn1_bf16(svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_bf16,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1.c index 70f97236bab8056..f6d8ff770c600ba 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn1.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svtrn1_s8(svint8_t op1, svint8_t op2) +svint8_t test_svtrn1_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svtrn1_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svtrn1_s16(svint16_t op1, svint16_t op2) +svint16_t test_svtrn1_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svtrn1_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svtrn1_s32(svint32_t op1, svint32_t op2) +svint32_t test_svtrn1_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svtrn1_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svtrn1_s64(svint64_t op1, svint64_t op2) +svint64_t test_svtrn1_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svtrn1_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svtrn1_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svtrn1_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svtrn1_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svtrn1_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svtrn1_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svtrn1_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svtrn1_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svtrn1_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svtrn1_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svtrn1_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svtrn1_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_u64,,)(op1, op2); } @@ -144,7 +152,7 @@ svuint64_t test_svtrn1_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svtrn1_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svtrn1_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_f16,,)(op1, op2); } @@ -159,7 +167,7 @@ svfloat16_t test_svtrn1_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svtrn1_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svtrn1_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_f32,,)(op1, op2); } @@ -174,7 +182,7 @@ svfloat32_t test_svtrn1_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svtrn1_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svtrn1_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn1,_f64,,)(op1, op2); } @@ -189,7 +197,7 @@ svfloat64_t test_svtrn1_f64(svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.nxv16i1( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn1_b8(svbool_t op1, svbool_t op2) +svbool_t test_svtrn1_b8(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn1_b8(op1, op2); } @@ -204,7 +212,7 @@ svbool_t test_svtrn1_b8(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.b16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn1_b16(svbool_t op1, svbool_t op2) +svbool_t test_svtrn1_b16(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn1_b16(op1, op2); } @@ -219,7 +227,7 @@ svbool_t test_svtrn1_b16(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.b32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn1_b32(svbool_t op1, svbool_t op2) +svbool_t test_svtrn1_b32(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn1_b32(op1, op2); } @@ -234,7 +242,7 @@ svbool_t test_svtrn1_b32(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn1.b64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn1_b64(svbool_t op1, svbool_t op2) +svbool_t test_svtrn1_b64(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn1_b64(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2-bfloat.c index fb07f3c911b1fd2..87063ac69dfacbc 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv8bf16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svtrn2_bf16(svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svtrn2_bf16(svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_bf16,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2.c index 0bf72c9198206ac..9442142bc097f85 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_trn2.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svtrn2_s8(svint8_t op1, svint8_t op2) +svint8_t test_svtrn2_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svtrn2_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svtrn2_s16(svint16_t op1, svint16_t op2) +svint16_t test_svtrn2_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svtrn2_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svtrn2_s32(svint32_t op1, svint32_t op2) +svint32_t test_svtrn2_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svtrn2_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svtrn2_s64(svint64_t op1, svint64_t op2) +svint64_t test_svtrn2_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svtrn2_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svtrn2_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svtrn2_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svtrn2_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svtrn2_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svtrn2_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svtrn2_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svtrn2_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svtrn2_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svtrn2_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svtrn2_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svtrn2_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_u64,,)(op1, op2); } @@ -144,7 +152,7 @@ svuint64_t test_svtrn2_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svtrn2_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svtrn2_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_f16,,)(op1, op2); } @@ -159,7 +167,7 @@ svfloat16_t test_svtrn2_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svtrn2_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svtrn2_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_f32,,)(op1, op2); } @@ -174,7 +182,7 @@ svfloat32_t test_svtrn2_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svtrn2_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svtrn2_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svtrn2,_f64,,)(op1, op2); } @@ -189,7 +197,7 @@ svfloat64_t test_svtrn2_f64(svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.nxv16i1( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn2_b8(svbool_t op1, svbool_t op2) +svbool_t test_svtrn2_b8(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn2_b8(op1, op2); } @@ -204,7 +212,7 @@ svbool_t test_svtrn2_b8(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.b16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn2_b16(svbool_t op1, svbool_t op2) +svbool_t test_svtrn2_b16(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn2_b16(op1, op2); } @@ -219,7 +227,7 @@ svbool_t test_svtrn2_b16(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.b32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn2_b32(svbool_t op1, svbool_t op2) +svbool_t test_svtrn2_b32(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn2_b32(op1, op2); } @@ -234,7 +242,7 @@ svbool_t test_svtrn2_b32(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.trn2.b64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svtrn2_b64(svbool_t op1, svbool_t op2) +svbool_t test_svtrn2_b64(svbool_t op1, svbool_t op2) MODE_ATTR { return svtrn2_b64(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef-bfloat.c index 4a2f512c95ee988..b15028c4b2629a1 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef-bfloat.c @@ -1,11 +1,19 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + // CHECK-LABEL: @test_svundef_bf16( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -14,7 +22,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svbfloat16_t test_svundef_bf16() +svbfloat16_t test_svundef_bf16(void) MODE_ATTR { return svundef_bf16(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef.c index d9eea5ab0413301..7daeb7489e5c473 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef.c @@ -3,8 +3,16 @@ // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + // CHECK-LABEL: @test_svundef_s8( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -13,7 +21,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint8_t test_svundef_s8() +svint8_t test_svundef_s8(void) MODE_ATTR { return svundef_s8(); } @@ -26,7 +34,7 @@ svint8_t test_svundef_s8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint16_t test_svundef_s16() +svint16_t test_svundef_s16(void) MODE_ATTR { return svundef_s16(); } @@ -39,7 +47,7 @@ svint16_t test_svundef_s16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint32_t test_svundef_s32() +svint32_t test_svundef_s32(void) MODE_ATTR { return svundef_s32(); } @@ -52,7 +60,7 @@ svint32_t test_svundef_s32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint64_t test_svundef_s64() +svint64_t test_svundef_s64(void) MODE_ATTR { return svundef_s64(); } @@ -65,7 +73,7 @@ svint64_t test_svundef_s64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint8_t test_svundef_u8() +svuint8_t test_svundef_u8(void) MODE_ATTR { return svundef_u8(); } @@ -78,7 +86,7 @@ svuint8_t test_svundef_u8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint16_t test_svundef_u16() +svuint16_t test_svundef_u16(void) MODE_ATTR { return svundef_u16(); } @@ -91,7 +99,7 @@ svuint16_t test_svundef_u16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint32_t test_svundef_u32() +svuint32_t test_svundef_u32(void) MODE_ATTR { return svundef_u32(); } @@ -104,7 +112,7 @@ svuint32_t test_svundef_u32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint64_t test_svundef_u64() +svuint64_t test_svundef_u64(void) MODE_ATTR { return svundef_u64(); } @@ -117,7 +125,7 @@ svuint64_t test_svundef_u64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat16_t test_svundef_f16() +svfloat16_t test_svundef_f16(void) MODE_ATTR { return svundef_f16(); } @@ -130,7 +138,7 @@ svfloat16_t test_svundef_f16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat32_t test_svundef_f32() +svfloat32_t test_svundef_f32(void) MODE_ATTR { return svundef_f32(); } @@ -143,7 +151,7 @@ svfloat32_t test_svundef_f32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat64_t test_svundef_f64() +svfloat64_t test_svundef_f64(void) MODE_ATTR { return svundef_f64(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2-bfloat.c index 98ae82dc4909aaf..dcaded8967fd0a2 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2-bfloat.c @@ -1,11 +1,19 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + // CHECK-LABEL: @test_svundef2_bf16( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -14,7 +22,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svbfloat16x2_t test_svundef2_bf16() +svbfloat16x2_t test_svundef2_bf16(void) MODE_ATTR { return svundef2_bf16(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2.c index 5f9471d42b5d0af..677e338879c0003 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef2.c @@ -1,11 +1,19 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + // CHECK-LABEL: @test_svundef2_s8( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -14,7 +22,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint8x2_t test_svundef2_s8() +svint8x2_t test_svundef2_s8(void) MODE_ATTR { return svundef2_s8(); } @@ -27,7 +35,7 @@ svint8x2_t test_svundef2_s8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint16x2_t test_svundef2_s16() +svint16x2_t test_svundef2_s16(void) MODE_ATTR { return svundef2_s16(); } @@ -40,7 +48,7 @@ svint16x2_t test_svundef2_s16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint32x2_t test_svundef2_s32() +svint32x2_t test_svundef2_s32(void) MODE_ATTR { return svundef2_s32(); } @@ -53,7 +61,7 @@ svint32x2_t test_svundef2_s32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint64x2_t test_svundef2_s64() +svint64x2_t test_svundef2_s64(void) MODE_ATTR { return svundef2_s64(); } @@ -66,7 +74,7 @@ svint64x2_t test_svundef2_s64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint8x2_t test_svundef2_u8() +svuint8x2_t test_svundef2_u8(void) MODE_ATTR { return svundef2_u8(); } @@ -79,7 +87,7 @@ svuint8x2_t test_svundef2_u8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint16x2_t test_svundef2_u16() +svuint16x2_t test_svundef2_u16(void) MODE_ATTR { return svundef2_u16(); } @@ -92,7 +100,7 @@ svuint16x2_t test_svundef2_u16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint32x2_t test_svundef2_u32() +svuint32x2_t test_svundef2_u32(void) MODE_ATTR { return svundef2_u32(); } @@ -105,7 +113,7 @@ svuint32x2_t test_svundef2_u32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint64x2_t test_svundef2_u64() +svuint64x2_t test_svundef2_u64(void) MODE_ATTR { return svundef2_u64(); } @@ -118,7 +126,7 @@ svuint64x2_t test_svundef2_u64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat16x2_t test_svundef2_f16() +svfloat16x2_t test_svundef2_f16(void) MODE_ATTR { return svundef2_f16(); } @@ -131,7 +139,7 @@ svfloat16x2_t test_svundef2_f16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat32x2_t test_svundef2_f32() +svfloat32x2_t test_svundef2_f32(void) MODE_ATTR { return svundef2_f32(); } @@ -144,7 +152,7 @@ svfloat32x2_t test_svundef2_f32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat64x2_t test_svundef2_f64() +svfloat64x2_t test_svundef2_f64(void) MODE_ATTR { return svundef2_f64(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3-bfloat.c index cc02e9a3c76d0b6..223340095addd02 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3-bfloat.c @@ -1,11 +1,19 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + // CHECK-LABEL: @test_svundef3_bf16( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -14,7 +22,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svbfloat16x3_t test_svundef3_bf16() +svbfloat16x3_t test_svundef3_bf16(void) MODE_ATTR { return svundef3_bf16(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3.c index e4b3a5e6860a9f3..7104f21b759147b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef3.c @@ -1,11 +1,19 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + // CHECK-LABEL: @test_svundef3_s8( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -14,7 +22,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint8x3_t test_svundef3_s8() +svint8x3_t test_svundef3_s8(void) MODE_ATTR { return svundef3_s8(); } @@ -27,7 +35,7 @@ svint8x3_t test_svundef3_s8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint16x3_t test_svundef3_s16() +svint16x3_t test_svundef3_s16(void) MODE_ATTR { return svundef3_s16(); } @@ -40,7 +48,7 @@ svint16x3_t test_svundef3_s16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint32x3_t test_svundef3_s32() +svint32x3_t test_svundef3_s32(void) MODE_ATTR { return svundef3_s32(); } @@ -53,7 +61,7 @@ svint32x3_t test_svundef3_s32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint64x3_t test_svundef3_s64() +svint64x3_t test_svundef3_s64(void) MODE_ATTR { return svundef3_s64(); } @@ -66,7 +74,7 @@ svint64x3_t test_svundef3_s64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint8x3_t test_svundef3_u8() +svuint8x3_t test_svundef3_u8(void) MODE_ATTR { return svundef3_u8(); } @@ -79,7 +87,7 @@ svuint8x3_t test_svundef3_u8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint16x3_t test_svundef3_u16() +svuint16x3_t test_svundef3_u16(void) MODE_ATTR { return svundef3_u16(); } @@ -92,7 +100,7 @@ svuint16x3_t test_svundef3_u16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint32x3_t test_svundef3_u32() +svuint32x3_t test_svundef3_u32(void) MODE_ATTR { return svundef3_u32(); } @@ -105,7 +113,7 @@ svuint32x3_t test_svundef3_u32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint64x3_t test_svundef3_u64() +svuint64x3_t test_svundef3_u64(void) MODE_ATTR { return svundef3_u64(); } @@ -118,7 +126,7 @@ svuint64x3_t test_svundef3_u64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat16x3_t test_svundef3_f16() +svfloat16x3_t test_svundef3_f16(void) MODE_ATTR { return svundef3_f16(); } @@ -131,7 +139,7 @@ svfloat16x3_t test_svundef3_f16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat32x3_t test_svundef3_f32() +svfloat32x3_t test_svundef3_f32(void) MODE_ATTR { return svundef3_f32(); } @@ -144,7 +152,7 @@ svfloat32x3_t test_svundef3_f32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat64x3_t test_svundef3_f64() +svfloat64x3_t test_svundef3_f64(void) MODE_ATTR { return svundef3_f64(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4-bfloat.c index 0c7130af9ba6a0c..d58e47d5107529b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4-bfloat.c @@ -1,11 +1,19 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + // CHECK-LABEL: @test_svundef4_bf16( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -14,7 +22,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svbfloat16x4_t test_svundef4_bf16() +svbfloat16x4_t test_svundef4_bf16(void) MODE_ATTR { return svundef4_bf16(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4.c index a574f8454144fcb..fd736ac0615aa8b 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_undef4.c @@ -1,11 +1,19 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + // CHECK-LABEL: @test_svundef4_s8( // CHECK-NEXT: entry: // CHECK-NEXT: ret undef @@ -14,7 +22,7 @@ // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint8x4_t test_svundef4_s8() +svint8x4_t test_svundef4_s8(void) MODE_ATTR { return svundef4_s8(); } @@ -27,7 +35,7 @@ svint8x4_t test_svundef4_s8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint16x4_t test_svundef4_s16() +svint16x4_t test_svundef4_s16(void) MODE_ATTR { return svundef4_s16(); } @@ -40,7 +48,7 @@ svint16x4_t test_svundef4_s16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint32x4_t test_svundef4_s32() +svint32x4_t test_svundef4_s32(void) MODE_ATTR { return svundef4_s32(); } @@ -53,7 +61,7 @@ svint32x4_t test_svundef4_s32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svint64x4_t test_svundef4_s64() +svint64x4_t test_svundef4_s64(void) MODE_ATTR { return svundef4_s64(); } @@ -66,7 +74,7 @@ svint64x4_t test_svundef4_s64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint8x4_t test_svundef4_u8() +svuint8x4_t test_svundef4_u8(void) MODE_ATTR { return svundef4_u8(); } @@ -79,7 +87,7 @@ svuint8x4_t test_svundef4_u8() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint16x4_t test_svundef4_u16() +svuint16x4_t test_svundef4_u16(void) MODE_ATTR { return svundef4_u16(); } @@ -92,7 +100,7 @@ svuint16x4_t test_svundef4_u16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint32x4_t test_svundef4_u32() +svuint32x4_t test_svundef4_u32(void) MODE_ATTR { return svundef4_u32(); } @@ -105,7 +113,7 @@ svuint32x4_t test_svundef4_u32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svuint64x4_t test_svundef4_u64() +svuint64x4_t test_svundef4_u64(void) MODE_ATTR { return svundef4_u64(); } @@ -118,7 +126,7 @@ svuint64x4_t test_svundef4_u64() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat16x4_t test_svundef4_f16() +svfloat16x4_t test_svundef4_f16(void) MODE_ATTR { return svundef4_f16(); } @@ -131,7 +139,7 @@ svfloat16x4_t test_svundef4_f16() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat32x4_t test_svundef4_f32() +svfloat32x4_t test_svundef4_f32(void) MODE_ATTR { return svundef4_f32(); } @@ -144,7 +152,7 @@ svfloat32x4_t test_svundef4_f32() // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: ret undef // -svfloat64x4_t test_svundef4_f64() +svfloat64x4_t test_svundef4_f64(void) MODE_ATTR { return svundef4_f64(); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_unpklo.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_unpklo.c index aaadcb69f2739ed..90b153a3926a367 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_unpklo.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_unpklo.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sunpklo.nxv8i16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svunpklo_s16(svint8_t op) +svint16_t test_svunpklo_s16(svint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svunpklo,_s16,,)(op); } @@ -39,7 +47,7 @@ svint16_t test_svunpklo_s16(svint8_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sunpklo.nxv4i32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svunpklo_s32(svint16_t op) +svint32_t test_svunpklo_s32(svint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svunpklo,_s32,,)(op); } @@ -54,7 +62,7 @@ svint32_t test_svunpklo_s32(svint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.sunpklo.nxv2i64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svunpklo_s64(svint32_t op) +svint64_t test_svunpklo_s64(svint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svunpklo,_s64,,)(op); } @@ -69,7 +77,7 @@ svint64_t test_svunpklo_s64(svint32_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uunpklo.nxv8i16( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svunpklo_u16(svuint8_t op) +svuint16_t test_svunpklo_u16(svuint8_t op) MODE_ATTR { return SVE_ACLE_FUNC(svunpklo,_u16,,)(op); } @@ -84,7 +92,7 @@ svuint16_t test_svunpklo_u16(svuint8_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uunpklo.nxv4i32( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svunpklo_u32(svuint16_t op) +svuint32_t test_svunpklo_u32(svuint16_t op) MODE_ATTR { return SVE_ACLE_FUNC(svunpklo,_u32,,)(op); } @@ -99,7 +107,7 @@ svuint32_t test_svunpklo_u32(svuint16_t op) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uunpklo.nxv2i64( [[OP:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svunpklo_u64(svuint32_t op) +svuint64_t test_svunpklo_u64(svuint32_t op) MODE_ATTR { return SVE_ACLE_FUNC(svunpklo,_u64,,)(op); } @@ -116,7 +124,7 @@ svuint64_t test_svunpklo_u64(svuint32_t op) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svunpklo_b(svbool_t op) +svbool_t test_svunpklo_b(svbool_t op) MODE_ATTR { return SVE_ACLE_FUNC(svunpklo,_b,,)(op); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_usdot.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_usdot.c index 2ef08d496e17942..c3c22b33d56bc9c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_usdot.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_usdot.c @@ -1,13 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target - // RUN: %clang_cc1 -target-feature +i8mm -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -target-feature +i8mm -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -target-feature +i8mm -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -target-feature +i8mm -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +i8mm -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +i8mm -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 @@ -25,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svusdot_s32(svint32_t x, svuint8_t y, svint8_t z) { +svint32_t test_svusdot_s32(svint32_t x, svuint8_t y, svint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svusdot, _s32, , )(x, y, z); } @@ -43,7 +50,7 @@ svint32_t test_svusdot_s32(svint32_t x, svuint8_t y, svint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.nxv4i32( [[X:%.*]], [[Y:%.*]], [[DOTSPLAT]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svusdot_n_s32(svint32_t x, svuint8_t y, int8_t z) { +svint32_t test_svusdot_n_s32(svint32_t x, svuint8_t y, int8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svusdot, _n_s32, , )(x, y, z); } @@ -57,7 +64,7 @@ svint32_t test_svusdot_n_s32(svint32_t x, svuint8_t y, int8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 0) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svusdot_lane_s32_0(svint32_t x, svuint8_t y, svint8_t z) { +svint32_t test_svusdot_lane_s32_0(svint32_t x, svuint8_t y, svint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svusdot_lane, _s32, , )(x, y, z, 0); } @@ -71,7 +78,7 @@ svint32_t test_svusdot_lane_s32_0(svint32_t x, svuint8_t y, svint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 1) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svusdot_lane_s32_1(svint32_t x, svuint8_t y, svint8_t z) { +svint32_t test_svusdot_lane_s32_1(svint32_t x, svuint8_t y, svint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svusdot_lane, _s32, , )(x, y, z, 1); } @@ -85,7 +92,7 @@ svint32_t test_svusdot_lane_s32_1(svint32_t x, svuint8_t y, svint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 2) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svusdot_lane_s32_2(svint32_t x, svuint8_t y, svint8_t z) { +svint32_t test_svusdot_lane_s32_2(svint32_t x, svuint8_t y, svint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svusdot_lane, _s32, , )(x, y, z, 2); } @@ -99,6 +106,6 @@ svint32_t test_svusdot_lane_s32_2(svint32_t x, svuint8_t y, svint8_t z) { // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.usdot.lane.nxv4i32( [[X:%.*]], [[Y:%.*]], [[Z:%.*]], i32 3) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svusdot_lane_s32_3(svint32_t x, svuint8_t y, svint8_t z) { +svint32_t test_svusdot_lane_s32_3(svint32_t x, svuint8_t y, svint8_t z) MODE_ATTR { return SVE_ACLE_FUNC(svusdot_lane, _s32, , )(x, y, z, 3); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1-bfloat.c index 82e720d254ab201..91863a400480a03 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv8bf16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svuzp1_bf16(svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svuzp1_bf16(svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_bf16,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1.c index f5c6268cf5cbac8..3581c04db085872 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp1.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svuzp1_s8(svint8_t op1, svint8_t op2) +svint8_t test_svuzp1_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svuzp1_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svuzp1_s16(svint16_t op1, svint16_t op2) +svint16_t test_svuzp1_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svuzp1_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svuzp1_s32(svint32_t op1, svint32_t op2) +svint32_t test_svuzp1_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svuzp1_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svuzp1_s64(svint64_t op1, svint64_t op2) +svint64_t test_svuzp1_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svuzp1_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svuzp1_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svuzp1_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svuzp1_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svuzp1_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svuzp1_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svuzp1_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svuzp1_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svuzp1_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svuzp1_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svuzp1_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svuzp1_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_u64,,)(op1, op2); } @@ -144,7 +152,7 @@ svuint64_t test_svuzp1_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svuzp1_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svuzp1_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_f16,,)(op1, op2); } @@ -159,7 +167,7 @@ svfloat16_t test_svuzp1_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svuzp1_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svuzp1_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_f32,,)(op1, op2); } @@ -174,7 +182,7 @@ svfloat32_t test_svuzp1_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svuzp1_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svuzp1_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp1,_f64,,)(op1, op2); } @@ -189,7 +197,7 @@ svfloat64_t test_svuzp1_f64(svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.nxv16i1( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp1_b8(svbool_t op1, svbool_t op2) +svbool_t test_svuzp1_b8(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp1_b8(op1, op2); } @@ -204,7 +212,7 @@ svbool_t test_svuzp1_b8(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.b16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp1_b16(svbool_t op1, svbool_t op2) +svbool_t test_svuzp1_b16(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp1_b16(op1, op2); } @@ -219,7 +227,7 @@ svbool_t test_svuzp1_b16(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.b32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp1_b32(svbool_t op1, svbool_t op2) +svbool_t test_svuzp1_b32(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp1_b32(op1, op2); } @@ -234,7 +242,7 @@ svbool_t test_svuzp1_b32(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp1.b64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp1_b64(svbool_t op1, svbool_t op2) +svbool_t test_svuzp1_b64(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp1_b64(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2-bfloat.c index 7bb7a93f81420b3..83ba97e40d52798 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv8bf16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svuzp2_bf16(svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svuzp2_bf16(svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_bf16,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2.c index 965d10ea9efc9d1..959afbd72e090c5 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_uzp2.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svuzp2_s8(svint8_t op1, svint8_t op2) +svint8_t test_svuzp2_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svuzp2_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svuzp2_s16(svint16_t op1, svint16_t op2) +svint16_t test_svuzp2_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svuzp2_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svuzp2_s32(svint32_t op1, svint32_t op2) +svint32_t test_svuzp2_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svuzp2_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svuzp2_s64(svint64_t op1, svint64_t op2) +svint64_t test_svuzp2_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svuzp2_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svuzp2_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svuzp2_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svuzp2_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svuzp2_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svuzp2_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svuzp2_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svuzp2_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svuzp2_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svuzp2_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svuzp2_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svuzp2_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_u64,,)(op1, op2); } @@ -144,7 +152,7 @@ svuint64_t test_svuzp2_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svuzp2_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svuzp2_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_f16,,)(op1, op2); } @@ -159,7 +167,7 @@ svfloat16_t test_svuzp2_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svuzp2_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svuzp2_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_f32,,)(op1, op2); } @@ -174,7 +182,7 @@ svfloat32_t test_svuzp2_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svuzp2_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svuzp2_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svuzp2,_f64,,)(op1, op2); } @@ -189,7 +197,7 @@ svfloat64_t test_svuzp2_f64(svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.nxv16i1( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp2_b8(svbool_t op1, svbool_t op2) +svbool_t test_svuzp2_b8(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp2_b8(op1, op2); } @@ -204,7 +212,7 @@ svbool_t test_svuzp2_b8(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.b16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp2_b16(svbool_t op1, svbool_t op2) +svbool_t test_svuzp2_b16(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp2_b16(op1, op2); } @@ -219,7 +227,7 @@ svbool_t test_svuzp2_b16(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.b32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp2_b32(svbool_t op1, svbool_t op2) +svbool_t test_svuzp2_b32(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp2_b32(op1, op2); } @@ -234,7 +242,7 @@ svbool_t test_svuzp2_b32(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.uzp2.b64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svuzp2_b64(svbool_t op1, svbool_t op2) +svbool_t test_svuzp2_b64(svbool_t op1, svbool_t op2) MODE_ATTR { return svuzp2_b64(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilele.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilele.c index eee0096882cf2d7..1b6e4d5fc9c941c 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilele.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilele.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilele.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilele_b8_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilele_b8_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b8,_s32,,)(op1, op2); } @@ -41,7 +49,7 @@ svbool_t test_svwhilele_b8_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b16_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilele_b16_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b16,_s32,,)(op1, op2); } @@ -58,7 +66,7 @@ svbool_t test_svwhilele_b16_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b32_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilele_b32_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b32,_s32,,)(op1, op2); } @@ -75,7 +83,7 @@ svbool_t test_svwhilele_b32_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b64_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilele_b64_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b64,_s32,,)(op1, op2); } @@ -90,7 +98,7 @@ svbool_t test_svwhilele_b64_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilels.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilele_b8_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilele_b8_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b8,_u32,,)(op1, op2); } @@ -107,7 +115,7 @@ svbool_t test_svwhilele_b8_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b16_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilele_b16_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b16,_u32,,)(op1, op2); } @@ -124,7 +132,7 @@ svbool_t test_svwhilele_b16_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b32_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilele_b32_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b32,_u32,,)(op1, op2); } @@ -141,7 +149,7 @@ svbool_t test_svwhilele_b32_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b64_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilele_b64_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b64,_u32,,)(op1, op2); } @@ -156,7 +164,7 @@ svbool_t test_svwhilele_b64_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilele.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilele_b8_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilele_b8_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b8,_s64,,)(op1, op2); } @@ -173,7 +181,7 @@ svbool_t test_svwhilele_b8_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b16_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilele_b16_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b16,_s64,,)(op1, op2); } @@ -190,7 +198,7 @@ svbool_t test_svwhilele_b16_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b32_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilele_b32_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b32,_s64,,)(op1, op2); } @@ -207,7 +215,7 @@ svbool_t test_svwhilele_b32_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b64_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilele_b64_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b64,_s64,,)(op1, op2); } @@ -222,7 +230,7 @@ svbool_t test_svwhilele_b64_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilels.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilele_b8_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilele_b8_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b8,_u64,,)(op1, op2); } @@ -239,7 +247,7 @@ svbool_t test_svwhilele_b8_u64(uint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b16_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilele_b16_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b16,_u64,,)(op1, op2); } @@ -256,7 +264,7 @@ svbool_t test_svwhilele_b16_u64(uint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b32_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilele_b32_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b32,_u64,,)(op1, op2); } @@ -273,7 +281,7 @@ svbool_t test_svwhilele_b32_u64(uint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilele_b64_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilele_b64_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilele_b64,_u64,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilelt.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilelt.c index 4994eb27e6307ab..69ce0739fa6ebb2 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilelt.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_whilelt.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilelt.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilelt_b8_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilelt_b8_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b8,_s32,,)(op1, op2); } @@ -41,7 +49,7 @@ svbool_t test_svwhilelt_b8_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b16_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilelt_b16_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b16,_s32,,)(op1, op2); } @@ -58,7 +66,7 @@ svbool_t test_svwhilelt_b16_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b32_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilelt_b32_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b32,_s32,,)(op1, op2); } @@ -75,7 +83,7 @@ svbool_t test_svwhilelt_b32_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b64_s32(int32_t op1, int32_t op2) +svbool_t test_svwhilelt_b64_s32(int32_t op1, int32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b64,_s32,,)(op1, op2); } @@ -90,7 +98,7 @@ svbool_t test_svwhilelt_b64_s32(int32_t op1, int32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilelo.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilelt_b8_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilelt_b8_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b8,_u32,,)(op1, op2); } @@ -107,7 +115,7 @@ svbool_t test_svwhilelt_b8_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b16_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilelt_b16_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b16,_u32,,)(op1, op2); } @@ -124,7 +132,7 @@ svbool_t test_svwhilelt_b16_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b32_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilelt_b32_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b32,_u32,,)(op1, op2); } @@ -141,7 +149,7 @@ svbool_t test_svwhilelt_b32_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b64_u32(uint32_t op1, uint32_t op2) +svbool_t test_svwhilelt_b64_u32(uint32_t op1, uint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b64,_u32,,)(op1, op2); } @@ -156,7 +164,7 @@ svbool_t test_svwhilelt_b64_u32(uint32_t op1, uint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilelt.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilelt_b8_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilelt_b8_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b8,_s64,,)(op1, op2); } @@ -173,7 +181,7 @@ svbool_t test_svwhilelt_b8_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b16_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilelt_b16_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b16,_s64,,)(op1, op2); } @@ -190,7 +198,7 @@ svbool_t test_svwhilelt_b16_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b32_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilelt_b32_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b32,_s64,,)(op1, op2); } @@ -207,7 +215,7 @@ svbool_t test_svwhilelt_b32_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b64_s64(int64_t op1, int64_t op2) +svbool_t test_svwhilelt_b64_s64(int64_t op1, int64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b64,_s64,,)(op1, op2); } @@ -222,7 +230,7 @@ svbool_t test_svwhilelt_b64_s64(int64_t op1, int64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.whilelo.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svwhilelt_b8_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilelt_b8_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b8,_u64,,)(op1, op2); } @@ -239,7 +247,7 @@ svbool_t test_svwhilelt_b8_u64(uint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b16_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilelt_b16_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b16,_u64,,)(op1, op2); } @@ -256,7 +264,7 @@ svbool_t test_svwhilelt_b16_u64(uint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b32_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilelt_b32_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b32,_u64,,)(op1, op2); } @@ -273,7 +281,7 @@ svbool_t test_svwhilelt_b32_u64(uint64_t op1, uint64_t op2) // CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( [[TMP0]]) // CPP-CHECK-NEXT: ret [[TMP1]] // -svbool_t test_svwhilelt_b64_u64(uint64_t op1, uint64_t op2) +svbool_t test_svwhilelt_b64_u64(uint64_t op1, uint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svwhilelt_b64,_u64,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1-bfloat.c index dd1533c508bbbcb..31d5e34e3cd842f 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv8bf16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svzip1_bf16(svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svzip1_bf16(svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_bf16,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1.c index 2d6c8d1ed6bf710..95a0f499248f173 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip1.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svzip1_s8(svint8_t op1, svint8_t op2) +svint8_t test_svzip1_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svzip1_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svzip1_s16(svint16_t op1, svint16_t op2) +svint16_t test_svzip1_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svzip1_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svzip1_s32(svint32_t op1, svint32_t op2) +svint32_t test_svzip1_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svzip1_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svzip1_s64(svint64_t op1, svint64_t op2) +svint64_t test_svzip1_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svzip1_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svzip1_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svzip1_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svzip1_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svzip1_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svzip1_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svzip1_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svzip1_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svzip1_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svzip1_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svzip1_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svzip1_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_u64,,)(op1, op2); } @@ -144,7 +152,7 @@ svuint64_t test_svzip1_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svzip1_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svzip1_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_f16,,)(op1, op2); } @@ -159,7 +167,7 @@ svfloat16_t test_svzip1_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svzip1_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svzip1_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_f32,,)(op1, op2); } @@ -174,7 +182,7 @@ svfloat32_t test_svzip1_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svzip1_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svzip1_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip1,_f64,,)(op1, op2); } @@ -189,7 +197,7 @@ svfloat64_t test_svzip1_f64(svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.nxv16i1( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip1_b8(svbool_t op1, svbool_t op2) +svbool_t test_svzip1_b8(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip1_b8(op1, op2); } @@ -204,7 +212,7 @@ svbool_t test_svzip1_b8(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.b16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip1_b16(svbool_t op1, svbool_t op2) +svbool_t test_svzip1_b16(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip1_b16(op1, op2); } @@ -219,7 +227,7 @@ svbool_t test_svzip1_b16(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.b32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip1_b32(svbool_t op1, svbool_t op2) +svbool_t test_svzip1_b32(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip1_b32(op1, op2); } @@ -234,7 +242,7 @@ svbool_t test_svzip1_b32(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip1.b64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip1_b64(svbool_t op1, svbool_t op2) +svbool_t test_svzip1_b64(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip1_b64(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2-bfloat.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2-bfloat.c index 275ab9073f817d1..d750fae04184005 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2-bfloat.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2-bfloat.c @@ -1,13 +1,21 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK - -// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -25,7 +33,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv8bf16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbfloat16_t test_svzip2_bf16(svbfloat16_t op1, svbfloat16_t op2) +svbfloat16_t test_svzip2_bf16(svbfloat16_t op1, svbfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_bf16,,)(op1, op2); } diff --git a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2.c b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2.c index 2a7418fb518f32a..5b19cfd673f3d60 100644 --- a/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2.c +++ b/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_zip2.c @@ -5,8 +5,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s + #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR +#endif + #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 @@ -24,7 +32,7 @@ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint8_t test_svzip2_s8(svint8_t op1, svint8_t op2) +svint8_t test_svzip2_s8(svint8_t op1, svint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_s8,,)(op1, op2); } @@ -39,7 +47,7 @@ svint8_t test_svzip2_s8(svint8_t op1, svint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint16_t test_svzip2_s16(svint16_t op1, svint16_t op2) +svint16_t test_svzip2_s16(svint16_t op1, svint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_s16,,)(op1, op2); } @@ -54,7 +62,7 @@ svint16_t test_svzip2_s16(svint16_t op1, svint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint32_t test_svzip2_s32(svint32_t op1, svint32_t op2) +svint32_t test_svzip2_s32(svint32_t op1, svint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_s32,,)(op1, op2); } @@ -69,7 +77,7 @@ svint32_t test_svzip2_s32(svint32_t op1, svint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svint64_t test_svzip2_s64(svint64_t op1, svint64_t op2) +svint64_t test_svzip2_s64(svint64_t op1, svint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_s64,,)(op1, op2); } @@ -84,7 +92,7 @@ svint64_t test_svzip2_s64(svint64_t op1, svint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv16i8( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint8_t test_svzip2_u8(svuint8_t op1, svuint8_t op2) +svuint8_t test_svzip2_u8(svuint8_t op1, svuint8_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_u8,,)(op1, op2); } @@ -99,7 +107,7 @@ svuint8_t test_svzip2_u8(svuint8_t op1, svuint8_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv8i16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint16_t test_svzip2_u16(svuint16_t op1, svuint16_t op2) +svuint16_t test_svzip2_u16(svuint16_t op1, svuint16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_u16,,)(op1, op2); } @@ -114,7 +122,7 @@ svuint16_t test_svzip2_u16(svuint16_t op1, svuint16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv4i32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint32_t test_svzip2_u32(svuint32_t op1, svuint32_t op2) +svuint32_t test_svzip2_u32(svuint32_t op1, svuint32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_u32,,)(op1, op2); } @@ -129,7 +137,7 @@ svuint32_t test_svzip2_u32(svuint32_t op1, svuint32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv2i64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svuint64_t test_svzip2_u64(svuint64_t op1, svuint64_t op2) +svuint64_t test_svzip2_u64(svuint64_t op1, svuint64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_u64,,)(op1, op2); } @@ -144,7 +152,7 @@ svuint64_t test_svzip2_u64(svuint64_t op1, svuint64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv8f16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat16_t test_svzip2_f16(svfloat16_t op1, svfloat16_t op2) +svfloat16_t test_svzip2_f16(svfloat16_t op1, svfloat16_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_f16,,)(op1, op2); } @@ -159,7 +167,7 @@ svfloat16_t test_svzip2_f16(svfloat16_t op1, svfloat16_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv4f32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat32_t test_svzip2_f32(svfloat32_t op1, svfloat32_t op2) +svfloat32_t test_svzip2_f32(svfloat32_t op1, svfloat32_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_f32,,)(op1, op2); } @@ -174,7 +182,7 @@ svfloat32_t test_svzip2_f32(svfloat32_t op1, svfloat32_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv2f64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svfloat64_t test_svzip2_f64(svfloat64_t op1, svfloat64_t op2) +svfloat64_t test_svzip2_f64(svfloat64_t op1, svfloat64_t op2) MODE_ATTR { return SVE_ACLE_FUNC(svzip2,_f64,,)(op1, op2); } @@ -189,7 +197,7 @@ svfloat64_t test_svzip2_f64(svfloat64_t op1, svfloat64_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.nxv16i1( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip2_b8(svbool_t op1, svbool_t op2) +svbool_t test_svzip2_b8(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip2_b8(op1, op2); } @@ -204,7 +212,7 @@ svbool_t test_svzip2_b8(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.b16( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip2_b16(svbool_t op1, svbool_t op2) +svbool_t test_svzip2_b16(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip2_b16(op1, op2); } @@ -219,7 +227,7 @@ svbool_t test_svzip2_b16(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.b32( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip2_b32(svbool_t op1, svbool_t op2) +svbool_t test_svzip2_b32(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip2_b32(op1, op2); } @@ -234,7 +242,7 @@ svbool_t test_svzip2_b32(svbool_t op1, svbool_t op2) // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.zip2.b64( [[OP1:%.*]], [[OP2:%.*]]) // CPP-CHECK-NEXT: ret [[TMP0]] // -svbool_t test_svzip2_b64(svbool_t op1, svbool_t op2) +svbool_t test_svzip2_b64(svbool_t op1, svbool_t op2) MODE_ATTR { return svzip2_b64(op1, op2); } diff --git a/clang/test/CodeGen/ptrauth-function-attributes.c b/clang/test/CodeGen/ptrauth-function-attributes.c new file mode 100644 index 000000000000000..7ec30498b9d35e1 --- /dev/null +++ b/clang/test/CodeGen/ptrauth-function-attributes.c @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple arm64e-apple-ios -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,OFF +// RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,OFF + +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,CALLS +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,CALLS + +// ALL: define {{(dso_local )?}}void @test() #0 +void test() { +} + +// CALLS: attributes #0 = {{{.*}} "ptrauth-calls" {{.*}}} + +// OFF-NOT: attributes {{.*}} "ptrauth- diff --git a/clang/test/CodeGen/ptrauth-function-init-fail.c b/clang/test/CodeGen/ptrauth-function-init-fail.c new file mode 100644 index 000000000000000..4522f6a14c4a82f --- /dev/null +++ b/clang/test/CodeGen/ptrauth-function-init-fail.c @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -triple arm64e-apple-ios -fptrauth-calls %s -verify -emit-llvm -o - +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls %s -verify -emit-llvm -o - + +void f(void); + +// FIXME: We need a better diagnostic here. +int *pf = (int *)&f + 1; // expected-error{{cannot compile this static initializer yet}} diff --git a/clang/test/CodeGen/ptrauth-function-init.c b/clang/test/CodeGen/ptrauth-function-init.c new file mode 100644 index 000000000000000..bf8ee53364ecc1f --- /dev/null +++ b/clang/test/CodeGen/ptrauth-function-init.c @@ -0,0 +1,36 @@ +// RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s +// RUN: %clang_cc1 %s -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s +// RUN: %clang_cc1 -xc++ %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,CXX +// RUN: %clang_cc1 -xc++ %s -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,CXX + +#ifdef __cplusplus +extern "C" { +#endif + +void f(void); + +#ifdef __cplusplus + +// CXX: define {{(dso_local )?}}internal void @__cxx_global_var_init() +// CXX: store ptr getelementptr inbounds (i32, ptr ptrauth (ptr @f, i32 0), i64 2), ptr @_ZL2fp, align 8 + +// This is rejected in C mode as adding a non-zero constant to a signed pointer +// is unrepresentable in relocations. In C++ mode, this can be done dynamically +// by the global constructor. +__attribute__((used)) +void (*const fp)(void) = (void (*)(void))((int *)&f + 2); + +#endif + +// CHECK: define {{(dso_local )?}}void @t1() +void t1() { + // CHECK: [[PF:%.*]] = alloca ptr + // CHECK: store ptr getelementptr inbounds (i32, ptr ptrauth (ptr @f, i32 0), i64 2), ptr [[PF]] + + void (*pf)(void) = (void (*)(void))((int *)&f + 2); + (void)pf; +} + +#ifdef __cplusplus +} +#endif diff --git a/clang/test/CodeGen/ptrauth-function-lvalue-cast.c b/clang/test/CodeGen/ptrauth-function-lvalue-cast.c new file mode 100644 index 000000000000000..8d8af18fcafbe88 --- /dev/null +++ b/clang/test/CodeGen/ptrauth-function-lvalue-cast.c @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -emit-llvm -o- | FileCheck %s +// RUN: %clang_cc1 %s -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm -o- | FileCheck %s + +typedef void (*fptr_t)(void); + +char *cptr; +void (*fptr)(void); + +// CHECK: define {{(dso_local )?}}void @test1 +void test1() { + // CHECK: [[LOAD:%.*]] = load ptr, ptr @cptr + // CHECK: call void [[LOAD]]() [ "ptrauth"(i32 0, i64 0) ] + // CHECK: ret void + + (*(fptr_t)cptr)(); +} + +// CHECK: define {{(dso_local )?}}i8 @test2 +char test2() { + return *(char *)fptr; + // CHECK: [[LOAD:%.*]] = load ptr, ptr @fptr + // CHECK: [[LOAD1:%.*]] = load i8, ptr [[LOAD]] + // CHECK: ret i8 [[LOAD1]] +} diff --git a/clang/test/CodeGen/ptrauth-function.c b/clang/test/CodeGen/ptrauth-function.c new file mode 100644 index 000000000000000..eea3f7ed73747f0 --- /dev/null +++ b/clang/test/CodeGen/ptrauth-function.c @@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck -check-prefix=CHECK %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck -check-prefix=CHECK %s + +void test_call(); + +// CHECK: define {{(dso_local )?}}void @test_direct_call() +void test_direct_call() { + // CHECK: call void @test_call(){{$}} + test_call(); +} + +// CHECK: define {{(dso_local )?}}void @test_indirect_call(ptr noundef %[[FP:.*]]) +void test_indirect_call(void (*fp(void))) { + // CHECK: %[[FP_ADDR:.*]] = alloca ptr, align 8 + // CHECK: store ptr %[[FP]], ptr %[[FP_ADDR]], align 8 + // CHECK: %[[V0:.*]] = load ptr, ptr %[[FP_ADDR]], align 8 + // CHECK: %[[CALL:.*]] = call ptr %[[V0]]() [ "ptrauth"(i32 0, i64 0) ] + fp(); +} + +void abort(); +// CHECK: define {{(dso_local )?}}void @test_direct_builtin_call() +void test_direct_builtin_call() { + // CHECK: call void @abort() {{#[0-9]+$}} + abort(); +} + +// CHECK-LABEL: define {{(dso_local )?}}void @test_memcpy_inline( +// CHECK-NOT: call{{.*}}memcpy + +extern inline __attribute__((__always_inline__)) +void *memcpy(void *d, const void *s, unsigned long) { + return 0; +} + +void test_memcpy_inline(char *d, char *s) { + memcpy(d, s, 4); +} diff --git a/clang/test/CodeGen/ptrauth-intrinsic-sign-constant.c b/clang/test/CodeGen/ptrauth-intrinsic-sign-constant.c new file mode 100644 index 000000000000000..bab39897b942700 --- /dev/null +++ b/clang/test/CodeGen/ptrauth-intrinsic-sign-constant.c @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple aarch64-elf -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s + +extern int external; + +// CHECK: @ptr1 = global ptr ptrauth (ptr @external, i32 0) +void *ptr1 = __builtin_ptrauth_sign_constant(&external, 0, 0); + +// CHECK: @ptr2 = global ptr ptrauth (ptr @external, i32 0, i64 1234) +void *ptr2 = __builtin_ptrauth_sign_constant(&external, 0, 1234); + +// CHECK: @ptr3 = global ptr ptrauth (ptr @external, i32 2, i64 0, ptr @ptr3) +void *ptr3 = __builtin_ptrauth_sign_constant(&external, 2, &ptr3); + +// CHECK: @ptr4 = global ptr ptrauth (ptr @external, i32 2, i64 26, ptr @ptr4) +void *ptr4 = __builtin_ptrauth_sign_constant(&external, 2, __builtin_ptrauth_blend_discriminator(&ptr4, 26)); + +// CHECK: @ptr5 = global ptr null +void *ptr5; + +void test_sign_constant_code() { +// CHECK-LABEL: define {{.*}}void @test_sign_constant_code() +// CHECK-NEXT: entry: +// CHECK-NEXT: store ptr ptrauth (ptr @external, i32 0), ptr @ptr1, align 8 +// CHECK-NEXT: store ptr ptrauth (ptr @external, i32 2, i64 1234), ptr @ptr2, align 8 +// CHECK-NEXT: store ptr ptrauth (ptr @external, i32 2, i64 0, ptr @ptr3), ptr @ptr3, align 8 +// CHECK-NEXT: store ptr ptrauth (ptr @external, i32 2, i64 1234, ptr @ptr4), ptr @ptr4, align 8 +// CHECK-NEXT: ret void + ptr1 = __builtin_ptrauth_sign_constant(&external, 0, 0); + ptr2 = __builtin_ptrauth_sign_constant(&external, 2, 1234); + ptr3 = __builtin_ptrauth_sign_constant(&external, 2, &ptr3); + ptr4 = __builtin_ptrauth_sign_constant(&external, 2, __builtin_ptrauth_blend_discriminator(&ptr4, 1234)); +} diff --git a/clang/test/CodeGen/ptrauth-intrinsics.c b/clang/test/CodeGen/ptrauth-intrinsics.c index 17f28dddb380153..db37d785537691d 100644 --- a/clang/test/CodeGen/ptrauth-intrinsics.c +++ b/clang/test/CodeGen/ptrauth-intrinsics.c @@ -1,11 +1,12 @@ // RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple aarch64-elf -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s void (*fnptr)(void); long int_discriminator; void *ptr_discriminator; long signature; -// CHECK-LABEL: define void @test_auth() +// CHECK-LABEL: define {{.*}}void @test_auth() void test_auth() { // CHECK: [[PTR:%.*]] = load ptr, ptr @fnptr, // CHECK-NEXT: [[DISC0:%.*]] = load ptr, ptr @ptr_discriminator, @@ -17,7 +18,7 @@ void test_auth() { fnptr = __builtin_ptrauth_auth(fnptr, 0, ptr_discriminator); } -// CHECK-LABEL: define void @test_strip() +// CHECK-LABEL: define {{.*}}void @test_strip() void test_strip() { // CHECK: [[PTR:%.*]] = load ptr, ptr @fnptr, // CHECK-NEXT: [[T0:%.*]] = ptrtoint ptr [[PTR]] to i64 @@ -27,7 +28,7 @@ void test_strip() { fnptr = __builtin_ptrauth_strip(fnptr, 0); } -// CHECK-LABEL: define void @test_sign_unauthenticated() +// CHECK-LABEL: define {{.*}}void @test_sign_unauthenticated() void test_sign_unauthenticated() { // CHECK: [[PTR:%.*]] = load ptr, ptr @fnptr, // CHECK-NEXT: [[DISC0:%.*]] = load ptr, ptr @ptr_discriminator, @@ -39,7 +40,7 @@ void test_sign_unauthenticated() { fnptr = __builtin_ptrauth_sign_unauthenticated(fnptr, 0, ptr_discriminator); } -// CHECK-LABEL: define void @test_auth_and_resign() +// CHECK-LABEL: define {{.*}}void @test_auth_and_resign() void test_auth_and_resign() { // CHECK: [[PTR:%.*]] = load ptr, ptr @fnptr, // CHECK-NEXT: [[DISC0:%.*]] = load ptr, ptr @ptr_discriminator, @@ -51,7 +52,7 @@ void test_auth_and_resign() { fnptr = __builtin_ptrauth_auth_and_resign(fnptr, 0, ptr_discriminator, 3, 15); } -// CHECK-LABEL: define void @test_blend_discriminator() +// CHECK-LABEL: define {{.*}}void @test_blend_discriminator() void test_blend_discriminator() { // CHECK: [[PTR:%.*]] = load ptr, ptr @fnptr, // CHECK-NEXT: [[DISC:%.*]] = load i64, ptr @int_discriminator, @@ -61,7 +62,7 @@ void test_blend_discriminator() { int_discriminator = __builtin_ptrauth_blend_discriminator(fnptr, int_discriminator); } -// CHECK-LABEL: define void @test_sign_generic_data() +// CHECK-LABEL: define {{.*}}void @test_sign_generic_data() void test_sign_generic_data() { // CHECK: [[PTR:%.*]] = load ptr, ptr @fnptr, // CHECK-NEXT: [[DISC0:%.*]] = load ptr, ptr @ptr_discriminator, @@ -71,3 +72,16 @@ void test_sign_generic_data() { // CHECK-NEXT: store i64 [[RESULT]], ptr @signature, signature = __builtin_ptrauth_sign_generic_data(fnptr, ptr_discriminator); } + +// CHECK-LABEL: define {{.*}}void @test_string_discriminator() +void test_string_discriminator() { + // CHECK: [[X:%.*]] = alloca i32 + + // Check a couple of random discriminators used by Swift. + + // CHECK: store i32 58298, ptr [[X]], + int x = __builtin_ptrauth_string_discriminator("InitializeWithCopy"); + + // CHECK: store i32 9112, ptr [[X]], + x = __builtin_ptrauth_string_discriminator("DestroyArray"); +} diff --git a/clang/test/CodeGen/ptrauth-weak_import.c b/clang/test/CodeGen/ptrauth-weak_import.c new file mode 100644 index 000000000000000..1f53747a2640e0d --- /dev/null +++ b/clang/test/CodeGen/ptrauth-weak_import.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s + +extern void foo() __attribute__((weak_import)); + +// CHECK: define {{(dso_local )?}}void @bar() +// CHECK: [[TMP1:%.*]] = icmp ne ptr ptrauth (ptr @foo, i32 0), null +// CHECK: br i1 [[TMP1]], label +void bar() { + if (foo) + foo(); +} diff --git a/clang/test/CodeGenCXX/mangle-ms-auto-templates.cpp b/clang/test/CodeGenCXX/mangle-ms-auto-templates.cpp index c17f5f5e4477f9e..ff5395cea75eb77 100644 --- a/clang/test/CodeGenCXX/mangle-ms-auto-templates.cpp +++ b/clang/test/CodeGenCXX/mangle-ms-auto-templates.cpp @@ -18,6 +18,12 @@ auto AutoFunc() { return a; } +int Func(); +int Func2(); + +int i; +int j; + void template_mangling() { AutoFunc<1>(); // AFTER: call {{.*}} @"??$AutoFunc@$MH00@@YA?A?@@XZ" @@ -44,4 +50,29 @@ void template_mangling() { AutoParmsTemplate<(unsigned long)1, 9223372036854775807LL> c2; // AFTER: call {{.*}} @"??0?$AutoParmsTemplate@$MK00$M_J0HPPPPPPPPPPPPPPP@@@QEAA@XZ" // BEFORE: call {{.*}} @"??0?$AutoParmsTemplate@$00$0HPPPPPPPPPPPPPPP@@@QEAA@XZ" + + AutoFunc<&i>(); + // AFTER: call {{.*}} @"??$AutoFunc@$MPEAH1?i@@3HA@@YA?A?@@XZ" + // BEFORE: call {{.*}} @"??$AutoFunc@$1?i@@3HA@@YA?A?@@XZ" + + AutoParmTemplate<&i> auto_int_ptr; + // AFTER: call {{.*}} @"??0?$AutoParmTemplate@$MPEAH1?i@@3HA@@QEAA@XZ" + // BEFORE: call {{.*}} @"??0?$AutoParmTemplate@$1?i@@3HA@@QEAA@XZ" + + AutoParmsTemplate<&i, &j> auto_int_ptrs; + // AFTER: call {{.*}} @"??0?$AutoParmsTemplate@$MPEAH1?i@@3HA$MPEAH1?j@@3HA@@QEAA@XZ" + // BEFORE: call {{.*}} @"??0?$AutoParmsTemplate@$1?i@@3HA$1?j@@3HA@@QEAA@XZ" + + AutoFunc<&Func>(); + // AFTER: call {{.*}} @"??$AutoFunc@$MP6AHXZ1?Func@@YAHXZ@@YA?A?@@XZ" + // BEFORE: call {{.*}} @"??$AutoFunc@$1?Func@@YAHXZ@@YA?A?@@XZ" + + AutoParmTemplate<&Func> auto_func_ptr; + // AFTER: call {{.*}} @"??0?$AutoParmTemplate@$MP6AHXZ1?Func@@YAHXZ@@QEAA@XZ" + // BEFORE: call {{.*}} @"??0?$AutoParmTemplate@$1?Func@@YAHXZ@@QEAA@XZ" + + AutoParmsTemplate<&Func, &Func2> auto_func_ptrs; + // AFTER: call {{.*}} @"??0?$AutoParmsTemplate@$MP6AHXZ1?Func@@YAHXZ$MP6AHXZ1?Func2@@YAHXZ@@QEAA@XZ" + // BEFORE: call {{.*}} @"??0?$AutoParmsTemplate@$1?Func@@YAHXZ$1?Func2@@YAHXZ@@QEAA@XZ" + } diff --git a/clang/test/CodeGenCXX/ptrauth.cpp b/clang/test/CodeGenCXX/ptrauth.cpp new file mode 100644 index 000000000000000..b0c069f43969bb1 --- /dev/null +++ b/clang/test/CodeGenCXX/ptrauth.cpp @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -emit-llvm -std=c++11 -fexceptions -fcxx-exceptions -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -emit-llvm -std=c++11 -fexceptions -fcxx-exceptions -o - %s | FileCheck %s + +void f(void); +auto &f_ref = f; + +// CHECK: define {{(dso_local )?}}void @_Z1gv( +// CHECK: call void ptrauth (ptr @_Z1fv, i32 0)() [ "ptrauth"(i32 0, i64 0) ] + +void g() { f_ref(); } + +void foo1(); + +void test_terminate() noexcept { + foo1(); +} + +// CHECK: define {{(dso_local )?}}void @_ZSt9terminatev() #[[ATTR4:.*]] { + +namespace std { + void terminate() noexcept { + } +} + +// CHECK: attributes #[[ATTR4]] = {{{.*}}"ptrauth-calls"{{.*}}} diff --git a/clang/test/CodeGenCXX/temporaries.cpp b/clang/test/CodeGenCXX/temporaries.cpp index 186f4934873fa94..f992ce206c5815b 100644 --- a/clang/test/CodeGenCXX/temporaries.cpp +++ b/clang/test/CodeGenCXX/temporaries.cpp @@ -683,8 +683,7 @@ namespace Vector { // CHECK: store i32 {{.*}}, ptr @_ZGRN6Vector1sE_ // CHECK: store ptr @_ZGRN6Vector1sE_, ptr @_ZN6Vector1sE, int &&s = S().w[1]; - // FIXME PR16204: The following code leads to an assertion in Sema. - //int &&s = S().w.y; + int &&ss = S().w.y; } namespace ImplicitTemporaryCleanup { diff --git a/clang/test/CodeGenHIP/builtins-make-buffer-rsrc.hip b/clang/test/CodeGenHIP/builtins-make-buffer-rsrc.hip new file mode 100644 index 000000000000000..c1a30633f3d0a3d --- /dev/null +++ b/clang/test/CodeGenHIP/builtins-make-buffer-rsrc.hip @@ -0,0 +1,105 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu verde -emit-llvm -disable-llvm-optzns -fcuda-is-device -o - %s | FileCheck %s + +#define __device__ __attribute__((device)) + +// CHECK-LABEL: define dso_local ptr addrspace(8) @_Z31test_amdgcn_make_buffer_rsrc_p0Pvsii( +// CHECK-SAME: ptr noundef [[P:%.*]], i16 noundef signext [[STRIDE:%.*]], i32 noundef [[NUM:%.*]], i32 noundef [[FLAGS:%.*]]) #[[ATTR0:[0-9]+]] { +// CHECK-NEXT: [[ENTRY:.*:]] +// CHECK-NEXT: [[RETVAL:%.*]] = alloca ptr addrspace(8), align 16, addrspace(5) +// CHECK-NEXT: [[P_ADDR:%.*]] = alloca ptr, align 8, addrspace(5) +// CHECK-NEXT: [[STRIDE_ADDR:%.*]] = alloca i16, align 2, addrspace(5) +// CHECK-NEXT: [[NUM_ADDR:%.*]] = alloca i32, align 4, addrspace(5) +// CHECK-NEXT: [[FLAGS_ADDR:%.*]] = alloca i32, align 4, addrspace(5) +// CHECK-NEXT: [[RETVAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL]] to ptr +// CHECK-NEXT: [[P_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[P_ADDR]] to ptr +// CHECK-NEXT: [[STRIDE_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[STRIDE_ADDR]] to ptr +// CHECK-NEXT: [[NUM_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[NUM_ADDR]] to ptr +// CHECK-NEXT: [[FLAGS_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[FLAGS_ADDR]] to ptr +// CHECK-NEXT: store ptr [[P]], ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: store i16 [[STRIDE]], ptr [[STRIDE_ADDR_ASCAST]], align 2 +// CHECK-NEXT: store i32 [[NUM]], ptr [[NUM_ADDR_ASCAST]], align 4 +// CHECK-NEXT: store i32 [[FLAGS]], ptr [[FLAGS_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP0:%.*]] = load ptr, ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: [[TMP1:%.*]] = load i16, ptr [[STRIDE_ADDR_ASCAST]], align 2 +// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[NUM_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[FLAGS_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP4:%.*]] = call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[TMP0]], i16 [[TMP1]], i32 [[TMP2]], i32 [[TMP3]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP4]] +// +__device__ __amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0(void *p, short stride, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, num, flags); +} + +// CHECK-LABEL: define dso_local ptr addrspace(8) @_Z47test_amdgcn_make_buffer_rsrc_p0_stride_constantPvii( +// CHECK-SAME: ptr noundef [[P:%.*]], i32 noundef [[NUM:%.*]], i32 noundef [[FLAGS:%.*]]) #[[ATTR0]] { +// CHECK-NEXT: [[ENTRY:.*:]] +// CHECK-NEXT: [[RETVAL:%.*]] = alloca ptr addrspace(8), align 16, addrspace(5) +// CHECK-NEXT: [[P_ADDR:%.*]] = alloca ptr, align 8, addrspace(5) +// CHECK-NEXT: [[NUM_ADDR:%.*]] = alloca i32, align 4, addrspace(5) +// CHECK-NEXT: [[FLAGS_ADDR:%.*]] = alloca i32, align 4, addrspace(5) +// CHECK-NEXT: [[RETVAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL]] to ptr +// CHECK-NEXT: [[P_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[P_ADDR]] to ptr +// CHECK-NEXT: [[NUM_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[NUM_ADDR]] to ptr +// CHECK-NEXT: [[FLAGS_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[FLAGS_ADDR]] to ptr +// CHECK-NEXT: store ptr [[P]], ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: store i32 [[NUM]], ptr [[NUM_ADDR_ASCAST]], align 4 +// CHECK-NEXT: store i32 [[FLAGS]], ptr [[FLAGS_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP0:%.*]] = load ptr, ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[NUM_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[FLAGS_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP3:%.*]] = call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[TMP0]], i16 4, i32 [[TMP1]], i32 [[TMP2]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP3]] +// +__device__ __amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0_stride_constant(void *p, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, /*stride=*/4, num, flags); +} + +// CHECK-LABEL: define dso_local ptr addrspace(8) @_Z44test_amdgcn_make_buffer_rsrc_p0_num_constantPvsi( +// CHECK-SAME: ptr noundef [[P:%.*]], i16 noundef signext [[STRIDE:%.*]], i32 noundef [[FLAGS:%.*]]) #[[ATTR0]] { +// CHECK-NEXT: [[ENTRY:.*:]] +// CHECK-NEXT: [[RETVAL:%.*]] = alloca ptr addrspace(8), align 16, addrspace(5) +// CHECK-NEXT: [[P_ADDR:%.*]] = alloca ptr, align 8, addrspace(5) +// CHECK-NEXT: [[STRIDE_ADDR:%.*]] = alloca i16, align 2, addrspace(5) +// CHECK-NEXT: [[FLAGS_ADDR:%.*]] = alloca i32, align 4, addrspace(5) +// CHECK-NEXT: [[RETVAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL]] to ptr +// CHECK-NEXT: [[P_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[P_ADDR]] to ptr +// CHECK-NEXT: [[STRIDE_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[STRIDE_ADDR]] to ptr +// CHECK-NEXT: [[FLAGS_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[FLAGS_ADDR]] to ptr +// CHECK-NEXT: store ptr [[P]], ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: store i16 [[STRIDE]], ptr [[STRIDE_ADDR_ASCAST]], align 2 +// CHECK-NEXT: store i32 [[FLAGS]], ptr [[FLAGS_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP0:%.*]] = load ptr, ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: [[TMP1:%.*]] = load i16, ptr [[STRIDE_ADDR_ASCAST]], align 2 +// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[FLAGS_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP3:%.*]] = call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[TMP0]], i16 [[TMP1]], i32 1234, i32 [[TMP2]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP3]] +// +__device__ __amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0_num_constant(void *p, short stride, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, /*num=*/1234, flags); +} + +// CHECK-LABEL: define dso_local ptr addrspace(8) @_Z46test_amdgcn_make_buffer_rsrc_p0_flags_constantPvsi( +// CHECK-SAME: ptr noundef [[P:%.*]], i16 noundef signext [[STRIDE:%.*]], i32 noundef [[NUM:%.*]]) #[[ATTR0]] { +// CHECK-NEXT: [[ENTRY:.*:]] +// CHECK-NEXT: [[RETVAL:%.*]] = alloca ptr addrspace(8), align 16, addrspace(5) +// CHECK-NEXT: [[P_ADDR:%.*]] = alloca ptr, align 8, addrspace(5) +// CHECK-NEXT: [[STRIDE_ADDR:%.*]] = alloca i16, align 2, addrspace(5) +// CHECK-NEXT: [[NUM_ADDR:%.*]] = alloca i32, align 4, addrspace(5) +// CHECK-NEXT: [[RETVAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL]] to ptr +// CHECK-NEXT: [[P_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[P_ADDR]] to ptr +// CHECK-NEXT: [[STRIDE_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[STRIDE_ADDR]] to ptr +// CHECK-NEXT: [[NUM_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[NUM_ADDR]] to ptr +// CHECK-NEXT: store ptr [[P]], ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: store i16 [[STRIDE]], ptr [[STRIDE_ADDR_ASCAST]], align 2 +// CHECK-NEXT: store i32 [[NUM]], ptr [[NUM_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP0:%.*]] = load ptr, ptr [[P_ADDR_ASCAST]], align 8 +// CHECK-NEXT: [[TMP1:%.*]] = load i16, ptr [[STRIDE_ADDR_ASCAST]], align 2 +// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[NUM_ADDR_ASCAST]], align 4 +// CHECK-NEXT: [[TMP3:%.*]] = call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[TMP0]], i16 [[TMP1]], i32 [[TMP2]], i32 5678) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP3]] +// +__device__ __amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0_flags_constant(void *p, short stride, int num) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, num, /*flags=*/5678); +} diff --git a/clang/test/CodeGenOpenCL/builtins-amdgcn-make-buffer-rsrc.cl b/clang/test/CodeGenOpenCL/builtins-amdgcn-make-buffer-rsrc.cl new file mode 100644 index 000000000000000..2c7bc10fb609cb4 --- /dev/null +++ b/clang/test/CodeGenOpenCL/builtins-amdgcn-make-buffer-rsrc.cl @@ -0,0 +1,93 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -cl-std=CL2.0 -target-cpu verde -emit-llvm -o - %s | FileCheck %s + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p0( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[P:%.*]], i16 [[STRIDE:%.*]], i32 [[NUM:%.*]], i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0(void *p, short stride, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, num, flags); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p0_stride_constant( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[P:%.*]], i16 4, i32 [[NUM:%.*]], i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0_stride_constant(void *p, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, /*stride=*/4, num, flags); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p0_num_constant( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[P:%.*]], i16 [[STRIDE:%.*]], i32 1234, i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0_num_constant(void *p, short stride, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, /*num=*/1234, flags); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p0_flags_constant( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr [[P:%.*]], i16 [[STRIDE:%.*]], i32 [[NUM:%.*]], i32 5678) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p0_flags_constant(void *p, short stride, int num) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, num, /*flags=*/5678); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p1( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p1(ptr addrspace(1) [[P:%.*]], i16 [[STRIDE:%.*]], i32 [[NUM:%.*]], i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p1(global void *p, short stride, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, num, flags); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p1_stride_constant( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p1(ptr addrspace(1) [[P:%.*]], i16 4, i32 [[NUM:%.*]], i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p1_stride_constant(global void *p, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, /*stride=*/4, num, flags); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p1_num_constant( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p1(ptr addrspace(1) [[P:%.*]], i16 [[STRIDE:%.*]], i32 1234, i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p1_num_constant(global void *p, short stride, int flags) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, /*num=*/1234, flags); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_rsrc_p1_flags_constant( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p1(ptr addrspace(1) [[P:%.*]], i16 [[STRIDE:%.*]], i32 [[NUM:%.*]], i32 5678) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_rsrc_p1_flags_constant(global void *p, short stride, int num) { + return __builtin_amdgcn_make_buffer_rsrc(p, stride, num, /*flags=*/5678); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_p0_nullptr( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p0(ptr null, i16 [[STRIDE:%.*]], i32 [[NUM:%.*]], i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_p0_nullptr(short stride, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc((void *)0LL, stride, num, flags); +} + +// CHECK-LABEL: @test_amdgcn_make_buffer_p1_nullptr( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[TMP0:%.*]] = tail call ptr addrspace(8) @llvm.amdgcn.make.buffer.rsrc.p1(ptr addrspace(1) null, i16 [[STRIDE:%.*]], i32 [[NUM:%.*]], i32 [[FLAGS:%.*]]) +// CHECK-NEXT: ret ptr addrspace(8) [[TMP0]] +// +__amdgpu_buffer_rsrc_t test_amdgcn_make_buffer_p1_nullptr(short stride, int num, int flags) { + return __builtin_amdgcn_make_buffer_rsrc((global void *)0LL, stride, num, flags); +} diff --git a/clang/test/Coverage/unresolved-ctor-expr.cpp b/clang/test/Coverage/unresolved-ctor-expr.cpp index 10286c79f569d51..2c57320949f7bab 100644 --- a/clang/test/Coverage/unresolved-ctor-expr.cpp +++ b/clang/test/Coverage/unresolved-ctor-expr.cpp @@ -4,7 +4,7 @@ // GH62105 demonstrated a crash with this example code when calculating // coverage mapping because some source location information was being dropped. // Demonstrate that we do not crash on this code. -namespace std { template class initializer_list {}; } +namespace std { template class initializer_list { const E *a, *b; }; } template struct T { T(std::initializer_list, int = int()); diff --git a/clang/test/Driver/riscv-cpus.c b/clang/test/Driver/riscv-cpus.c index 41c257bc559ed59..26bcda6468dd2b0 100644 --- a/clang/test/Driver/riscv-cpus.c +++ b/clang/test/Driver/riscv-cpus.c @@ -358,3 +358,26 @@ // RUN: not %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv32 -march=rv64i | FileCheck -check-prefix=MISMATCH-ARCH %s // MISMATCH-ARCH: cpu 'generic-rv32' does not support rv64 + +// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=syntacore-scr3-rv32 | FileCheck -check-prefix=MCPU-SYNTACORE-SCR3-RV32 %s +// MCPU-SYNTACORE-SCR3-RV32: "-target-cpu" "syntacore-scr3-rv32" +// MCPU-SYNTACORE-SCR3-RV32-SAME: "-target-feature" "+m" +// MCPU-SYNTACORE-SCR3-RV32-SAME: "-target-feature" "+c" +// MCPU-SYNTACORE-SCR3-RV32-SAME: "-target-feature" "+zicsr" +// MCPU-SYNTACORE-SCR3-RV32-SAME: "-target-feature" "+zifencei" +// MCPU-SYNTACORE-SCR3-RV32-SAME: "-target-abi" "ilp32" + +// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=syntacore-scr3-rv32 | FileCheck -check-prefix=MTUNE-SYNTACORE-SCR3-RV32 %s +// MTUNE-SYNTACORE-SCR3-RV32: "-tune-cpu" "syntacore-scr3-rv32" + +// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=syntacore-scr3-rv64 | FileCheck -check-prefix=MCPU-SYNTACORE-SCR3-RV64 %s +// MCPU-SYNTACORE-SCR3-RV64: "-target-cpu" "syntacore-scr3-rv64" +// MCPU-SYNTACORE-SCR3-RV64-SAME: "-target-feature" "+m" +// MCPU-SYNTACORE-SCR3-RV64-SAME: "-target-feature" "+a" +// MCPU-SYNTACORE-SCR3-RV64-SAME: "-target-feature" "+c" +// MCPU-SYNTACORE-SCR3-RV64-SAME: "-target-feature" "+zicsr" +// MCPU-SYNTACORE-SCR3-RV64-SAME: "-target-feature" "+zifencei" +// MCPU-SYNTACORE-SCR3-RV64-SAME: "-target-abi" "lp64" + +// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=syntacore-scr3-rv64 | FileCheck -check-prefix=MTUNE-SYNTACORE-SCR3-RV64 %s +// MTUNE-SYNTACORE-SCR3-RV64: "-tune-cpu" "syntacore-scr3-rv64" diff --git a/clang/test/Driver/rocm-device-libs.cl b/clang/test/Driver/rocm-device-libs.cl index 415719105d5dc21..6837e219dc35de1 100644 --- a/clang/test/Driver/rocm-device-libs.cl +++ b/clang/test/Driver/rocm-device-libs.cl @@ -132,9 +132,20 @@ // RUN: %S/opencl.cl \ // RUN: 2>&1 | FileCheck --check-prefixes=COMMON,COMMON-DEFAULT,GFX900-DEFAULT,GFX900,WAVE64 %s +// RUN: %clang -### -target amdgcn-amd-amdhsa \ +// RUN: -x cl -mcpu=gfx908:xnack+ -fsanitize=address \ +// RUN: --rocm-path=%S/Inputs/rocm \ +// RUN: %s \ +// RUN: 2>&1 | FileCheck --check-prefixes=ASAN,COMMON %s +// RUN: %clang -### -target amdgcn-amd-amdhsa \ +// RUN: -x cl -mcpu=gfx908:xnack+ \ +// RUN: --rocm-path=%S/Inputs/rocm \ +// RUN: %s \ +// RUN: 2>&1 | FileCheck --check-prefixes=NOASAN %s // COMMON: "-triple" "amdgcn-amd-amdhsa" +// ASAN-SAME: "-mlink-bitcode-file" "{{.*}}/amdgcn/bitcode/asanrtl.bc" // COMMON-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/opencl.bc" // COMMON-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/ocml.bc" // COMMON-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/ockl.bc" @@ -169,6 +180,11 @@ // COMMON-UNSAFE-MATH-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_finite_only_off.bc" // COMMON-UNSAFE-MATH-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc" +// ASAN-SAME: "-fsanitize=address" + +// NOASAN-NOT: "-fsanitize=address" +// NOASAN-NOT: amdgcn/bitcode/asanrtl.bc + // WAVE64: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_wavefrontsize64_on.bc" // WAVE32: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_wavefrontsize64_off.bc" diff --git a/clang/test/Index/comment-misc-tags.m b/clang/test/Index/comment-misc-tags.m index 47ee9d9aa392abe..6d018dbfcf193d3 100644 --- a/clang/test/Index/comment-misc-tags.m +++ b/clang/test/Index/comment-misc-tags.m @@ -91,18 +91,16 @@ @interface IOCommandGate struct Test {int filler;}; -// CHECK: (CXComment_BlockCommand CommandName=[par] +// CHECK: (CXComment_BlockCommand CommandName=[par] Arg[0]=User defined paragraph: // CHECK-NEXT: (CXComment_Paragraph -// CHECK-NEXT: (CXComment_Text Text=[ User defined paragraph:] HasTrailingNewline) // CHECK-NEXT: (CXComment_Text Text=[ Contents of the paragraph.]))) // CHECK: (CXComment_BlockCommand CommandName=[par] // CHECK-NEXT: (CXComment_Paragraph -// CHECK-NEXT: (CXComment_Text Text=[ New paragraph under the same heading.]))) +// CHECK-NEXT: (CXComment_Text Text=[New paragraph under the same heading.]))) // CHECK: (CXComment_BlockCommand CommandName=[note] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ This note consists of two paragraphs.] HasTrailingNewline) // CHECK-NEXT: (CXComment_Text Text=[ This is the first paragraph.]))) // CHECK: (CXComment_BlockCommand CommandName=[par] // CHECK-NEXT: (CXComment_Paragraph -// CHECK-NEXT: (CXComment_Text Text=[ And this is the second paragraph.]))) - +// CHECK-NEXT: (CXComment_Text Text=[And this is the second paragraph.]))) diff --git a/clang/test/Misc/target-invalid-cpu-note.c b/clang/test/Misc/target-invalid-cpu-note.c index 59d3aaa122dbea3..1a9063ee5a25749 100644 --- a/clang/test/Misc/target-invalid-cpu-note.c +++ b/clang/test/Misc/target-invalid-cpu-note.c @@ -81,16 +81,16 @@ // RUN: not %clang_cc1 -triple riscv32 -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix RISCV32 // RISCV32: error: unknown target CPU 'not-a-cpu' -// RISCV32-NEXT: note: valid target CPU values are: generic-rv32, rocket-rv32, sifive-e20, sifive-e21, sifive-e24, sifive-e31, sifive-e34, sifive-e76, syntacore-scr1-base, syntacore-scr1-max{{$}} +// RISCV32-NEXT: note: valid target CPU values are: generic-rv32, rocket-rv32, sifive-e20, sifive-e21, sifive-e24, sifive-e31, sifive-e34, sifive-e76, syntacore-scr1-base, syntacore-scr1-max, syntacore-scr3-rv32{{$}} // RUN: not %clang_cc1 -triple riscv64 -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix RISCV64 // RISCV64: error: unknown target CPU 'not-a-cpu' -// RISCV64-NEXT: note: valid target CPU values are: generic-rv64, rocket-rv64, sifive-p450, sifive-p670, sifive-s21, sifive-s51, sifive-s54, sifive-s76, sifive-u54, sifive-u74, sifive-x280, spacemit-x60, veyron-v1, xiangshan-nanhu{{$}} +// RISCV64-NEXT: note: valid target CPU values are: generic-rv64, rocket-rv64, sifive-p450, sifive-p670, sifive-s21, sifive-s51, sifive-s54, sifive-s76, sifive-u54, sifive-u74, sifive-x280, spacemit-x60, syntacore-scr3-rv64, veyron-v1, xiangshan-nanhu{{$}} // RUN: not %clang_cc1 -triple riscv32 -tune-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix TUNE-RISCV32 // TUNE-RISCV32: error: unknown target CPU 'not-a-cpu' -// TUNE-RISCV32-NEXT: note: valid target CPU values are: generic-rv32, rocket-rv32, sifive-e20, sifive-e21, sifive-e24, sifive-e31, sifive-e34, sifive-e76, syntacore-scr1-base, syntacore-scr1-max, generic, rocket, sifive-7-series{{$}} +// TUNE-RISCV32-NEXT: note: valid target CPU values are: generic-rv32, rocket-rv32, sifive-e20, sifive-e21, sifive-e24, sifive-e31, sifive-e34, sifive-e76, syntacore-scr1-base, syntacore-scr1-max, syntacore-scr3-rv32, generic, rocket, sifive-7-series{{$}} // RUN: not %clang_cc1 -triple riscv64 -tune-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix TUNE-RISCV64 // TUNE-RISCV64: error: unknown target CPU 'not-a-cpu' -// TUNE-RISCV64-NEXT: note: valid target CPU values are: generic-rv64, rocket-rv64, sifive-p450, sifive-p670, sifive-s21, sifive-s51, sifive-s54, sifive-s76, sifive-u54, sifive-u74, sifive-x280, spacemit-x60, veyron-v1, xiangshan-nanhu, generic, rocket, sifive-7-series{{$}} +// TUNE-RISCV64-NEXT: note: valid target CPU values are: generic-rv64, rocket-rv64, sifive-p450, sifive-p670, sifive-s21, sifive-s51, sifive-s54, sifive-s76, sifive-u54, sifive-u74, sifive-x280, spacemit-x60, syntacore-scr3-rv64, veyron-v1, xiangshan-nanhu, generic, rocket, sifive-7-series{{$}} diff --git a/clang/test/Modules/Inputs/initializer_list/direct.h b/clang/test/Modules/Inputs/initializer_list/direct.h index 6058f803a3dde30..6f3978ef1328461 100644 --- a/clang/test/Modules/Inputs/initializer_list/direct.h +++ b/clang/test/Modules/Inputs/initializer_list/direct.h @@ -2,7 +2,7 @@ namespace std { using size_t = decltype(sizeof(0)); template struct initializer_list { - initializer_list(T*, size_t); + const T* ptr; size_t sz; }; template int min(initializer_list); diff --git a/clang/test/Modules/decl-params-determinisim.m b/clang/test/Modules/decl-params-determinisim.m index 9cf37ac4334cf10..db4ed3326538856 100644 --- a/clang/test/Modules/decl-params-determinisim.m +++ b/clang/test/Modules/decl-params-determinisim.m @@ -28,23 +28,23 @@ // CHECK: /dev/null + +//--- A.cppm +export module A; +export int a(); + +//--- A.v1.cppm +export module A; +export int a(); +export int a2(); + +//--- B.cppm +export module B; +import A; +export int b() { return a(); } diff --git a/clang/test/Modules/no-transitive-identifier-change.cppm b/clang/test/Modules/no-transitive-identifier-change.cppm index 97e8ac4444fdd4f..541c8ae754960b0 100644 --- a/clang/test/Modules/no-transitive-identifier-change.cppm +++ b/clang/test/Modules/no-transitive-identifier-change.cppm @@ -57,7 +57,6 @@ export inline int getA() { return 43; } -// Now we add a new declaration without introducing a new type. // The consuming module which didn't use m:partA completely is expected to be // not changed. export inline int getA2() { @@ -67,7 +66,7 @@ export inline int getA2() { export class A { public: int getMem(); - // Now we add a new declaration without introducing a new type. + // The consuming module which didn't use m:partA completely is expected to be // not changed. int getMem2(); @@ -77,7 +76,6 @@ export template class ATempl { public: T getT(); - // Add a new declaration without introducing a new type. T getT2(); }; diff --git a/clang/test/Modules/no-transitive-type-change.cppm b/clang/test/Modules/no-transitive-type-change.cppm new file mode 100644 index 000000000000000..9ec72e851b17dc5 --- /dev/null +++ b/clang/test/Modules/no-transitive-type-change.cppm @@ -0,0 +1,80 @@ +// Testing that changing a type in an unused module file won't change +// the BMI of the current module file. +// +// RUN: rm -rf %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/m-partA.cppm -emit-reduced-module-interface -o %t/m-partA.pcm +// RUN: %clang_cc1 -std=c++20 %t/m-partA.v1.cppm -emit-reduced-module-interface -o \ +// RUN: %t/m-partA.v1.pcm +// RUN: %clang_cc1 -std=c++20 %t/m-partB.cppm -emit-reduced-module-interface -o %t/m-partB.pcm +// RUN: %clang_cc1 -std=c++20 %t/m.cppm -emit-reduced-module-interface -o %t/m.pcm \ +// RUN: -fmodule-file=m:partA=%t/m-partA.pcm -fmodule-file=m:partB=%t/m-partB.pcm +// RUN: %clang_cc1 -std=c++20 %t/m.cppm -emit-reduced-module-interface -o %t/m.v1.pcm \ +// RUN: -fmodule-file=m:partA=%t/m-partA.v1.pcm -fmodule-file=m:partB=%t/m-partB.pcm +// +// RUN: %clang_cc1 -std=c++20 %t/useBOnly.cppm -emit-reduced-module-interface -o %t/useBOnly.pcm \ +// RUN: -fmodule-file=m=%t/m.pcm -fmodule-file=m:partA=%t/m-partA.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm +// RUN: %clang_cc1 -std=c++20 %t/useBOnly.cppm -emit-reduced-module-interface -o %t/useBOnly.v1.pcm \ +// RUN: -fmodule-file=m=%t/m.v1.pcm -fmodule-file=m:partA=%t/m-partA.v1.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm +// Since useBOnly only uses partB from module M, the change in partA shouldn't affect +// useBOnly. +// RUN: diff %t/useBOnly.pcm %t/useBOnly.v1.pcm &> /dev/null +// +// RUN: %clang_cc1 -std=c++20 %t/useAOnly.cppm -emit-reduced-module-interface -o %t/useAOnly.pcm \ +// RUN: -fmodule-file=m=%t/m.pcm -fmodule-file=m:partA=%t/m-partA.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm +// RUN: %clang_cc1 -std=c++20 %t/useAOnly.cppm -emit-reduced-module-interface -o %t/useAOnly.v1.pcm \ +// RUN: -fmodule-file=m=%t/m.v1.pcm -fmodule-file=m:partA=%t/m-partA.v1.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm +// Since useAOnly uses partA from module M, the change in partA should affect useAOnly. +// RUN: not diff %t/useAOnly.pcm %t/useAOnly.v1.pcm &> /dev/null + +//--- m-partA.cppm +export module m:partA; + +export int getValueFromA() { return 43; } + +//--- m-partA.v1.cppm +export module m:partA; + +export int getValueFromA() { return 43; } + +namespace NS { + class A { + public: + int getValue() { + return 43; + } + }; +} + +//--- m-partB.cppm +export module m:partB; + +export inline int getB() { + return 430; +} + +//--- m.cppm +export module m; +export import :partA; +export import :partB; + +//--- useBOnly.cppm +export module useBOnly; +import m; + +export inline int get() { + return getB(); +} + +//--- useAOnly.cppm +export module useAOnly; +import m; + +export inline int get() { + return getValueFromA(); +} diff --git a/clang/test/Modules/pr60775.cppm b/clang/test/Modules/pr60775.cppm index 35eb92512f42774..76aec488088678b 100644 --- a/clang/test/Modules/pr60775.cppm +++ b/clang/test/Modules/pr60775.cppm @@ -29,9 +29,10 @@ namespace std { typedef decltype(sizeof(int)) size_t; template struct initializer_list { + const T* ptr; size_t sz; initializer_list(const T *, size_t); - T* begin(); - T* end(); + const T* begin(); + const T* end(); }; } diff --git a/clang/test/Modules/transitive-adl-change.cppm b/clang/test/Modules/transitive-adl-change.cppm new file mode 100644 index 000000000000000..bc068f06a2b7b33 --- /dev/null +++ b/clang/test/Modules/transitive-adl-change.cppm @@ -0,0 +1,112 @@ +// Test that a change related to an ADL can be propagated correctly. +// +// RUN: rm -rf %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/Common.cppm -emit-reduced-module-interface -o %t/Common.pcm +// +// RUN: %clang_cc1 -std=c++20 %t/m-partA.cppm -emit-reduced-module-interface -o %t/m-partA.pcm \ +// RUN: -fmodule-file=Common=%t/Common.pcm +// RUN: %clang_cc1 -std=c++20 %t/m-partA.v1.cppm -emit-reduced-module-interface -o \ +// RUN: %t/m-partA.v1.pcm -fmodule-file=Common=%t/Common.pcm +// RUN: %clang_cc1 -std=c++20 %t/m-partB.cppm -emit-reduced-module-interface -o %t/m-partB.pcm +// RUN: %clang_cc1 -std=c++20 %t/m.cppm -emit-reduced-module-interface -o %t/m.pcm \ +// RUN: -fmodule-file=m:partA=%t/m-partA.pcm -fmodule-file=m:partB=%t/m-partB.pcm \ +// RUN: -fmodule-file=Common=%t/Common.pcm +// RUN: %clang_cc1 -std=c++20 %t/m.cppm -emit-reduced-module-interface -o %t/m.v1.pcm \ +// RUN: -fmodule-file=m:partA=%t/m-partA.v1.pcm -fmodule-file=m:partB=%t/m-partB.pcm \ +// RUN: -fmodule-file=Common=%t/Common.pcm +// +// Produce B.pcm and B.v1.pcm +// RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-reduced-module-interface -o %t/B.pcm \ +// RUN: -fmodule-file=m=%t/m.pcm -fmodule-file=m:partA=%t/m-partA.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm -fmodule-file=Common=%t/Common.pcm +// RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-reduced-module-interface -o %t/B.v1.pcm \ +// RUN: -fmodule-file=m=%t/m.v1.pcm -fmodule-file=m:partA=%t/m-partA.v1.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm -fmodule-file=Common=%t/Common.pcm +// +// Verify that both B.pcm and B.v1.pcm can work as expected. +// RUN: %clang_cc1 -std=c++20 %t/use.cpp -fsyntax-only -verify -fmodule-file=m=%t/m.pcm \ +// RUN: -fmodule-file=m:partA=%t/m-partA.pcm -fmodule-file=m:partB=%t/m-partB.pcm \ +// RUN: -fmodule-file=B=%t/B.pcm -fmodule-file=Common=%t/Common.pcm \ +// RUN: -DEXPECTED_VALUE=false +// RUN: %clang_cc1 -std=c++20 %t/use.cpp -fsyntax-only -verify -fmodule-file=m=%t/m.v1.pcm \ +// RUN: -fmodule-file=m:partA=%t/m-partA.v1.pcm -fmodule-file=m:partB=%t/m-partB.pcm \ +// RUN: -fmodule-file=B=%t/B.v1.pcm -fmodule-file=Common=%t/Common.pcm \ +// RUN: -DEXPECTED_VALUE=true +// +// Since we add new ADL function in m-partA.v1.cppm, B.v1.pcm is expected to not be the same with +// B.pcm. +// RUN: not diff %t/B.pcm %t/B.v1.pcm &> /dev/null + +// Test that BMI won't differ if it doesn't refer adl. +// RUN: %clang_cc1 -std=c++20 %t/C.cppm -emit-reduced-module-interface -o %t/C.pcm \ +// RUN: -fmodule-file=m=%t/m.pcm -fmodule-file=m:partA=%t/m-partA.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm -fmodule-file=Common=%t/Common.pcm +// RUN: %clang_cc1 -std=c++20 %t/C.cppm -emit-reduced-module-interface -o %t/C.v1.pcm \ +// RUN: -fmodule-file=m=%t/m.v1.pcm -fmodule-file=m:partA=%t/m-partA.v1.pcm \ +// RUN: -fmodule-file=m:partB=%t/m-partB.pcm -fmodule-file=Common=%t/Common.pcm +// RUN: diff %t/C.pcm %t/C.v1.pcm &> /dev/null + +//--- Common.cppm +export module Common; + +export namespace N { + struct A { + constexpr operator int() { + return 43; + } + }; +} + +//--- m-partA.cppm +export module m:partA; +import Common; + +export namespace N {} + +//--- m-partA.v1.cppm +export module m:partA; +import Common; + +export namespace N { +constexpr bool adl(A) { return true; } +} + +//--- m-partB.cppm +export module m:partB; + +export constexpr bool adl(int) { return false; } + +//--- m.cppm +export module m; +export import :partA; +export import :partB; + +//--- B.cppm +export module B; +import m; + +export template +constexpr bool test_adl(C c) { + return adl(c); +} + +//--- use.cpp +// expected-no-diagnostics +import B; +import Common; + +void test() { + N::A a; + static_assert(test_adl(a) == EXPECTED_VALUE); +} + +//--- C.cppm +export module B; +import m; + +export template +constexpr bool not_test_adl(C c) { + return false; +} diff --git a/clang/test/OpenMP/declare_reduction_codegen_in_templates.cpp b/clang/test/OpenMP/declare_reduction_codegen_in_templates.cpp index 7689cfc11f62725..76c5675c8385673 100644 --- a/clang/test/OpenMP/declare_reduction_codegen_in_templates.cpp +++ b/clang/test/OpenMP/declare_reduction_codegen_in_templates.cpp @@ -16,7 +16,7 @@ #ifndef HEADER #define HEADER -typedef long unsigned a; +typedef decltype(sizeof 0) a; namespace std { template class initializer_list { const int *b; diff --git a/clang/test/Preprocessor/Inputs/jk.txt b/clang/test/Preprocessor/Inputs/jk.txt new file mode 100644 index 000000000000000..93d177a48c83ab8 --- /dev/null +++ b/clang/test/Preprocessor/Inputs/jk.txt @@ -0,0 +1 @@ +jk \ No newline at end of file diff --git a/clang/test/Preprocessor/Inputs/media/art.txt b/clang/test/Preprocessor/Inputs/media/art.txt new file mode 100644 index 000000000000000..1ce9ab967e4a154 --- /dev/null +++ b/clang/test/Preprocessor/Inputs/media/art.txt @@ -0,0 +1,9 @@ + __ _ + .-.' `; `-._ __ _ + (_, .-:' `; `-._ + ,'o"( (_, ) + (__,-' ,'o"( )> + ( (__,-' ) + `-'._.--._( ) + ||| |||`-'._.--._.-' + ||| ||| diff --git a/clang/test/Preprocessor/Inputs/media/empty b/clang/test/Preprocessor/Inputs/media/empty new file mode 100644 index 000000000000000..e69de29bb2d1d64 diff --git a/clang/test/Preprocessor/Inputs/numbers.txt b/clang/test/Preprocessor/Inputs/numbers.txt new file mode 100644 index 000000000000000..11f11f9be3babdb --- /dev/null +++ b/clang/test/Preprocessor/Inputs/numbers.txt @@ -0,0 +1 @@ +0123456789 diff --git a/clang/test/Preprocessor/Inputs/single_byte.txt b/clang/test/Preprocessor/Inputs/single_byte.txt new file mode 100644 index 000000000000000..63d8dbd40c23542 --- /dev/null +++ b/clang/test/Preprocessor/Inputs/single_byte.txt @@ -0,0 +1 @@ +b \ No newline at end of file diff --git a/clang/test/Preprocessor/embed___has_embed.c b/clang/test/Preprocessor/embed___has_embed.c new file mode 100644 index 000000000000000..43a3068b5f53ad1 --- /dev/null +++ b/clang/test/Preprocessor/embed___has_embed.c @@ -0,0 +1,60 @@ +// RUN: %clang_cc1 -std=c23 %s -E --embed-dir=%S/Inputs -verify +// expected-no-diagnostics + +#if __has_embed(__FILE__) != __STDC_EMBED_FOUND__ +#error 1 +#elif __has_embed("media/art.txt") != __STDC_EMBED_FOUND__ +#error 2 +#elif __has_embed("asdkasdjkadsjkdsfjk") != __STDC_EMBED_NOT_FOUND__ +#error 3 +#elif __has_embed("asdkasdjkadsjkdsfjk" limit(1)) != __STDC_EMBED_NOT_FOUND__ +#error 4 +#elif __has_embed("asdkasdjkadsjkdsfjk" suffix(x) limit(1)) != __STDC_EMBED_NOT_FOUND__ +#error 5 +#elif __has_embed("asdkasdjkadsjkdsfjk" suffix(x) djsakdasjd::xmeow("xD")) != __STDC_EMBED_NOT_FOUND__ +#error 6 +#elif __has_embed(__FILE__ limit(2) prefix(y)) != __STDC_EMBED_FOUND__ +#error 7 +#elif __has_embed(__FILE__ limit(2)) != __STDC_EMBED_FOUND__ +#error 8 +// 6.10.1p7, if the search fails or any of the embed parameters in the embed +// parameter sequence specified are not supported by the implementation for the +// #embed directive; +// We don't support one of the embed parameters. +#elif __has_embed(__FILE__ dajwdwdjdahwk::meow(x)) != __STDC_EMBED_NOT_FOUND__ +#error 9 +#elif __has_embed() != __STDC_EMBED_EMPTY__ +#error 10 +// 6.10.1p7: if the search for the resource succeeds and all embed parameters +// in the embed parameter sequence specified are supported by the +// implementation for the #embed directive and the resource is empty +// Limiting to zero characters means the resource is empty. +#elif __has_embed( limit(0)) != __STDC_EMBED_EMPTY__ +#error 11 +#elif __has_embed( limit(0)) != __STDC_EMBED_EMPTY__ +#error 12 +// Test that an offset past the end of the file produces an empty file. +#elif __has_embed( clang::offset(1)) != __STDC_EMBED_EMPTY__ +#error 13 +// Test that we apply the offset before we apply the limit. If we did this in +// the reverse order, this would cause the file to be empty because we would +// have limited it to 1 byte and then offset past it. +#elif __has_embed( limit(1) clang::offset(12)) != __STDC_EMBED_FOUND__ +#error 14 +#elif __has_embed() != __STDC_EMBED_FOUND__ +#error 15 +#elif __has_embed( if_empty(meow)) != __STDC_EMBED_FOUND__ +#error 16 +#endif + +// Ensure that when __has_embed returns true, the file can actually be +// embedded. This was previously failing because the way in which __has_embed +// would search for files was differentl from how #embed would resolve them +// when the file path included relative path markers like `./` or `../`. +#if __has_embed("./embed___has_embed.c") == __STDC_EMBED_FOUND__ +unsigned char buffer[] = { +#embed "./embed___has_embed.c" +}; +#else +#error 17 +#endif diff --git a/clang/test/Preprocessor/embed___has_embed_parsing_errors.c b/clang/test/Preprocessor/embed___has_embed_parsing_errors.c new file mode 100644 index 000000000000000..fcaf693fe0ff2bc --- /dev/null +++ b/clang/test/Preprocessor/embed___has_embed_parsing_errors.c @@ -0,0 +1,240 @@ +// RUN: %clang_cc1 -std=c23 %s -E -verify + +// Test the parsing behavior for __has_embed and all of its parameters to ensure we +// recover from failures gracefully. + +// expected-error@+2 {{missing '(' after '__has_embed'}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed +#endif + +// expected-error@+3 {{expected '>'}} \ + expected-note@+3 {{to match this '<'}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed(<) +#endif + +// expected-error@+3 {{expected "FILENAME" or }} \ + expected-warning@+3 {{missing terminating '"' character}} \ + expected-error@+3 {{invalid token at start of a preprocessor expression}} +#if __has_embed(") +#endif + +// expected-error@+2 {{missing '(' after '__has_embed'}} \ + expected-error@+2 {{token is not a valid binary operator in a preprocessor subexpression}} +#if __has_embed file.txt +#endif + +// OK, no diagnostic for an unknown embed parameter. +#if __has_embed("media/empty" xxx) +#endif + +// expected-error@+2 {{expected identifier}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" xxx::) +#endif + +// OK, no diagnostic for an unknown embed parameter. +#if __has_embed("media/empty" xxx::xxx) +#endif + +// expected-error@+2 {{expected identifier}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" xxx::42) +#endif + +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" limit) +#endif + +// We get the same diagnostic twice intentionally. The first one is because of +// the missing value within limit() and the second one is because the #if does +// not resolve to a value due to the earlier error. +// expected-error@+1 2 {{expected value in expression}} +#if __has_embed("media/empty" limit() +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" limit(xxx) +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" limit(42) +#endif + +// expected-error@+2 {{invalid token at start of a preprocessor expression}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" limit([) +#endif + +// expected-error@+2 {{invalid token at start of a preprocessor expression}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" limit([)) +#endif + +// expected-error@+2 {{division by zero in preprocessor expression}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" limit(1/0)) +#endif + +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" clang::offset) +#endif + +// We get the same diagnostic twice intentionally. The first one is because of +// the missing value within clang::offset() and the second one is because the +// #if does not resolve to a value due to the earlier error. +// expected-error@+1 2 {{expected value in expression}} +#if __has_embed("media/empty" clang::offset() +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" clang::offset(xxx) +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" clang::offset(42) +#endif + +// expected-error@+2 {{invalid token at start of a preprocessor expression}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" clang::offset([) +#endif + +// expected-error@+2 {{invalid token at start of a preprocessor expression}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" clang::offset([)) +#endif + +// expected-error@+2 {{division by zero in preprocessor expression}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" clang::offset(1/0)) +#endif + +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" clang::offset 42) +#endif + +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" prefix) +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" prefix() +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" prefix(xxx) +#endif + +#if __has_embed("media/empty" prefix(1/0)) // OK: emitted as tokens, not evaluated yet. +#endif +#if __has_embed("media/empty" prefix(([{}]))) // OK: delimiters balanced +#endif +// expected-error@+3 {{expected '}'}} \ + expected-note@+3 {{to match this '{'}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/empty" prefix(([{)]})) +#endif +// expected-error@+3 {{expected ']'}} \ + expected-note@+3 {{to match this '['}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/empty" prefix(([{})})) +#endif +// expected-error@+3 {{expected ')'}} \ + expected-note@+3 {{to match this '('}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/empty" prefix(([{}]})) +#endif +#if __has_embed("media/empty" prefix()) // OK: tokens within parens are optional +#endif +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" prefix)) +#endif + +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" suffix) +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" suffix() +#endif + +// expected-error@+3 {{missing ')' after '__has_embed'}} \ + expected-error@+3 {{expected value in expression}} \ + expected-note@+3 {{to match this '('}} +#if __has_embed("media/empty" suffix(xxx) +#endif + +#if __has_embed("media/empty" suffix(1/0)) // OK: emitted as tokens, not evaluated yet. +#endif +#if __has_embed("media/empty" suffix(([{}]))) // OK: delimiters balanced +#endif +// expected-error@+3 {{expected '}'}} \ + expected-note@+3 {{to match this '{'}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/empty" suffix(([{)]})) +#endif +// expected-error@+3 {{expected ']'}} \ + expected-note@+3 {{to match this '['}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/empty" suffix(([{})})) +#endif +// expected-error@+3 {{expected ')'}} \ + expected-note@+3 {{to match this '('}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/empty" suffix(([{}]})) +#endif +#if __has_embed("media/empty" suffix()) // OK: tokens within parens are optional +#endif +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/empty" suffix)) +#endif + +#if __has_embed("media/art.txt" if_empty(1/0)) // OK: emitted as tokens, not evaluated yet. +#endif +#if __has_embed("media/art.txt" if_empty(([{}]))) // OK: delimiters balanced +#endif +// expected-error@+3 {{expected '}'}} \ + expected-note@+3 {{to match this '{'}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/art.txt" if_empty(([{)]})) +#endif +// expected-error@+3 {{expected ']'}} \ + expected-note@+3 {{to match this '['}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/art.txt" if_empty(([{})})) +#endif +// expected-error@+3 {{expected ')'}} \ + expected-note@+3 {{to match this '('}} \ + expected-error@+3 {{expected value in expression}} +#if __has_embed("media/art.txt" if_empty(([{}]})) +#endif +#if __has_embed("media/art.txt" if_empty()) // OK: tokens within parens are optional +#endif +// expected-error@+2 {{expected '('}} \ + expected-error@+2 {{expected value in expression}} +#if __has_embed("media/art.txt" if_empty)) +#endif + diff --git a/clang/test/Preprocessor/embed___has_embed_supported.c b/clang/test/Preprocessor/embed___has_embed_supported.c new file mode 100644 index 000000000000000..e51dbb870372bc6 --- /dev/null +++ b/clang/test/Preprocessor/embed___has_embed_supported.c @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -std=c23 %s -E -verify + +#if __has_embed(__FILE__) != __STDC_EMBED_FOUND__ +#error 1 +#elif __has_embed(__FILE__) != __STDC_EMBED_FOUND__ +#error 2 +#elif __has_embed(__FILE__ suffix(x)) != __STDC_EMBED_FOUND__ +#error 3 +#elif __has_embed(__FILE__ suffix(x) limit(1)) != __STDC_EMBED_FOUND__ +#error 4 +#elif __has_embed(__FILE__ suffix(x) limit(1) prefix(1)) != __STDC_EMBED_FOUND__ +#error 5 +#elif __has_embed(__FILE__ suffix(x) limit(2) prefix(1) clang::offset(1)) != __STDC_EMBED_FOUND__ +#error 6 +#elif __has_embed(__FILE__ suffix(x) limit(0) prefix(1)) != __STDC_EMBED_EMPTY__ +#error 7 +#elif __has_embed(__FILE__ suffix(x) limit(1) prefix(1) clang::offset(1)) != __STDC_EMBED_FOUND__ +#error 8 +#elif __has_embed(__FILE__ suffix(x) limit(0)) != __STDC_EMBED_EMPTY__ +#error 9 +#elif __has_embed(__FILE__ suffix(x) limit(0) if_empty(:3)) != __STDC_EMBED_EMPTY__ +#error 10 +#endif +// expected-no-diagnostics diff --git a/clang/test/Preprocessor/embed_art.c b/clang/test/Preprocessor/embed_art.c new file mode 100644 index 000000000000000..a664715091319f9 --- /dev/null +++ b/clang/test/Preprocessor/embed_art.c @@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify +// expected-no-diagnostics + +const char data[] = { +#embed +}; +const char data2[] = { +#embed +, 0 +}; +const char data3[] = { +#embed suffix(, 0) +}; +const char data4[] = { +#embed suffix(,) +0 +}; +static_assert(sizeof(data) == 274); +static_assert(' ' == data[0]); +static_assert('_' == data[11]); +static_assert('\n' == data[273]); +static_assert(sizeof(data2) == 275); +static_assert(' ' == data2[0]); +static_assert('_' == data2[11]); +static_assert('\n' == data2[273]); +static_assert('\0' == data2[274]); +static_assert(sizeof(data3) == 275); +static_assert(' ' == data3[0]); +static_assert('_' == data3[11]); +static_assert('\n' == data3[273]); +static_assert('\0' == data3[274]); +static_assert(sizeof(data4) == 275); +static_assert(' ' == data4[0]); +static_assert('_' == data4[11]); +static_assert('\n' == data4[273]); +static_assert('\0' == data4[274]); + +const signed char data5[] = { +#embed +}; +const signed char data6[] = { +#embed +, 0 +}; +const signed char data7[] = { +#embed suffix(, 0) +}; +const signed char data8[] = { +#embed suffix(,) +0 +}; +static_assert(sizeof(data5) == 274); +static_assert(' ' == data5[0]); +static_assert('_' == data5[11]); +static_assert('\n' == data5[273]); +static_assert(sizeof(data6) == 275); +static_assert(' ' == data6[0]); +static_assert('_' == data6[11]); +static_assert('\n' == data6[273]); +static_assert('\0' == data6[274]); +static_assert(sizeof(data7) == 275); +static_assert(' ' == data7[0]); +static_assert('_' == data7[11]); +static_assert('\n' == data7[273]); +static_assert('\0' == data7[274]); +static_assert(sizeof(data8) == 275); +static_assert(' ' == data8[0]); +static_assert('_' == data8[11]); +static_assert('\n' == data8[273]); +static_assert('\0' == data8[274]); + +const unsigned char data9[] = { +#embed +}; +const unsigned char data10[] = { +0, +#embed +}; +const unsigned char data11[] = { +#embed prefix(0,) +}; +const unsigned char data12[] = { +0 +#embed prefix(,) +}; +static_assert(sizeof(data9) == 274); +static_assert(' ' == data9[0]); +static_assert('_' == data9[11]); +static_assert('\n' == data9[273]); +static_assert(sizeof(data10) == 275); +static_assert(' ' == data10[1]); +static_assert('_' == data10[12]); +static_assert('\n' == data10[274]); +static_assert('\0' == data10[0]); +static_assert(sizeof(data11) == 275); +static_assert(' ' == data11[1]); +static_assert('_' == data11[12]); +static_assert('\n' == data11[274]); +static_assert('\0' == data11[0]); +static_assert(sizeof(data12) == 275); +static_assert(' ' == data12[1]); +static_assert('_' == data12[12]); +static_assert('\n' == data12[274]); +static_assert('\0' == data12[0]); diff --git a/clang/test/Preprocessor/embed_codegen.cpp b/clang/test/Preprocessor/embed_codegen.cpp new file mode 100644 index 000000000000000..64110afc162d726 --- /dev/null +++ b/clang/test/Preprocessor/embed_codegen.cpp @@ -0,0 +1,84 @@ +// RUN: %clang_cc1 %s -triple x86_64 --embed-dir=%S/Inputs -emit-llvm -o - | FileCheck %s + +// CHECK: @__const._Z3fooi.ca = private unnamed_addr constant [3 x i32] [i32 0, i32 106, i32 107], align 4 +// CHECK: @__const._Z3fooi.sc = private unnamed_addr constant %struct.S1 { i32 106, i32 107, i32 0 }, align 4 +// CHECK: @__const._Z3fooi.t = private unnamed_addr constant [3 x %struct.T] [%struct.T { [2 x i32] [i32 48, i32 49], %struct.S1 { i32 50, i32 51, i32 52 } }, %struct.T { [2 x i32] [i32 53, i32 54], %struct.S1 { i32 55, i32 56, i32 57 } }, %struct.T { [2 x i32] [i32 10, i32 0], %struct.S1 zeroinitializer }], align 16 +void foo(int a) { +// CHECK: %a.addr = alloca i32, align 4 +// CHECK: store i32 %a, ptr %a.addr, align 4 +// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %ca, ptr align 4 @__const._Z3fooi.ca, i64 12, i1 false) +int ca[] = { +0 +#embed prefix(,) +}; + +// CHECK: %arrayinit.element = getelementptr inbounds i32, ptr %notca, i64 1 +// CHECK: store i8 106, ptr %arrayinit.element, align 4 +// CHECK: %arrayinit.element1 = getelementptr inbounds i32, ptr %notca, i64 2 +// CHECK: store i8 107, ptr %arrayinit.element1, align 4 +int notca[] = { +a +#embed prefix(,) +}; + +struct S1 { + int x, y, z; +}; + +// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %sc, ptr align 4 @__const._Z3fooi.sc, i64 12, i1 false) +S1 sc = { +#embed suffix(,) +0 +}; + +// CHECK: %x = getelementptr inbounds %struct.S1, ptr %s, i32 0, i32 0 +// CHECK: store i32 106, ptr %x, align 4 +// CHECK: %y = getelementptr inbounds %struct.S1, ptr %s, i32 0, i32 1 +// CHECK: store i32 107, ptr %y, align 4 +// CHECK: %z = getelementptr inbounds %struct.S1, ptr %s, i32 0, i32 2 +// CHECK: %1 = load i32, ptr %a.addr, align 4 +S1 s = { +#embed suffix(,) +a +}; + +// CHECK: store i32 107, ptr %b, align 4 +int b = +#embed +; + + +struct T { + int arr[2]; + struct S1 s; +}; + +// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 16 %t, ptr align 16 @__const._Z3fooi.t, i64 60, i1 false) +constexpr struct T t[] = { +#embed +}; + +// CHECK: %arr = getelementptr inbounds %struct.T, ptr %tnonc, i32 0, i32 0 +// CHECK: %2 = load i32, ptr %a.addr, align 4 +// CHECK: store i32 %2, ptr %arr, align 4 +// CHECK: %arrayinit.element2 = getelementptr inbounds i32, ptr %arr, i64 1 +// CHECK: store i32 300, ptr %arrayinit.element2, align 4 +// CHECK: %s3 = getelementptr inbounds %struct.T, ptr %tnonc, i32 0, i32 1 +// CHECK: %x4 = getelementptr inbounds %struct.S1, ptr %s3, i32 0, i32 0 +// CHECK: store i32 1, ptr %x4, align 4 +// CHECK: %y5 = getelementptr inbounds %struct.S1, ptr %s3, i32 0, i32 1 +// CHECK: store i32 2, ptr %y5, align 4 +// CHECK: %z6 = getelementptr inbounds %struct.S1, ptr %s3, i32 0, i32 2 +// CHECK: store i32 3, ptr %z6, align 4 +// CHECK: %arrayinit.element7 = getelementptr inbounds %struct.T, ptr %tnonc, i64 1 +// CHECK: call void @llvm.memset.p0.i64(ptr align 4 %arrayinit.element7, i8 0, i64 20, i1 false) +// CHECK: %arr8 = getelementptr inbounds %struct.T, ptr %arrayinit.element7, i32 0, i32 0 +// CHECK: store i8 106, ptr %arr8, align 4 +// CHECK: %arrayinit.element9 = getelementptr inbounds i32, ptr %arr8, i64 1 +// CHECK: store i8 107, ptr %arrayinit.element9, align 4 +struct T tnonc[] = { + a, 300, 1, 2, 3 +#embed prefix(,) +}; + +} diff --git a/clang/test/Preprocessor/embed_constexpr.cpp b/clang/test/Preprocessor/embed_constexpr.cpp new file mode 100644 index 000000000000000..1cadff76b4890ad --- /dev/null +++ b/clang/test/Preprocessor/embed_constexpr.cpp @@ -0,0 +1,97 @@ +// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify -Wno-c23-extensions +// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify -fexperimental-new-constant-interpreter -Wno-c23-extensions + +constexpr int value(int a, int b) { + return a + b; +} + +constexpr int func_call() { + return value( +#embed + ); +} + +constexpr int init_list_expr() { + int vals[] = { +#embed + }; + return value(vals[0], vals[1]); +} + +template +struct Hurr { + static constexpr int V1 = N; + static constexpr int V2 = M; +}; + +constexpr int template_args() { + Hurr< +#embed + > H; + return value(H.V1, H.V2); +} + +constexpr int ExpectedValue = 'j' + 'k'; +static_assert(func_call() == ExpectedValue); +static_assert(init_list_expr() == ExpectedValue); +static_assert(template_args() == ExpectedValue); + +static_assert( +#embed limit(1) suffix(== 'j') +); + +int array[ +#embed limit(1) +]; +static_assert(sizeof(array) / sizeof(int) == 'j'); + +constexpr int comma_expr = ( +#embed // expected-warning {{left operand of comma operator has no effect}} +); +static_assert(comma_expr == 'k'); + +constexpr int comma_expr_init_list{ ( +#embed limit(1) +) }; +static_assert(comma_expr_init_list == 'j'); + +constexpr int paren_init( +#embed limit(1) +); +static_assert(paren_init == 'j'); + +struct S { + const char buffer[2] = { +#embed "jk.txt" + }; +}; + +constexpr struct S s; +static_assert(s.buffer[1] == 'k'); + +struct S1 { + int x, y; +}; + +struct T { + int x, y; + struct S1 s; +}; + +constexpr struct T t[] = { +#embed +}; +static_assert(t[0].s.x == '2'); + +constexpr int func(int i, int) { return i; } +static_assert( + func( +#embed + ) == 'j'); + +template +struct ST {}; + +ST< +#embed limit(1) +> st; diff --git a/clang/test/Preprocessor/embed_dependencies.c b/clang/test/Preprocessor/embed_dependencies.c new file mode 100644 index 000000000000000..4e00dc79ac190b4 --- /dev/null +++ b/clang/test/Preprocessor/embed_dependencies.c @@ -0,0 +1,20 @@ +// RUN: %clang %s -fsyntax-only -std=c23 -M --embed-dir=%S/Inputs -Xclang -verify | FileCheck %s + +// Yes this looks very strange indeed, but the goal is to test that we add +// files referenced by both __has_embed and #embed when we generate +// dependencies, so we're trying to see that both of these files are in the +// output. +#if __has_embed() +const char data = +#embed "Inputs/single_byte.txt" +; +_Static_assert('b' == data); +#else +#error "oops" +#endif +// expected-no-diagnostics + +// CHECK: embed_dependencies.c \ +// CHECK-NEXT: jk.txt \ +// CHECK-NEXT: Inputs{{[/\\]}}single_byte.txt + diff --git a/clang/test/Preprocessor/embed_ext_compat_diags.c b/clang/test/Preprocessor/embed_ext_compat_diags.c new file mode 100644 index 000000000000000..74f24176d9ccabc --- /dev/null +++ b/clang/test/Preprocessor/embed_ext_compat_diags.c @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify=none -pedantic +// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify=compat -Wpre-c23-compat +// RUN: %clang_cc1 -std=c17 %s -fsyntax-only --embed-dir=%S/Inputs -verify=ext -pedantic +// RUN: %clang_cc1 -x c++ %s -fsyntax-only --embed-dir=%S/Inputs -verify=cxx -pedantic +// none-no-diagnostics + +#if __has_embed("jk.txt") + +const char buffer[] = { +#embed "jk.txt" /* compat-warning {{#embed is incompatible with C standards before C23}} + ext-warning {{#embed is a C23 extension}} + cxx-warning {{#embed is a Clang extension}} + */ +}; +#endif + diff --git a/clang/test/Preprocessor/embed_feature_test.cpp b/clang/test/Preprocessor/embed_feature_test.cpp new file mode 100644 index 000000000000000..2648804132599b9 --- /dev/null +++ b/clang/test/Preprocessor/embed_feature_test.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 %s -E -CC -verify +// RUN: %clang_cc1 -x c %s -E -CC -verify +// expected-no-diagnostics + +#if !defined(__has_embed) +#error 1 +#endif diff --git a/clang/test/Preprocessor/embed_file_not_found_chevron.c b/clang/test/Preprocessor/embed_file_not_found_chevron.c new file mode 100644 index 000000000000000..472222aafa55a0d --- /dev/null +++ b/clang/test/Preprocessor/embed_file_not_found_chevron.c @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -std=c23 %s -E -verify + +#embed +// expected-error@-1 {{'nfejfNejAKFe' file not found}} diff --git a/clang/test/Preprocessor/embed_file_not_found_quote.c b/clang/test/Preprocessor/embed_file_not_found_quote.c new file mode 100644 index 000000000000000..bf9c62b55c99ef6 --- /dev/null +++ b/clang/test/Preprocessor/embed_file_not_found_quote.c @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -std=c23 %s -E -verify + +#embed "nfejfNejAKFe" +// expected-error@-1 {{'nfejfNejAKFe' file not found}} diff --git a/clang/test/Preprocessor/embed_init.c b/clang/test/Preprocessor/embed_init.c new file mode 100644 index 000000000000000..79b1743703ac5b3 --- /dev/null +++ b/clang/test/Preprocessor/embed_init.c @@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify +// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify -fexperimental-new-constant-interpreter +// expected-no-diagnostics + +typedef struct kitty { + int purr; +} kitty; + +typedef struct kitty_kitty { + int here; + kitty kit; +} kitty_kitty; + +const int meow = +#embed +; + +const kitty kit = { +#embed +}; + +const kitty_kitty kit_kit = { +#embed +}; + +static_assert(meow == 'b'); +static_assert(kit.purr == 'b'); +static_assert(kit_kit.here == 'j'); +static_assert(kit_kit.kit.purr == 'k'); diff --git a/clang/test/Preprocessor/embed_parameter_if_empty.c b/clang/test/Preprocessor/embed_parameter_if_empty.c new file mode 100644 index 000000000000000..70f1bc6a28be155 --- /dev/null +++ b/clang/test/Preprocessor/embed_parameter_if_empty.c @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -std=c23 %s --embed-dir=%S/Inputs -fsyntax-only -verify + +const char data[] = { +#embed if_empty(123, 124, 125) +}; +const char non_empty_data[] = { +#embed if_empty(123, 124, 125) +}; +static_assert(sizeof(data) == 3); +static_assert(123 == data[0]); +static_assert(124 == data[1]); +static_assert(125 == data[2]); +static_assert(sizeof(non_empty_data) == 2); +static_assert('j' == non_empty_data[0]); +static_assert('k' == non_empty_data[1]); + +// Ensure we diagnose duplicate parameters even if they're the same value. +const unsigned char a[] = { +#embed if_empty(1) prefix() if_empty(2) +// expected-error@-1 {{cannot specify parameter 'if_empty' twice in the same '#embed' directive}} +, +#embed if_empty(1) suffix() if_empty(2) +// expected-error@-1 {{cannot specify parameter 'if_empty' twice in the same '#embed' directive}} +}; diff --git a/clang/test/Preprocessor/embed_parameter_limit.c b/clang/test/Preprocessor/embed_parameter_limit.c new file mode 100644 index 000000000000000..da3e4fb877c1b9c --- /dev/null +++ b/clang/test/Preprocessor/embed_parameter_limit.c @@ -0,0 +1,94 @@ +// RUN: %clang_cc1 -std=c23 %s --embed-dir=%S/Inputs -fsyntax-only -verify + +const char data[] = { +#embed +}; +const char offset_data[] = { +#embed limit(1) +}; +static_assert(sizeof(data) == 2); +static_assert('j' == data[0]); +static_assert('k' == data[1]); +static_assert(sizeof(offset_data) == 1); +static_assert('j' == offset_data[0]); +static_assert(offset_data[0] == data[0]); + +// Cannot have a negative limit. +#embed limit(-1) +// expected-error@-1 {{invalid value '-1'; must be positive}} + +// It can have a limit of 0, in which case the __has_embed should return false. +#if __has_embed( limit(0)) != __STDC_EMBED_EMPTY__ +#error "__has_embed should return false when there's no data" +#endif + +// When the limit is zero, the resource is empty, so if_empty kicks in. +const unsigned char buffer[] = { +#embed limit(0) if_empty(1) +}; +static_assert(sizeof(buffer) == 1); +static_assert(buffer[0] == 1); + +// However, prefix and suffix do not kick in. +const unsigned char other_buffer[] = { + 1, +#embed limit(0) prefix(2,) suffix(3) +}; +static_assert(sizeof(other_buffer) == 1); +static_assert(other_buffer[0] == 1); + +// Ensure we can limit to something larger than the file size as well. +const unsigned char third_buffer[] = { +#embed limit(100) +}; +static_assert(sizeof(third_buffer) == 2); +static_assert('j' == third_buffer[0]); +static_assert('k' == third_buffer[1]); + +// Test the limits of a file with more than one character in it. +const unsigned char fourth_buffer[] = { +#embed limit(10) +}; +static_assert(sizeof(fourth_buffer) == 10); +static_assert(' ' == fourth_buffer[0]); +static_assert(' ' == fourth_buffer[1]); +static_assert(' ' == fourth_buffer[2]); +static_assert(' ' == fourth_buffer[3]); +static_assert(' ' == fourth_buffer[4]); +static_assert(' ' == fourth_buffer[5]); +static_assert(' ' == fourth_buffer[6]); +static_assert(' ' == fourth_buffer[7]); +static_assert(' ' == fourth_buffer[8]); +static_assert(' ' == fourth_buffer[9]); + +// Ensure that a limit larger than what can fit into a 64-bit value is +// rejected. This limit is fine because it fits in a 64-bit value. +const unsigned char fifth_buffer[] = { +#embed limit(0xFFFF'FFFF'FFFF'FFFF) +}; +static_assert(sizeof(fifth_buffer) == 2); +static_assert('j' == fifth_buffer[0]); +static_assert('k' == fifth_buffer[1]); + +// But this one is not fine because it does not fit into a 64-bit value. +const unsigned char sixth_buffer[] = { +#embed limit(0xFFFF'FFFF'FFFF'FFFF'1) +}; +// expected-error@-2 {{integer literal is too large to be represented in any integer type}} +// Note: the preprocessor will continue with the truncated value, so the parser +// will treat this case and the previous one identically in terms of what +// contents are retained from the embedded resource (which is the entire file). + +// Ensure we diagnose duplicate parameters even if they're the same value. +const unsigned char a[] = { +#embed limit(1) prefix() limit(1) +// expected-error@-1 {{cannot specify parameter 'limit' twice in the same '#embed' directive}} +, +#embed limit(1) if_empty() limit(2) +// expected-error@-1 {{cannot specify parameter 'limit' twice in the same '#embed' directive}} +}; + +// C23 6.10.3.2p2 +static_assert( +#embed limit(defined(FOO)) // expected-error {{'defined' cannot appear within this context}} + == 0); // expected-error {{expected expression}} diff --git a/clang/test/Preprocessor/embed_parameter_offset.c b/clang/test/Preprocessor/embed_parameter_offset.c new file mode 100644 index 000000000000000..ab1bd3f9f034ec5 --- /dev/null +++ b/clang/test/Preprocessor/embed_parameter_offset.c @@ -0,0 +1,89 @@ +// RUN: %clang_cc1 -std=c23 %s --embed-dir=%S/Inputs -fsyntax-only -verify + +const char data[] = { +#embed +}; +const char offset_data[] = { +#embed clang::offset(1) +}; +static_assert(sizeof(data) == 2); +static_assert('j' == data[0]); +static_assert('k' == data[1]); +static_assert(sizeof(offset_data) == 1); +static_assert('k' == offset_data[0]); +static_assert(offset_data[0] == data[1]); + +// Cannot have a negative offset. +#embed clang::offset(-1) +// expected-error@-1 {{invalid value '-1'; must be positive}} + +// If the offset is past the end of the file, the file should be considered +// empty. +#if __has_embed( clang::offset(3)) != __STDC_EMBED_EMPTY__ +#error "__has_embed should return false when there's no data" +#endif + +// When the offset is past the end of the file, the resource is empty, so if_empty kicks in. +const unsigned char buffer[] = { +#embed clang::offset(3) if_empty(1) +}; +static_assert(sizeof(buffer) == 1); +static_assert(buffer[0] == 1); + +// However, prefix and suffix do not kick in. +const unsigned char other_buffer[] = { + 1, +#embed clang::offset(3) prefix(2,) suffix(3) +}; +static_assert(sizeof(other_buffer) == 1); +static_assert(other_buffer[0] == 1); + +// Ensure we can offset to zero (that's the default behavior) +const unsigned char third_buffer[] = { +#embed clang::offset(0) +}; +static_assert(sizeof(third_buffer) == 2); +static_assert('j' == third_buffer[0]); +static_assert('k' == third_buffer[1]); + +// Test the offsets of a file with more than one character in it. +const unsigned char fourth_buffer[] = { +#embed clang::offset(24) limit(4) +}; +static_assert(sizeof(fourth_buffer) == 4); +static_assert('.' == fourth_buffer[0]); +static_assert('-' == fourth_buffer[1]); +static_assert('.' == fourth_buffer[2]); +static_assert('\'' == fourth_buffer[3]); + +// Ensure that an offset larger than what can fit into a 64-bit value is +// rejected. This offset is fine because it fits in a 64-bit value. +const unsigned char fifth_buffer[] = { + 1, +#embed clang::offset(0xFFFF'FFFF'FFFF'FFFF) +}; +static_assert(sizeof(fifth_buffer) == 1); +static_assert(1 == fifth_buffer[0]); + +// But this one is not fine because it does not fit into a 64-bit value. +const unsigned char sixth_buffer[] = { +#embed clang::offset(0xFFFF'FFFF'FFFF'FFFF'1) +}; +// expected-error@-2 {{integer literal is too large to be represented in any integer type}} + +// Ensure we diagnose duplicate parameters even if they're the same value. +const unsigned char a[] = { +#embed clang::offset(1) prefix() clang::offset(1) +// expected-error@-1 {{cannot specify parameter 'clang::offset' twice in the same '#embed' directive}} +, +#embed clang::offset(1) if_empty() clang::offset(2) +// expected-error@-1 {{cannot specify parameter 'clang::offset' twice in the same '#embed' directive}} +}; + +// Matches with C23 6.10.3.2p2, is documented as part of our extension. +static_assert( +#embed clang::offset(defined(FOO)) + == 0); // expected-error {{expected expression}} + /* expected-error@-2 {{'defined' cannot appear within this context}} + pedantic-warning@-2 {{'clang::offset' is a Clang extension}} + */ diff --git a/clang/test/Preprocessor/embed_parameter_prefix.c b/clang/test/Preprocessor/embed_parameter_prefix.c new file mode 100644 index 000000000000000..b55c08f013955d6 --- /dev/null +++ b/clang/test/Preprocessor/embed_parameter_prefix.c @@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -std=c23 %s --embed-dir=%S/Inputs -fsyntax-only -verify + +const char data[] = { +#embed prefix('\xA', ) +}; +const char empty_data[] = { +#embed prefix('\xA', ) +1 +}; +static_assert(sizeof(data) == 2); +static_assert('\xA' == data[0]); +static_assert('b' == data[1]); +static_assert(sizeof(empty_data) == 1); +static_assert(1 == empty_data[0]); + +struct S { + int x, y, z; +}; + +const struct S s = { +#embed prefix( .x = 100, .y = 10, ) +}; +static_assert(s.x == 100); +static_assert(s.y == 10); +static_assert(s.z == 'b'); + +// Ensure that an empty file does not produce any prefix tokens. If it did, +// there would be random tokens here that the parser would trip on. +#embed prefix(0) + +// Ensure we diagnose duplicate parameters even if they're the same value. +const unsigned char a[] = { +#embed prefix(1,) limit(1) prefix(1,) +// expected-error@-1 {{cannot specify parameter 'prefix' twice in the same '#embed' directive}} +, +#embed prefix(1,) if_empty() prefix(2,) +// expected-error@-1 {{cannot specify parameter 'prefix' twice in the same '#embed' directive}} +}; diff --git a/clang/test/Preprocessor/embed_parameter_suffix.c b/clang/test/Preprocessor/embed_parameter_suffix.c new file mode 100644 index 000000000000000..7d76826828245f1 --- /dev/null +++ b/clang/test/Preprocessor/embed_parameter_suffix.c @@ -0,0 +1,39 @@ +// RUN: %clang_cc1 -std=c23 %s --embed-dir=%S/Inputs -fsyntax-only -verify + +const char data[] = { +#embed suffix(, '\xA') +}; +const char empty_data[] = { +#embed suffix(, '\xA') +1 +}; +static_assert(sizeof(data) == 2); +static_assert('b' == data[0]); +static_assert('\xA' == data[1]); +static_assert(sizeof(empty_data) == 1); +static_assert(1 == empty_data[0]); + +struct S { + int x, y, z; +}; + +const struct S s = { +#embed suffix( , .y = 100, .z = 10 ) +}; + +static_assert(s.x == 'b'); +static_assert(s.y == 100); +static_assert(s.z == 10); + +// Ensure that an empty file does not produce any suffix tokens. If it did, +// there would be random tokens here that the parser would trip on. +#embed suffix(0) + +// Ensure we diagnose duplicate parameters even if they're the same value. +const unsigned char a[] = { +#embed suffix(,1) prefix() suffix(,1) +// expected-error@-1 {{cannot specify parameter 'suffix' twice in the same '#embed' directive}} +, +#embed suffix(,1) if_empty() suffix(,2) +// expected-error@-1 {{cannot specify parameter 'suffix' twice in the same '#embed' directive}} +}; diff --git a/clang/test/Preprocessor/embed_parameter_unrecognized.c b/clang/test/Preprocessor/embed_parameter_unrecognized.c new file mode 100644 index 000000000000000..b03384341a00a3b --- /dev/null +++ b/clang/test/Preprocessor/embed_parameter_unrecognized.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 %s -std=c23 -E -verify +// okay-no-diagnostics + +#embed __FILE__ unrecognized +// expected-error@-1 {{unknown embed preprocessor parameter 'unrecognized'}} +#embed __FILE__ unrecognized::param +// expected-error@-1 {{unknown embed preprocessor parameter 'unrecognized::param'}} +#embed __FILE__ unrecognized::param(with, args) +// expected-error@-1 {{unknown embed preprocessor parameter 'unrecognized::param'}} diff --git a/clang/test/Preprocessor/embed_parsing_errors.c b/clang/test/Preprocessor/embed_parsing_errors.c new file mode 100644 index 000000000000000..490ec6d4ded2c9e --- /dev/null +++ b/clang/test/Preprocessor/embed_parsing_errors.c @@ -0,0 +1,130 @@ +// RUN: %clang_cc1 -std=c23 %s -E -verify + +// Test the parsing behavior for #embed and all of its parameters to ensure we +// recover from failures gracefully. +char buffer[] = { +#embed +// expected-error@-1 {{expected "FILENAME" or }} + +#embed < +// expected-error@-1 {{expected '>'}} \ + expected-note@-1 {{to match this '<'}} + +#embed " +// expected-error@-1 {{expected "FILENAME" or }} \ + expected-warning@-1 {{missing terminating '"' character}} + +#embed file.txt +// expected-error@-1{{expected "FILENAME" or }} + +#embed "embed_parsing_errors.c" xxx +// expected-error@-1 {{unknown embed preprocessor parameter 'xxx'}} + +#embed "embed_parsing_errors.c" xxx:: +// expected-error@-1 {{expected identifier}} + +#embed "embed_parsing_errors.c" xxx::xxx +// expected-error@-1 {{unknown embed preprocessor parameter 'xxx::xxx'}} + +#embed "embed_parsing_errors.c" xxx::42 +// expected-error@-1 {{expected identifier}} + +#embed "embed_parsing_errors.c" limit +// expected-error@-1 {{expected '('}} + +#embed "embed_parsing_errors.c" limit( +// expected-error@-1 {{expected value in expression}} + +#embed "embed_parsing_errors.c" limit(xxx +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" limit(42 +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" limit([ +// expected-error@-1 {{invalid token at start of a preprocessor expression}} + +#embed "embed_parsing_errors.c" limit([) +// expected-error@-1 {{invalid token at start of a preprocessor expression}} + +#embed "embed_parsing_errors.c" limit(1/0) +// expected-error@-1 {{division by zero in preprocessor expression}} + +#embed "embed_parsing_errors.c" clang::offset +// expected-error@-1 {{expected '('}} + +#embed "embed_parsing_errors.c" clang::offset( +// expected-error@-1 {{expected value in expression}} + +#embed "embed_parsing_errors.c" clang::offset(xxx +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" clang::offset(42 +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" clang::offset([ +// expected-error@-1 {{invalid token at start of a preprocessor expression}} + +#embed "embed_parsing_errors.c" clang::offset([) +// expected-error@-1 {{invalid token at start of a preprocessor expression}} + +#embed "embed_parsing_errors.c" clang::offset(1/0) +// expected-error@-1 {{division by zero in preprocessor expression}} + +#embed "embed_parsing_errors.c" clang::offset 42 +// expected-error@-1 {{expected '('}} + +#embed "embed_parsing_errors.c" prefix +// expected-error@-1 {{expected '('}} + +#embed "embed_parsing_errors.c" prefix( +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" prefix(xxx +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" prefix(1/0) // OK: emitted as tokens, not evaluated yet. +#embed "embed_parsing_errors.c" prefix(([{}])) // OK: delimiters balanced +#embed "embed_parsing_errors.c" prefix(([{)]}) +// expected-error@-1 {{expected '}'}} expected-note@-1 {{to match this '{'}} +#embed "embed_parsing_errors.c" prefix(([{})}) +// expected-error@-1 {{expected ']'}} expected-note@-1 {{to match this '['}} +#embed "embed_parsing_errors.c" prefix(([{}]}) +// expected-error@-1 {{expected ')'}} expected-note@-1 {{to match this '('}} +#embed "embed_parsing_errors.c" prefix() // OK: tokens within parens are optional +#embed "embed_parsing_errors.c" prefix) +// expected-error@-1 {{expected '('}} + +#embed "embed_parsing_errors.c" suffix +// expected-error@-1 {{expected '('}} + +#embed "embed_parsing_errors.c" suffix( +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" suffix(xxx +// expected-error@-1 {{expected ')'}} + +#embed "embed_parsing_errors.c" suffix(1/0) // OK: emitted as tokens, not evaluated yet. +#embed "embed_parsing_errors.c" suffix(([{}])) // OK: delimiters balanced +#embed "embed_parsing_errors.c" suffix(([{)]}) +// expected-error@-1 {{expected '}'}} expected-note@-1 {{to match this '{'}} +#embed "embed_parsing_errors.c" suffix(([{})}) +// expected-error@-1 {{expected ']'}} expected-note@-1 {{to match this '['}} +#embed "embed_parsing_errors.c" suffix(([{}]}) +// expected-error@-1 {{expected ')'}} expected-note@-1 {{to match this '('}} +#embed "embed_parsing_errors.c" suffix() // OK: tokens within parens are optional +#embed "embed_parsing_errors.c" suffix) +// expected-error@-1 {{expected '('}} + +#embed "embed_parsing_errors.c" if_empty(1/0) // OK: emitted as tokens, not evaluated yet. +#embed "embed_parsing_errors.c" if_empty(([{}])) // OK: delimiters balanced +#embed "embed_parsing_errors.c" if_empty(([{)]}) +// expected-error@-1 {{expected '}'}} expected-note@-1 {{to match this '{'}} +#embed "embed_parsing_errors.c" if_empty(([{})}) +// expected-error@-1 {{expected ']'}} expected-note@-1 {{to match this '['}} +#embed "embed_parsing_errors.c" if_empty(([{}]}) +// expected-error@-1 {{expected ')'}} expected-note@-1 {{to match this '('}} +#embed "embed_parsing_errors.c" if_empty() // OK: tokens within parens are optional +#embed "embed_parsing_errors.c" if_empty) +// expected-error@-1 {{expected '('}} +}; diff --git a/clang/test/Preprocessor/embed_path_chevron.c b/clang/test/Preprocessor/embed_path_chevron.c new file mode 100644 index 000000000000000..b12cb9ceb54b8bd --- /dev/null +++ b/clang/test/Preprocessor/embed_path_chevron.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -std=c23 -fsyntax-only --embed-dir=%S/Inputs -verify +// expected-no-diagnostics + +const char data[] = { +#embed +}; +static_assert(sizeof(data) == 1); +static_assert('b' == data[0]); diff --git a/clang/test/Preprocessor/embed_path_quote.c b/clang/test/Preprocessor/embed_path_quote.c new file mode 100644 index 000000000000000..79ca1e5c811b813 --- /dev/null +++ b/clang/test/Preprocessor/embed_path_quote.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify +// expected-no-diagnostics + +const char data[] = { +#embed "single_byte.txt" +}; +static_assert(sizeof(data) == 1); +static_assert('a' == data[0]); diff --git a/clang/test/Preprocessor/embed_preprocess_to_file.c b/clang/test/Preprocessor/embed_preprocess_to_file.c new file mode 100644 index 000000000000000..9895d958cf96d6d --- /dev/null +++ b/clang/test/Preprocessor/embed_preprocess_to_file.c @@ -0,0 +1,39 @@ +// RUN: %clang_cc1 -std=c23 %s -E --embed-dir=%S/Inputs | FileCheck %s --check-prefix EXPANDED +// RUN: %clang_cc1 -std=c23 %s -E -dE --embed-dir=%S/Inputs | FileCheck %s --check-prefix DIRECTIVE + +// Ensure that we correctly preprocess to a file, both with expanding embed +// directives fully and with printing the directive instead. +const char data[] = { +#embed if_empty('a', 'b') clang::offset(0) limit(1) suffix(, 'a', 0) prefix('h',) +}; + +// EXPANDED: const char data[] = {'h',106 , 'a', 0}; +// DIRECTIVE: const char data[] = { +// DIRECTIVE-NEXT: #embed if_empty('a', 'b') limit(1) clang::offset(0) prefix('h',) suffix(, 'a', 0) /* clang -E -dE */ +// DIRECTIVE-NEXT: }; + +const char more[] = { +#embed if_empty('a', 'b') +}; + +// EXPANDED: const char more[] = {'a', 'b'} +// DIRECTIVE: const char more[] = { +// DIRECTIVE-NEXT: #embed if_empty('a', 'b') /* clang -E -dE */ +// DIRECTIVE-NEXT: }; + +const char even_more[] = { + 1, 2, 3, +#embed prefix(4, 5,) suffix(, 6, 7) + , 8, 9, 10 +}; + +// EXPANDED: const char even_more[] = { +// EXPANDED-NEXT: 1, 2, 3,4, 5,106, 107 , 6, 7 , 8, 9, 10 +// EXPANDED-EMPTY: +// EXPANDED-EMPTY: +// EXPANDED-NEXT: }; +// DIRECTIVE: const char even_more[] = { +// DIRECTIVE-NEXT: 1, 2, 3, +// DIRECTIVE-NEXT: #embed prefix(4, 5,) suffix(, 6, 7) /* clang -E -dE */ +// DIRECTIVE-NEXT: , 8, 9, 10 +// DIRECTIVE-NEXT: }; diff --git a/clang/test/Preprocessor/embed_single_entity.c b/clang/test/Preprocessor/embed_single_entity.c new file mode 100644 index 000000000000000..2019118b48d322d --- /dev/null +++ b/clang/test/Preprocessor/embed_single_entity.c @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c23 --embed-dir=%S/Inputs -verify + +const char data = +#embed +; +_Static_assert('b' == data); +// expected-no-diagnostics diff --git a/clang/test/Preprocessor/embed_weird.cpp b/clang/test/Preprocessor/embed_weird.cpp new file mode 100644 index 000000000000000..a90d3bc330538b0 --- /dev/null +++ b/clang/test/Preprocessor/embed_weird.cpp @@ -0,0 +1,116 @@ +// RUN: printf "\0" > %S/Inputs/null_byte.bin +// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx -Wno-c23-extensions +// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,c +// RUN: rm %S/Inputs/null_byte.bin +#embed +; + +void f (unsigned char x) { (void)x;} +void g () {} +void h (unsigned char x, int y) {(void)x; (void)y;} +int i () { + return +#embed + ; +} + +_Static_assert( +#embed suffix(,) +"" +); +_Static_assert( +#embed +, "" +); +_Static_assert(sizeof( +#embed +) == +sizeof(unsigned char) +, "" +); +_Static_assert(sizeof +#embed +, "" +); +_Static_assert(sizeof( +#embed // expected-warning {{left operand of comma operator has no effect}} +) == +sizeof(unsigned char) +, "" +); + +#ifdef __cplusplus +template +void j() { + static_assert(First == 'j', ""); + static_assert(Second == 'k', ""); +} +#endif + +void do_stuff() { + f( +#embed + ); + g( +#embed + ); + h( +#embed + ); + int r = i(); + (void)r; +#ifdef __cplusplus + j< +#embed + >( +#embed + ); +#endif +} + +// Ensure that we don't accidentally allow you to initialize an unsigned char * +// from embedded data; the data is modeled as a string literal internally, but +// is not actually a string literal. +const unsigned char *ptr = +#embed // expected-warning {{left operand of comma operator has no effect}} +; // c-error@-2 {{incompatible integer to pointer conversion initializing 'const unsigned char *' with an expression of type 'unsigned char'}} \ + cxx-error@-2 {{cannot initialize a variable of type 'const unsigned char *' with an rvalue of type 'unsigned char'}} + +// However, there are some cases where this is fine and should work. +const unsigned char *null_ptr_1 = +#embed if_empty(0) +; + +const unsigned char *null_ptr_2 = +#embed +; + +const unsigned char *null_ptr_3 = { +#embed +}; + +#define FILE_NAME +#define LIMIT 1 +#define OFFSET 0 +#define EMPTY_SUFFIX suffix() + +constexpr unsigned char ch = +#embed FILE_NAME limit(LIMIT) clang::offset(OFFSET) EMPTY_SUFFIX +; +static_assert(ch == 0); + +void foobar(float x, char y, char z); // cxx-note {{candidate function not viable: requires 3 arguments, but 1 was provided}} + // c-note@-1 {{declared here}} +void g1() { foobar((float) // cxx-error {{no matching function for call to 'foobar'}} +#embed "numbers.txt" limit(3) // expected-warning {{left operand of comma operator has no effect}} +); // c-error {{too few arguments to function call, expected 3, have 1}} +} + +#if __cplusplus +struct S { S(char x); ~S(); }; +void f1() { + S s[] = { +#embed "null_byte.bin" + }; +} +#endif diff --git a/clang/test/Preprocessor/init-aarch64.c b/clang/test/Preprocessor/init-aarch64.c index f0845985c9efc3a..9e425ac1c5ce2e6 100644 --- a/clang/test/Preprocessor/init-aarch64.c +++ b/clang/test/Preprocessor/init-aarch64.c @@ -272,6 +272,9 @@ // AARCH64-NEXT: #define __SIZE_WIDTH__ 64 // AARCH64_CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL // AARCH64_CXX: #define __STDCPP_THREADS__ 1 +// AARCH64-NEXT: #define __STDC_EMBED_EMPTY__ 2 +// AARCH64-NEXT: #define __STDC_EMBED_FOUND__ 1 +// AARCH64-NEXT: #define __STDC_EMBED_NOT_FOUND__ 0 // AARCH64-NEXT: #define __STDC_HOSTED__ 1 // AARCH64-NEXT: #define __STDC_UTF_16__ 1 // AARCH64-NEXT: #define __STDC_UTF_32__ 1 diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 6e7c0ea5c730b16..12ebaeaedaffa48 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -1875,6 +1875,9 @@ // WEBASSEMBLY-NEXT:#define __SIZE_TYPE__ long unsigned int // WEBASSEMBLY32-NEXT:#define __SIZE_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __SIZE_WIDTH__ 64 +// WEBASSEMBLY-NEXT:#define __STDC_EMBED_EMPTY__ 2 +// WEBASSEMBLY-NEXT:#define __STDC_EMBED_FOUND__ 1 +// WEBASSEMBLY-NEXT:#define __STDC_EMBED_NOT_FOUND__ 0 // WEBASSEMBLY-NEXT:#define __STDC_HOSTED__ 0 // WEBASSEMBLY-NOT:#define __STDC_MB_MIGHT_NEQ_WC__ // WEBASSEMBLY-NOT:#define __STDC_NO_ATOMICS__ diff --git a/clang/test/Preprocessor/macro_with_initializer_list.cpp b/clang/test/Preprocessor/macro_with_initializer_list.cpp index 287eeb4a843cb79..40f53164b263d91 100644 --- a/clang/test/Preprocessor/macro_with_initializer_list.cpp +++ b/clang/test/Preprocessor/macro_with_initializer_list.cpp @@ -3,7 +3,7 @@ namespace std { template class initializer_list { - public: + public: const X *a, *b; initializer_list(); }; } diff --git a/clang/test/Preprocessor/single_byte.txt b/clang/test/Preprocessor/single_byte.txt new file mode 100644 index 000000000000000..2e65efe2a145dda --- /dev/null +++ b/clang/test/Preprocessor/single_byte.txt @@ -0,0 +1 @@ +a \ No newline at end of file diff --git a/clang/test/Preprocessor/wasm-target-features.c b/clang/test/Preprocessor/wasm-target-features.c index 9d49e3af603f823..d5539163b3bf5a5 100644 --- a/clang/test/Preprocessor/wasm-target-features.c +++ b/clang/test/Preprocessor/wasm-target-features.c @@ -164,6 +164,7 @@ // // GENERIC-INCLUDE-DAG: #define __wasm_multivalue__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}} +// GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}} // // RUN: %clang -E -dM %s -o - 2>&1 \ @@ -180,7 +181,6 @@ // GENERIC-NOT: #define __wasm_half_precision__ 1{{$}} // GENERIC-NOT: #define __wasm_multimemory__ 1{{$}} // GENERIC-NOT: #define __wasm_nontrapping_fptoint__ 1{{$}} -// GENERIC-NOT: #define __wasm_reference_types__ 1{{$}} // GENERIC-NOT: #define __wasm_relaxed_simd__ 1{{$}} // GENERIC-NOT: #define __wasm_simd128__ 1{{$}} // GENERIC-NOT: #define __wasm_tail_call__ 1{{$}} diff --git a/clang/test/Sema/aarch64-sve-intrinsics/acle_sve_bfloat.cpp b/clang/test/Sema/aarch64-sve-intrinsics/acle_sve_bfloat.cpp index 6767e98fa773431..95baf9f77fb14e8 100644 --- a/clang/test/Sema/aarch64-sve-intrinsics/acle_sve_bfloat.cpp +++ b/clang/test/Sema/aarch64-sve-intrinsics/acle_sve_bfloat.cpp @@ -6,23 +6,23 @@ void test_bfloat(svbool_t pg, uint64_t u64, int64_t i64, const bfloat16_t *const_bf16_ptr, bfloat16_t *bf16_ptr, svbfloat16_t bf16, svbfloat16x2_t bf16x2, svbfloat16x3_t bf16x3, svbfloat16x4_t bf16x4) { - // expected-error@+1 {{'svcreate2_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svcreate2_bf16' needs target feature (sve|sme),bf16}} svcreate2_bf16(bf16, bf16); - // expected-error@+1 {{'svcreate3_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svcreate3_bf16' needs target feature (sve|sme),bf16}} svcreate3_bf16(bf16, bf16, bf16); - // expected-error@+1 {{'svcreate4_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svcreate4_bf16' needs target feature (sve|sme),bf16}} svcreate4_bf16(bf16, bf16, bf16, bf16); - // expected-error@+1 {{'svget2_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svget2_bf16' needs target feature (sve|sme),bf16}} svget2_bf16(bf16x2, 1); - // expected-error@+1 {{'svget3_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svget3_bf16' needs target feature (sve|sme),bf16}} svget3_bf16(bf16x3, 1); - // expected-error@+1 {{'svget4_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svget4_bf16' needs target feature (sve|sme),bf16}} svget4_bf16(bf16x4, 1); - // expected-error@+1 {{'svld1_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svld1_bf16' needs target feature (sve|sme),bf16}} svld1_bf16(pg, const_bf16_ptr); - // expected-error@+1 {{'svld1_vnum_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svld1_vnum_bf16' needs target feature (sve|sme),bf16}} svld1_vnum_bf16(pg, const_bf16_ptr, i64); - // expected-error@+1 {{'svld1rq_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svld1rq_bf16' needs target feature (sve|sme),bf16}} svld1rq_bf16(pg, const_bf16_ptr); // expected-error@+1 {{'svldff1_bf16' needs target feature sve,bf16}} svldff1_bf16(pg, const_bf16_ptr); @@ -32,55 +32,55 @@ void test_bfloat(svbool_t pg, uint64_t u64, int64_t i64, const bfloat16_t *const svldnf1_bf16(pg, const_bf16_ptr); // expected-error@+1 {{'svldnf1_vnum_bf16' needs target feature sve,bf16}} svldnf1_vnum_bf16(pg, const_bf16_ptr, i64); - // expected-error@+1 {{'svldnt1_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svldnt1_bf16' needs target feature (sve|sme),bf16}} svldnt1_bf16(pg, const_bf16_ptr); - // expected-error@+1 {{'svldnt1_vnum_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svldnt1_vnum_bf16' needs target feature (sve|sme),bf16}} svldnt1_vnum_bf16(pg, const_bf16_ptr, i64); - // expected-error@+1 {{'svrev_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svrev_bf16' needs target feature (sve|sme),bf16}} svrev_bf16(bf16); - // expected-error@+1 {{'svset2_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svset2_bf16' needs target feature (sve|sme),bf16}} svset2_bf16(bf16x2, 1, bf16); - // expected-error@+1 {{'svset3_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svset3_bf16' needs target feature (sve|sme),bf16}} svset3_bf16(bf16x3, 1, bf16); - // expected-error@+1 {{'svset4_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svset4_bf16' needs target feature (sve|sme),bf16}} svset4_bf16(bf16x4, 1, bf16); - // expected-error@+1 {{'svst1_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svst1_bf16' needs target feature (sve|sme),bf16}} svst1_bf16(pg, bf16_ptr, bf16); - // expected-error@+1 {{'svst1_vnum_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svst1_vnum_bf16' needs target feature (sve|sme),bf16}} svst1_vnum_bf16(pg, bf16_ptr, i64, bf16); - // expected-error@+1 {{'svstnt1_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svstnt1_bf16' needs target feature (sve|sme),bf16}} svstnt1_bf16(pg, bf16_ptr, bf16); - // expected-error@+1 {{'svstnt1_vnum_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svstnt1_vnum_bf16' needs target feature (sve|sme),bf16}} svstnt1_vnum_bf16(pg, bf16_ptr, i64, bf16); - // expected-error@+1 {{'svtrn1_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svtrn1_bf16' needs target feature (sve|sme),bf16}} svtrn1_bf16(bf16, bf16); // expected-error@+1 {{'svtrn1q_bf16' needs target feature sve,bf16}} svtrn1q_bf16(bf16, bf16); - // expected-error@+1 {{'svtrn2_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svtrn2_bf16' needs target feature (sve|sme),bf16}} svtrn2_bf16(bf16, bf16); // expected-error@+1 {{'svtrn2q_bf16' needs target feature sve,bf16}} svtrn2q_bf16(bf16, bf16); - // expected-error@+1 {{'svundef_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svundef_bf16' needs target feature (sve|sme),bf16}} svundef_bf16(); - // expected-error@+1 {{'svundef2_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svundef2_bf16' needs target feature (sve|sme),bf16}} svundef2_bf16(); - // expected-error@+1 {{'svundef3_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svundef3_bf16' needs target feature (sve|sme),bf16}} svundef3_bf16(); - // expected-error@+1 {{'svundef4_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svundef4_bf16' needs target feature (sve|sme),bf16}} svundef4_bf16(); - // expected-error@+1 {{'svuzp1_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svuzp1_bf16' needs target feature (sve|sme),bf16}} svuzp1_bf16(bf16, bf16); // expected-error@+1 {{'svuzp1q_bf16' needs target feature sve,bf16}} svuzp1q_bf16(bf16, bf16); - // expected-error@+1 {{'svuzp2_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svuzp2_bf16' needs target feature (sve|sme),bf16}} svuzp2_bf16(bf16, bf16); // expected-error@+1 {{'svuzp2q_bf16' needs target feature sve,bf16}} svuzp2q_bf16(bf16, bf16); - // expected-error@+1 {{'svzip1_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svzip1_bf16' needs target feature (sve|sme),bf16}} svzip1_bf16(bf16, bf16); // expected-error@+1 {{'svzip1q_bf16' needs target feature sve,bf16}} svzip1q_bf16(bf16, bf16); - // expected-error@+1 {{'svzip2_bf16' needs target feature (sve,bf16)|sme}} + // expected-error@+1 {{'svzip2_bf16' needs target feature (sve|sme),bf16}} svzip2_bf16(bf16, bf16); // expected-error@+1 {{'svzip2q_bf16' needs target feature sve,bf16}} svzip2q_bf16(bf16, bf16); diff --git a/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2.cpp b/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2.cpp index a12b57db56a40e9..8d32b5265b00313 100644 --- a/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2.cpp +++ b/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2.cpp @@ -40,1153 +40,1153 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svhistseg_s8' needs target feature sve2}} // overload-error@+1 {{'svhistseg' needs target feature sve2}} SVE_ACLE_FUNC(svhistseg,_s8,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqrdmulh_s8' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_s8,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqrdmulh_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_n_s8,,)(svundef_s8(), i8); - // expected-error@+2 {{'svqdmulh_s8' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_s8,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmulh_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_n_s8,,)(svundef_s8(), i8); - // expected-error@+2 {{'svsra_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svsra' needs target feature sve2}} + // expected-error@+2 {{'svsra_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svsra' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsra,_n_s8,,)(svundef_s8(), svundef_s8(), 1); - // expected-error@+2 {{'svnbsl_s8' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svnbsl_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svqabs_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqabs_z' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s8,_z,)(pg, svundef_s8()); - // expected-error@+2 {{'svqabs_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqabs_m' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s8,_m,)(svundef_s8(), pg, svundef_s8()); - // expected-error@+2 {{'svqabs_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqabs_x' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s8,_x,)(pg, svundef_s8()); - // expected-error@+2 {{'svcadd_s8' needs target feature sve2}} - // overload-error@+1 {{'svcadd' needs target feature sve2}} + // expected-error@+2 {{'svcadd_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svcadd' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcadd,_s8,,)(svundef_s8(), svundef_s8(), 90); - // expected-error@+2 {{'svtbl2_s8' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_s8,,)(svundef2_s8(), svundef_u8()); - // expected-error@+2 {{'svhsubr_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhsubr_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhsubr_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhsubr_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svhsubr_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svhsubr_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'sveortb_s8' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'sveortb_n_s8' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svbcax_s8' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svbcax_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svqshlu_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqshlu_z' needs target feature sve2}} + // expected-error@+2 {{'svqshlu_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshlu_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshlu,_n_s8,_z,)(pg, svundef_s8(), 1); - // expected-error@+2 {{'svqrshl_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqrshl_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqrshl_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqrshl_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqrshl_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqrshl_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svcmla_s8' needs target feature sve2}} - // overload-error@+1 {{'svcmla' needs target feature sve2}} + // expected-error@+2 {{'svcmla_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svcmla' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcmla,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8(), 90); - // expected-error@+2 {{'svqsubr_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqsubr_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqsubr_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqsubr_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqsubr_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqsubr_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svrshr_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svrshr_z' needs target feature sve2}} + // expected-error@+2 {{'svrshr_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshr,_n_s8,_z,)(pg, svundef_s8(), 1); - // expected-error@+2 {{'svaddp_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svaddp_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqadd_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqadd_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqadd_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqadd_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqadd_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqadd_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svtbx_s8' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_s8,,)(svundef_s8(), svundef_s8(), svundef_u8()); - // expected-error@+2 {{'svqrdcmlah_s8' needs target feature sve2}} - // overload-error@+1 {{'svqrdcmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdcmlah_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdcmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdcmlah,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8(), 90); - // expected-error@+2 {{'svminp_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svminp_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqsub_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqsub_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqsub_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqsub_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqsub_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqsub_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svrsra_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svrsra' needs target feature sve2}} + // expected-error@+2 {{'svrsra_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsra' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsra,_n_s8,,)(svundef_s8(), svundef_s8(), 1); - // expected-error@+2 {{'sveor3_s8' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'sveor3_n_s8' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svhadd_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhadd_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svhadd_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhadd_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svhadd_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhadd_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqrdmlsh_s8' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqrdmlsh_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svmaxp_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svmaxp_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s8,_x,)(pg, svundef_s8(), svundef_s8()); // expected-error@+2 {{'svmatch_s8' needs target feature sve2}} // overload-error@+1 {{'svmatch' needs target feature sve2}} SVE_ACLE_FUNC(svmatch,_s8,,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svwhilerw_s8' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_s8,,)(const_i8_ptr, const_i8_ptr); - // expected-error@+2 {{'svqcadd_s8' needs target feature sve2}} - // overload-error@+1 {{'svqcadd' needs target feature sve2}} + // expected-error@+2 {{'svqcadd_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqcadd' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqcadd,_s8,,)(svundef_s8(), svundef_s8(), 90); - // expected-error@+2 {{'svrhadd_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svrhadd_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svrhadd_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svrhadd_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svrhadd_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svrhadd_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svwhilewr_s8' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_s8,,)(const_i8_ptr, const_i8_ptr); - // expected-error@+2 {{'svsli_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svsli' needs target feature sve2}} + // expected-error@+2 {{'svsli_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svsli' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsli,_n_s8,,)(svundef_s8(), svundef_s8(), 1); // expected-error@+2 {{'svnmatch_s8' needs target feature sve2}} // overload-error@+1 {{'svnmatch' needs target feature sve2}} SVE_ACLE_FUNC(svnmatch,_s8,,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svaba_s8' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svaba_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svuqadd_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s8,_m,)(pg, svundef_s8(), svundef_u8()); - // expected-error@+2 {{'svuqadd_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s8,_m,)(pg, svundef_s8(), u8); - // expected-error@+2 {{'svuqadd_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s8,_z,)(pg, svundef_s8(), svundef_u8()); - // expected-error@+2 {{'svuqadd_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s8,_z,)(pg, svundef_s8(), u8); - // expected-error@+2 {{'svuqadd_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s8,_x,)(pg, svundef_s8(), svundef_u8()); - // expected-error@+2 {{'svuqadd_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s8,_x,)(pg, svundef_s8(), u8); - // expected-error@+2 {{'sveorbt_s8' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'sveorbt_n_s8' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svbsl_s8' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svbsl_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svhsub_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhsub_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhsub_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svhsub_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svhsub_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svhsub_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqrdmlah_s8' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqrdmlah_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svbsl2n_s8' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svbsl2n_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svsri_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svsri' needs target feature sve2}} + // expected-error@+2 {{'svsri_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svsri' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsri,_n_s8,,)(svundef_s8(), svundef_s8(), 1); - // expected-error@+2 {{'svbsl1n_s8' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svbsl1n_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_s8,,)(svundef_s8(), svundef_s8(), i8); - // expected-error@+2 {{'svrshl_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svrshl_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svrshl_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svrshl_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svrshl_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svrshl_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqneg_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqneg_z' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s8,_z,)(pg, svundef_s8()); - // expected-error@+2 {{'svqneg_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqneg_m' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s8,_m,)(svundef_s8(), pg, svundef_s8()); - // expected-error@+2 {{'svqneg_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqneg_x' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s8,_x,)(pg, svundef_s8()); - // expected-error@+2 {{'svxar_n_s8' needs target feature sve2}} - // overload-error@+1 {{'svxar' needs target feature sve2}} + // expected-error@+2 {{'svxar_n_s8' needs target feature sve2|sme}} + // overload-error@+1 {{'svxar' needs target feature sve2|sme}} SVE_ACLE_FUNC(svxar,_n_s8,,)(svundef_s8(), svundef_s8(), 1); - // expected-error@+2 {{'svqshl_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s8,_z,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqshl_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s8,_m,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqshl_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s8,_x,)(pg, svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqshl_n_s8_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s8,_z,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqshl_n_s8_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s8,_m,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svqshl_n_s8_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s8,_x,)(pg, svundef_s8(), i8); - // expected-error@+2 {{'svmullb_s16' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svmullb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svqrshrunb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrshrunb' needs target feature sve2}} + // expected-error@+2 {{'svqrshrunb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshrunb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshrunb,_n_s16,,)(svundef_s16(), 1); - // expected-error@+2 {{'svqdmlalbt_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalbt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalbt,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmlalbt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalbt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalbt,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svqrdmulh_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_s16,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqrdmulh_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_n_s16,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqrdmulh_lane_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh_lane' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_lane_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh_lane,_s16,,)(svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svaddwb_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_s16,,)(svundef_s16(), svundef_s8()); - // expected-error@+2 {{'svaddwb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_n_s16,,)(svundef_s16(), i8); - // expected-error@+2 {{'svsubhnb_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_s16,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svsubhnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_n_s16,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqdmulh_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_s16,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmulh_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_n_s16,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqdmulh_lane_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh_lane' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_lane_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh_lane,_s16,,)(svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svqshrunt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqshrunt' needs target feature sve2}} + // expected-error@+2 {{'svqshrunt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshrunt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshrunt,_n_s16,,)(svundef_u8(), svundef_s16(), 1); - // expected-error@+2 {{'svrsubhnt_s16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_s16,,)(svundef_s8(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrsubhnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_n_s16,,)(svundef_s8(), svundef_s16(), i16); - // expected-error@+2 {{'svnbsl_s16' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svnbsl_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svqdmlslb_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslb,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmlslb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslb,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svsubhnt_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_s16,,)(svundef_s8(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svsubhnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_n_s16,,)(svundef_s8(), svundef_s16(), i16); - // expected-error@+2 {{'svqabs_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqabs_z' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s16,_z,)(pg, svundef_s16()); - // expected-error@+2 {{'svqabs_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqabs_m' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s16,_m,)(svundef_s16(), pg, svundef_s16()); - // expected-error@+2 {{'svqabs_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqabs_x' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s16,_x,)(pg, svundef_s16()); - // expected-error@+2 {{'svaddlbt_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddlbt' needs target feature sve2}} + // expected-error@+2 {{'svaddlbt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlbt,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svaddlbt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddlbt' needs target feature sve2}} + // expected-error@+2 {{'svaddlbt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlbt,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svtbl2_s16' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_s16,,)(svundef2_s16(), svundef_u16()); - // expected-error@+2 {{'svshrnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svshrnt' needs target feature sve2}} + // expected-error@+2 {{'svshrnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svshrnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svshrnt,_n_s16,,)(svundef_s8(), svundef_s16(), 1); - // expected-error@+2 {{'svhsubr_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhsubr_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhsubr_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhsubr_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svhsubr_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svhsubr_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'sveortb_s16' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'sveortb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svqxtnb_s16' needs target feature sve2}} - // overload-error@+1 {{'svqxtnb' needs target feature sve2}} + // expected-error@+2 {{'svqxtnb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnb,_s16,,)(svundef_s16()); - // expected-error@+2 {{'svmlalt_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svmlalt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svshrnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svshrnb' needs target feature sve2}} + // expected-error@+2 {{'svshrnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svshrnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svshrnb,_n_s16,,)(svundef_s16(), 1); - // expected-error@+2 {{'svaddhnt_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_s16,,)(svundef_s8(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaddhnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_n_s16,,)(svundef_s8(), svundef_s16(), i16); - // expected-error@+2 {{'svmls_lane_s16' needs target feature sve2}} - // overload-error@+1 {{'svmls_lane' needs target feature sve2}} + // expected-error@+2 {{'svmls_lane_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmls_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmls_lane,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svqdmlalt_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalt,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmlalt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalt,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svbcax_s16' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svbcax_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svqxtnt_s16' needs target feature sve2}} - // overload-error@+1 {{'svqxtnt' needs target feature sve2}} + // expected-error@+2 {{'svqxtnt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnt,_s16,,)(svundef_s8(), svundef_s16()); - // expected-error@+2 {{'svqdmlalb_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalb,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmlalb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalb,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svqrshl_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqrshl_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqrshl_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqrshl_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqrshl_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqrshl_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svsublbt_s16' needs target feature sve2}} - // overload-error@+1 {{'svsublbt' needs target feature sve2}} + // expected-error@+2 {{'svsublbt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublbt,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svsublbt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsublbt' needs target feature sve2}} + // expected-error@+2 {{'svsublbt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublbt,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svqshrnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqshrnt' needs target feature sve2}} + // expected-error@+2 {{'svqshrnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshrnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshrnt,_n_s16,,)(svundef_s8(), svundef_s16(), 1); - // expected-error@+2 {{'svqdmullt_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmullt' needs target feature sve2}} + // expected-error@+2 {{'svqdmullt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullt,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmullt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmullt' needs target feature sve2}} + // expected-error@+2 {{'svqdmullt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullt,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svsublt_s16' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svsublt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svqdmlslbt_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslbt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslbt,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmlslbt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslbt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslbt,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svadalp_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svadalp_z' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s16,_z,)(pg, svundef_s16(), svundef_s8()); - // expected-error@+2 {{'svadalp_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svadalp_m' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s16,_m,)(pg, svundef_s16(), svundef_s8()); - // expected-error@+2 {{'svadalp_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svadalp_x' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s16,_x,)(pg, svundef_s16(), svundef_s8()); - // expected-error@+2 {{'svmul_lane_s16' needs target feature sve2}} - // overload-error@+1 {{'svmul_lane' needs target feature sve2}} + // expected-error@+2 {{'svmul_lane_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmul_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmul_lane,_s16,,)(svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svsubwt_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_s16,,)(svundef_s16(), svundef_s8()); - // expected-error@+2 {{'svsubwt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_n_s16,,)(svundef_s16(), i8); - // expected-error@+2 {{'svqsubr_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqsubr_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqsubr_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqsubr_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqsubr_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqsubr_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqrshrnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrshrnt' needs target feature sve2}} + // expected-error@+2 {{'svqrshrnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshrnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshrnt,_n_s16,,)(svundef_s8(), svundef_s16(), 1); - // expected-error@+2 {{'svaddp_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaddp_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqadd_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqadd_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqadd_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqadd_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqadd_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqadd_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svabdlb_s16' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svabdlb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svtbx_s16' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_s16,,)(svundef_s16(), svundef_s16(), svundef_u16()); - // expected-error@+2 {{'svabdlt_s16' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svabdlt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svqrshrnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrshrnb' needs target feature sve2}} + // expected-error@+2 {{'svqrshrnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshrnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshrnb,_n_s16,,)(svundef_s16(), 1); - // expected-error@+2 {{'svminp_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svminp_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqsub_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqsub_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqsub_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqsub_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqsub_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqsub_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svrsubhnb_s16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_s16,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrsubhnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_n_s16,,)(svundef_s16(), i16); - // expected-error@+2 {{'svaddhnb_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_s16,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaddhnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_n_s16,,)(svundef_s16(), i16); - // expected-error@+2 {{'svabalt_s16' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svabalt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svqshrnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqshrnb' needs target feature sve2}} + // expected-error@+2 {{'svqshrnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshrnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshrnb,_n_s16,,)(svundef_s16(), 1); - // expected-error@+2 {{'sveor3_s16' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'sveor3_n_s16' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svhadd_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhadd_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svhadd_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhadd_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svhadd_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhadd_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqshrunb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqshrunb' needs target feature sve2}} + // expected-error@+2 {{'svqshrunb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshrunb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshrunb,_n_s16,,)(svundef_s16(), 1); - // expected-error@+2 {{'svmovlb_s16' needs target feature sve2}} - // overload-error@+1 {{'svmovlb' needs target feature sve2}} + // expected-error@+2 {{'svmovlb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlb,_s16,,)(svundef_s8()); - // expected-error@+2 {{'svqrdmlsh_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqrdmlsh_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svqrdmlsh_lane_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh_lane' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_lane_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh_lane,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svqdmlslt_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslt,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmlslt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslt,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svmaxp_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmaxp_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmullt_s16' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svmullt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_n_s16,,)(svundef_s8(), i8); // expected-error@+2 {{'svmatch_s16' needs target feature sve2}} // overload-error@+1 {{'svmatch' needs target feature sve2}} SVE_ACLE_FUNC(svmatch,_s16,,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqxtunb_s16' needs target feature sve2}} - // overload-error@+1 {{'svqxtunb' needs target feature sve2}} + // expected-error@+2 {{'svqxtunb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtunb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtunb,_s16,,)(svundef_s16()); - // expected-error@+2 {{'svmla_lane_s16' needs target feature sve2}} - // overload-error@+1 {{'svmla_lane' needs target feature sve2}} + // expected-error@+2 {{'svmla_lane_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmla_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmla_lane,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svrshrnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svrshrnb' needs target feature sve2}} + // expected-error@+2 {{'svrshrnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshrnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshrnb,_n_s16,,)(svundef_s16(), 1); - // expected-error@+2 {{'svwhilerw_s16' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_s16,,)(const_i16_ptr, const_i16_ptr); - // expected-error@+2 {{'svshllb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svshllb' needs target feature sve2}} + // expected-error@+2 {{'svshllb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svshllb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svshllb,_n_s16,,)(svundef_s8(), 2); - // expected-error@+2 {{'svrhadd_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrhadd_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svrhadd_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrhadd_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svrhadd_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrhadd_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svraddhnb_s16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_s16,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svraddhnb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_n_s16,,)(svundef_s16(), i16); - // expected-error@+2 {{'svwhilewr_s16' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_s16,,)(const_i16_ptr, const_i16_ptr); - // expected-error@+2 {{'svmlalb_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svmlalb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svsubwb_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_s16,,)(svundef_s16(), svundef_s8()); - // expected-error@+2 {{'svsubwb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_n_s16,,)(svundef_s16(), i8); // expected-error@+2 {{'svnmatch_s16' needs target feature sve2}} // overload-error@+1 {{'svnmatch' needs target feature sve2}} SVE_ACLE_FUNC(svnmatch,_s16,,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaba_s16' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaba_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svraddhnt_s16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_s16,,)(svundef_s8(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svraddhnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_n_s16,,)(svundef_s8(), svundef_s16(), i16); - // expected-error@+2 {{'svuqadd_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s16,_m,)(pg, svundef_s16(), svundef_u16()); - // expected-error@+2 {{'svuqadd_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s16,_m,)(pg, svundef_s16(), u16); - // expected-error@+2 {{'svuqadd_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s16,_z,)(pg, svundef_s16(), svundef_u16()); - // expected-error@+2 {{'svuqadd_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s16,_z,)(pg, svundef_s16(), u16); - // expected-error@+2 {{'svuqadd_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s16,_x,)(pg, svundef_s16(), svundef_u16()); - // expected-error@+2 {{'svuqadd_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s16,_x,)(pg, svundef_s16(), u16); - // expected-error@+2 {{'sveorbt_s16' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'sveorbt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svbsl_s16' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svbsl_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svshllt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svshllt' needs target feature sve2}} + // expected-error@+2 {{'svshllt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svshllt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svshllt,_n_s16,,)(svundef_s8(), 2); - // expected-error@+2 {{'svsubltb_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubltb' needs target feature sve2}} + // expected-error@+2 {{'svsubltb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubltb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubltb,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svsubltb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsubltb' needs target feature sve2}} + // expected-error@+2 {{'svsubltb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubltb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubltb,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svhsub_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhsub_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhsub_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svhsub_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svhsub_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svhsub_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svaddlb_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svaddlb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svqrdmlah_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqrdmlah_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svqrdmlah_lane_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah_lane' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_lane_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah_lane,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svqdmullb_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmullb' needs target feature sve2}} + // expected-error@+2 {{'svqdmullb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullb,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svqdmullb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqdmullb' needs target feature sve2}} + // expected-error@+2 {{'svqdmullb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullb,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svbsl2n_s16' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svbsl2n_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svaddlt_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svaddlt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svqxtunt_s16' needs target feature sve2}} - // overload-error@+1 {{'svqxtunt' needs target feature sve2}} + // expected-error@+2 {{'svqxtunt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtunt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtunt,_s16,,)(svundef_u8(), svundef_s16()); - // expected-error@+2 {{'svqrshrunt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svqrshrunt' needs target feature sve2}} + // expected-error@+2 {{'svqrshrunt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshrunt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshrunt,_n_s16,,)(svundef_u8(), svundef_s16(), 1); - // expected-error@+2 {{'svabalb_s16' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svabalb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svsublb_s16' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_s16,,)(svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svsublb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_n_s16,,)(svundef_s8(), i8); - // expected-error@+2 {{'svbsl1n_s16' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svbsl1n_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_s16,,)(svundef_s16(), svundef_s16(), i16); - // expected-error@+2 {{'svrshl_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrshl_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrshl_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svrshl_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svrshl_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svrshl_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svaddwt_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_s16,,)(svundef_s16(), svundef_s8()); - // expected-error@+2 {{'svaddwt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_n_s16,,)(svundef_s16(), i8); - // expected-error@+2 {{'svmlslb_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svmlslb_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svmlslt_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_s16,,)(svundef_s16(), svundef_s8(), svundef_s8()); - // expected-error@+2 {{'svmlslt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_n_s16,,)(svundef_s16(), svundef_s8(), i8); - // expected-error@+2 {{'svqneg_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqneg_z' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s16,_z,)(pg, svundef_s16()); - // expected-error@+2 {{'svqneg_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqneg_m' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s16,_m,)(svundef_s16(), pg, svundef_s16()); - // expected-error@+2 {{'svqneg_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqneg_x' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s16,_x,)(pg, svundef_s16()); - // expected-error@+2 {{'svmovlt_s16' needs target feature sve2}} - // overload-error@+1 {{'svmovlt' needs target feature sve2}} + // expected-error@+2 {{'svmovlt_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlt,_s16,,)(svundef_s8()); - // expected-error@+2 {{'svrshrnt_n_s16' needs target feature sve2}} - // overload-error@+1 {{'svrshrnt' needs target feature sve2}} + // expected-error@+2 {{'svrshrnt_n_s16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshrnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshrnt,_n_s16,,)(svundef_s8(), svundef_s16(), 1); - // expected-error@+2 {{'svqshl_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s16,_z,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqshl_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s16,_m,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqshl_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s16,_x,)(pg, svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqshl_n_s16_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s16,_z,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqshl_n_s16_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s16,_m,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svqshl_n_s16_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s16,_x,)(pg, svundef_s16(), i16); - // expected-error@+2 {{'svmullb_s32' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmullb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svmullb_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svmullb_lane' needs target feature sve2}} + // expected-error@+2 {{'svmullb_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb_lane,_s32,,)(svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svqdmlalbt_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalbt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalbt,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmlalbt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalbt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalbt,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svqrdmulh_s32' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_s32,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqrdmulh_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_n_s32,,)(svundef_s32(), i32); - // expected-error@+2 {{'svaddwb_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_s32,,)(svundef_s32(), svundef_s16()); - // expected-error@+2 {{'svaddwb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_n_s32,,)(svundef_s32(), i16); - // expected-error@+2 {{'svsubhnb_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_s32,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svsubhnb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_n_s32,,)(svundef_s32(), i32); - // expected-error@+2 {{'svqdmulh_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_s32,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmulh_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_n_s32,,)(svundef_s32(), i32); - // expected-error@+2 {{'svrsubhnt_s32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_s32,,)(svundef_s16(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrsubhnt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_n_s32,,)(svundef_s16(), svundef_s32(), i32); - // expected-error@+2 {{'svnbsl_s32' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svnbsl_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svqdmlslb_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslb,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmlslb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslb,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svqdmlslb_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslb_lane' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslb_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslb_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslb_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svsubhnt_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_s32,,)(svundef_s16(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svsubhnt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_n_s32,,)(svundef_s16(), svundef_s32(), i32); - // expected-error@+2 {{'svqabs_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqabs_z' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s32,_z,)(pg, svundef_s32()); - // expected-error@+2 {{'svqabs_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqabs_m' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s32,_m,)(svundef_s32(), pg, svundef_s32()); - // expected-error@+2 {{'svqabs_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqabs_x' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s32,_x,)(pg, svundef_s32()); - // expected-error@+2 {{'svwhilegt_b8_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b8_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b8,_s32,,)(i32, i32); - // expected-error@+2 {{'svwhilegt_b16_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b16_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b16,_s32,,)(i32, i32); - // expected-error@+2 {{'svwhilegt_b32_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b32_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b32,_s32,,)(i32, i32); - // expected-error@+2 {{'svwhilegt_b64_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b64_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b64,_s32,,)(i32, i32); - // expected-error@+2 {{'svaddlbt_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddlbt' needs target feature sve2}} + // expected-error@+2 {{'svaddlbt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlbt,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaddlbt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddlbt' needs target feature sve2}} + // expected-error@+2 {{'svaddlbt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlbt,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svtbl2_s32' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_s32,,)(svundef2_s32(), svundef_u32()); - // expected-error@+2 {{'svhsubr_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhsubr_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhsubr_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhsubr_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svhsubr_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svhsubr_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s32,_x,)(pg, svundef_s32(), i32); // expected-error@+2 {{'svhistcnt_s32_z' needs target feature sve2}} // overload-error@+1 {{'svhistcnt_z' needs target feature sve2}} SVE_ACLE_FUNC(svhistcnt,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'sveortb_s32' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'sveortb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svqxtnb_s32' needs target feature sve2}} - // overload-error@+1 {{'svqxtnb' needs target feature sve2}} + // expected-error@+2 {{'svqxtnb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnb,_s32,,)(svundef_s32()); - // expected-error@+2 {{'svmlalt_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmlalt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svmlalt_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlalt_lane' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svaddhnt_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_s32,,)(svundef_s16(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svaddhnt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_n_s32,,)(svundef_s16(), svundef_s32(), i32); // expected-error@+2 {{'svldnt1uh_gather_u32base_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_s32' needs target feature sve2}} @@ -1200,233 +1200,233 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1uh_gather_u32base_index_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_index_s32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1uh_gather, _u32base, _index_s32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svqdmlalt_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalt,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmlalt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalt,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svqdmlalt_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalt_lane' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalt_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalt_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalt_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svbcax_s32' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svbcax_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svqxtnt_s32' needs target feature sve2}} - // overload-error@+1 {{'svqxtnt' needs target feature sve2}} + // expected-error@+2 {{'svqxtnt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnt,_s32,,)(svundef_s16(), svundef_s32()); - // expected-error@+2 {{'svqdmlalb_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalb,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmlalb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalb,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svqdmlalb_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalb_lane' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalb_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalb_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalb_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svqrshl_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqrshl_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqrshl_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqrshl_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqrshl_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqrshl_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svcdot_s32' needs target feature sve2}} - // overload-error@+1 {{'svcdot' needs target feature sve2}} + // expected-error@+2 {{'svcdot_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svcdot' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcdot,_s32,,)(svundef_s32(), svundef_s8(), svundef_s8(), 90); - // expected-error@+2 {{'svsublbt_s32' needs target feature sve2}} - // overload-error@+1 {{'svsublbt' needs target feature sve2}} + // expected-error@+2 {{'svsublbt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublbt,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svsublbt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsublbt' needs target feature sve2}} + // expected-error@+2 {{'svsublbt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublbt,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqdmullt_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmullt' needs target feature sve2}} + // expected-error@+2 {{'svqdmullt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullt,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmullt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmullt' needs target feature sve2}} + // expected-error@+2 {{'svqdmullt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullt,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqdmullt_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmullt_lane' needs target feature sve2}} + // expected-error@+2 {{'svqdmullt_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullt_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullt_lane,_s32,,)(svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svsublt_s32' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svsublt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqdmlslbt_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslbt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslbt,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmlslbt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslbt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslbt,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svadalp_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svadalp_z' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s32,_z,)(pg, svundef_s32(), svundef_s16()); - // expected-error@+2 {{'svadalp_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svadalp_m' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s32,_m,)(pg, svundef_s32(), svundef_s16()); - // expected-error@+2 {{'svadalp_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svadalp_x' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s32,_x,)(pg, svundef_s32(), svundef_s16()); - // expected-error@+2 {{'svwhilege_b8_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b8_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b8,_s32,,)(i32, i32); - // expected-error@+2 {{'svwhilege_b16_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b16_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b16,_s32,,)(i32, i32); - // expected-error@+2 {{'svwhilege_b32_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b32_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b32,_s32,,)(i32, i32); - // expected-error@+2 {{'svwhilege_b64_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b64_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b64,_s32,,)(i32, i32); - // expected-error@+2 {{'svsubwt_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_s32,,)(svundef_s32(), svundef_s16()); - // expected-error@+2 {{'svsubwt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_n_s32,,)(svundef_s32(), i16); - // expected-error@+2 {{'svqsubr_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqsubr_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqsubr_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqsubr_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqsubr_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqsubr_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svaddp_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svaddp_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqadd_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqadd_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqadd_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqadd_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqadd_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqadd_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svabdlb_s32' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svabdlb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svtbx_s32' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_s32,,)(svundef_s32(), svundef_s32(), svundef_u32()); - // expected-error@+2 {{'svabdlt_s32' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svabdlt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svminp_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svminp_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqsub_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqsub_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqsub_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqsub_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqsub_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqsub_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svrsubhnb_s32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_s32,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrsubhnb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_n_s32,,)(svundef_s32(), i32); - // expected-error@+2 {{'svaddhnb_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_s32,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svaddhnb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_n_s32,,)(svundef_s32(), i32); - // expected-error@+2 {{'svabalt_s32' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svabalt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'sveor3_s32' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'sveor3_n_s32' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svhadd_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhadd_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svhadd_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhadd_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svhadd_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhadd_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svmovlb_s32' needs target feature sve2}} - // overload-error@+1 {{'svmovlb' needs target feature sve2}} + // expected-error@+2 {{'svmovlb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlb,_s32,,)(svundef_s16()); // expected-error@+2 {{'svstnt1_scatter_u32base_s32' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter' needs target feature sve2}} @@ -1440,35 +1440,35 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1_scatter_u32base_index_s32' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1_scatter, _u32base, _index, _s32)(pg, svundef_u32(), i64, svundef_s32()); - // expected-error@+2 {{'svqrdmlsh_s32' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqrdmlsh_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svqdmlslt_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslt,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmlslt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslt,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svqdmlslt_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslt_lane' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslt_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslt_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslt_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svmaxp_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmaxp_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmullt_s32' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmullt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svmullt_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svmullt_lane' needs target feature sve2}} + // expected-error@+2 {{'svmullt_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt_lane,_s32,,)(svundef_s16(), svundef_s16(), 1); // expected-error@+2 {{'svldnt1sh_gather_u32base_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_s32' needs target feature sve2}} @@ -1482,47 +1482,47 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sh_gather_u32base_index_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_index_s32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sh_gather, _u32base, _index_s32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svqxtunb_s32' needs target feature sve2}} - // overload-error@+1 {{'svqxtunb' needs target feature sve2}} + // expected-error@+2 {{'svqxtunb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtunb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtunb,_s32,,)(svundef_s32()); - // expected-error@+2 {{'svwhilerw_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_s32,,)(const_i32_ptr, const_i32_ptr); - // expected-error@+2 {{'svrhadd_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrhadd_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svrhadd_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrhadd_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svrhadd_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrhadd_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svraddhnb_s32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_s32,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svraddhnb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_n_s32,,)(svundef_s32(), i32); - // expected-error@+2 {{'svwhilewr_s32' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_s32,,)(const_i32_ptr, const_i32_ptr); - // expected-error@+2 {{'svmlalb_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmlalb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svmlalb_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlalb_lane' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); // expected-error@+2 {{'svldnt1sb_gather_u32base_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_s32' needs target feature sve2}} @@ -1533,11 +1533,11 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sb_gather_u32base_offset_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_offset_s32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sb_gather, _u32base, _offset_s32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svsubwb_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_s32,,)(svundef_s32(), svundef_s16()); - // expected-error@+2 {{'svsubwb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_n_s32,,)(svundef_s32(), i16); // expected-error@+2 {{'svldnt1ub_gather_u32base_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_s32' needs target feature sve2}} @@ -1548,71 +1548,71 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1ub_gather_u32base_offset_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_offset_s32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1ub_gather, _u32base, _offset_s32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svaba_s32' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svaba_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svraddhnt_s32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_s32,,)(svundef_s16(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svraddhnt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_n_s32,,)(svundef_s16(), svundef_s32(), i32); - // expected-error@+2 {{'svuqadd_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s32,_m,)(pg, svundef_s32(), svundef_u32()); - // expected-error@+2 {{'svuqadd_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s32,_m,)(pg, svundef_s32(), u32); - // expected-error@+2 {{'svuqadd_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s32,_z,)(pg, svundef_s32(), svundef_u32()); - // expected-error@+2 {{'svuqadd_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s32,_z,)(pg, svundef_s32(), u32); - // expected-error@+2 {{'svuqadd_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s32,_x,)(pg, svundef_s32(), svundef_u32()); - // expected-error@+2 {{'svuqadd_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s32,_x,)(pg, svundef_s32(), u32); - // expected-error@+2 {{'sveorbt_s32' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'sveorbt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svbsl_s32' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svbsl_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svsubltb_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubltb' needs target feature sve2}} + // expected-error@+2 {{'svsubltb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubltb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubltb,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svsubltb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsubltb' needs target feature sve2}} + // expected-error@+2 {{'svsubltb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubltb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubltb,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svhsub_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhsub_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhsub_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svhsub_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svhsub_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svhsub_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s32,_x,)(pg, svundef_s32(), i32); // expected-error@+2 {{'svldnt1_gather_u32base_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_s32' needs target feature sve2}} @@ -1626,26 +1626,26 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1_gather_u32base_index_s32' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_index_s32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1_gather, _u32base, _index_s32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svaddlb_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaddlb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqrdmlah_s32' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqrdmlah_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svqdmullb_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmullb' needs target feature sve2}} + // expected-error@+2 {{'svqdmullb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullb,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svqdmullb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmullb' needs target feature sve2}} + // expected-error@+2 {{'svqdmullb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullb,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqdmullb_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svqdmullb_lane' needs target feature sve2}} + // expected-error@+2 {{'svqdmullb_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullb_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullb_lane,_s32,,)(svundef_s16(), svundef_s16(), 1); // expected-error@+2 {{'svstnt1h_scatter_u32base_s32' needs target feature sve2}} // overload-error@+1 {{'svstnt1h_scatter' needs target feature sve2}} @@ -1668,243 +1668,243 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1b_scatter_u32base_offset_s32' needs target feature sve2}} // overload-error@+1 {{'svstnt1b_scatter_offset' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1b_scatter, _u32base, _offset, _s32)(pg, svundef_u32(), i64, svundef_s32()); - // expected-error@+2 {{'svbsl2n_s32' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svbsl2n_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svaddlt_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svaddlt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svqxtunt_s32' needs target feature sve2}} - // overload-error@+1 {{'svqxtunt' needs target feature sve2}} + // expected-error@+2 {{'svqxtunt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtunt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtunt,_s32,,)(svundef_u16(), svundef_s32()); - // expected-error@+2 {{'svabalb_s32' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svabalb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svsublb_s32' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_s32,,)(svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svsublb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_n_s32,,)(svundef_s16(), i16); - // expected-error@+2 {{'svbsl1n_s32' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svbsl1n_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_s32,,)(svundef_s32(), svundef_s32(), i32); - // expected-error@+2 {{'svrshl_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrshl_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrshl_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svrshl_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svrshl_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svrshl_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svaddwt_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_s32,,)(svundef_s32(), svundef_s16()); - // expected-error@+2 {{'svaddwt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_n_s32,,)(svundef_s32(), i16); - // expected-error@+2 {{'svmlslb_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmlslb_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svmlslb_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlslb_lane' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svmlslt_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16()); - // expected-error@+2 {{'svmlslt_n_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_n_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_n_s32,,)(svundef_s32(), svundef_s16(), i16); - // expected-error@+2 {{'svmlslt_lane_s32' needs target feature sve2}} - // overload-error@+1 {{'svmlslt_lane' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_lane_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt_lane' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt_lane,_s32,,)(svundef_s32(), svundef_s16(), svundef_s16(), 1); - // expected-error@+2 {{'svqneg_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqneg_z' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s32,_z,)(pg, svundef_s32()); - // expected-error@+2 {{'svqneg_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqneg_m' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s32,_m,)(svundef_s32(), pg, svundef_s32()); - // expected-error@+2 {{'svqneg_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqneg_x' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s32,_x,)(pg, svundef_s32()); - // expected-error@+2 {{'svmovlt_s32' needs target feature sve2}} - // overload-error@+1 {{'svmovlt' needs target feature sve2}} + // expected-error@+2 {{'svmovlt_s32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlt,_s32,,)(svundef_s16()); - // expected-error@+2 {{'svqshl_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s32,_z,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqshl_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s32,_m,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqshl_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s32,_x,)(pg, svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqshl_n_s32_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s32,_z,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqshl_n_s32_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s32,_m,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svqshl_n_s32_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s32,_x,)(pg, svundef_s32(), i32); - // expected-error@+2 {{'svmullb_s64' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmullb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svqdmlalbt_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalbt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalbt,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmlalbt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalbt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalbt,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svqrdmulh_s64' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_s64,,)(svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqrdmulh_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqrdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmulh_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmulh,_n_s64,,)(svundef_s64(), i64); - // expected-error@+2 {{'svaddwb_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_s64,,)(svundef_s64(), svundef_s32()); - // expected-error@+2 {{'svaddwb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_n_s64,,)(svundef_s64(), i32); - // expected-error@+2 {{'svsubhnb_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_s64,,)(svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svsubhnb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_n_s64,,)(svundef_s64(), i64); - // expected-error@+2 {{'svqdmulh_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_s64,,)(svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqdmulh_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmulh' needs target feature sve2}} + // expected-error@+2 {{'svqdmulh_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmulh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmulh,_n_s64,,)(svundef_s64(), i64); - // expected-error@+2 {{'svrsubhnt_s64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_s64,,)(svundef_s32(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrsubhnt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_n_s64,,)(svundef_s32(), svundef_s64(), i64); - // expected-error@+2 {{'svnbsl_s64' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svnbsl_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svqdmlslb_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslb,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmlslb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslb,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svsubhnt_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_s64,,)(svundef_s32(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svsubhnt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_n_s64,,)(svundef_s32(), svundef_s64(), i64); - // expected-error@+2 {{'svqabs_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqabs_z' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s64,_z,)(pg, svundef_s64()); - // expected-error@+2 {{'svqabs_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqabs_m' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s64,_m,)(svundef_s64(), pg, svundef_s64()); - // expected-error@+2 {{'svqabs_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqabs_x' needs target feature sve2}} + // expected-error@+2 {{'svqabs_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqabs_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqabs,_s64,_x,)(pg, svundef_s64()); - // expected-error@+2 {{'svwhilegt_b8_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b8_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b8,_s64,,)(i64, i64); - // expected-error@+2 {{'svwhilegt_b16_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b16_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b16,_s64,,)(i64, i64); - // expected-error@+2 {{'svwhilegt_b32_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b32_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b32,_s64,,)(i64, i64); - // expected-error@+2 {{'svwhilegt_b64_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b64_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b64,_s64,,)(i64, i64); - // expected-error@+2 {{'svaddlbt_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddlbt' needs target feature sve2}} + // expected-error@+2 {{'svaddlbt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlbt,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svaddlbt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddlbt' needs target feature sve2}} + // expected-error@+2 {{'svaddlbt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlbt,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svtbl2_s64' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_s64,,)(svundef2_s64(), svundef_u64()); - // expected-error@+2 {{'svhsubr_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhsubr_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhsubr_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhsubr_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svhsubr_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svhsubr_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_s64,_x,)(pg, svundef_s64(), i64); // expected-error@+2 {{'svhistcnt_s64_z' needs target feature sve2}} // overload-error@+1 {{'svhistcnt_z' needs target feature sve2}} SVE_ACLE_FUNC(svhistcnt,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'sveortb_s64' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'sveortb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svqxtnb_s64' needs target feature sve2}} - // overload-error@+1 {{'svqxtnb' needs target feature sve2}} + // expected-error@+2 {{'svqxtnb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnb,_s64,,)(svundef_s64()); - // expected-error@+2 {{'svmlalt_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmlalt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svaddhnt_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_s64,,)(svundef_s32(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svaddhnt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_n_s64,,)(svundef_s32(), svundef_s64(), i64); // expected-error@+2 {{'svldnt1uh_gather_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_s64' needs target feature sve2}} @@ -1927,221 +1927,221 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1uh_gather_u64base_index_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_index_s64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1uh_gather, _u64base, _index_s64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svqdmlalt_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalt,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmlalt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalt,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svbcax_s64' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svbcax_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svqxtnt_s64' needs target feature sve2}} - // overload-error@+1 {{'svqxtnt' needs target feature sve2}} + // expected-error@+2 {{'svqxtnt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnt,_s64,,)(svundef_s32(), svundef_s64()); - // expected-error@+2 {{'svqdmlalb_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalb,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmlalb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlalb' needs target feature sve2}} + // expected-error@+2 {{'svqdmlalb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlalb,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svqrshl_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqrshl_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqrshl_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqrshl_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqrshl_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqrshl_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_s64,_x,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svsublbt_s64' needs target feature sve2}} - // overload-error@+1 {{'svsublbt' needs target feature sve2}} + // expected-error@+2 {{'svsublbt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublbt,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svsublbt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsublbt' needs target feature sve2}} + // expected-error@+2 {{'svsublbt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublbt,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svqdmullt_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmullt' needs target feature sve2}} + // expected-error@+2 {{'svqdmullt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullt,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmullt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmullt' needs target feature sve2}} + // expected-error@+2 {{'svqdmullt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullt,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svsublt_s64' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svsublt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svqdmlslbt_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslbt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslbt,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmlslbt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslbt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslbt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslbt,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svadalp_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svadalp_z' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s64,_z,)(pg, svundef_s64(), svundef_s32()); - // expected-error@+2 {{'svadalp_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svadalp_m' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s64,_m,)(pg, svundef_s64(), svundef_s32()); - // expected-error@+2 {{'svadalp_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svadalp_x' needs target feature sve2}} + // expected-error@+2 {{'svadalp_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_s64,_x,)(pg, svundef_s64(), svundef_s32()); - // expected-error@+2 {{'svwhilege_b8_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b8_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b8,_s64,,)(i64, i64); - // expected-error@+2 {{'svwhilege_b16_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b16_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b16,_s64,,)(i64, i64); - // expected-error@+2 {{'svwhilege_b32_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b32_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b32,_s64,,)(i64, i64); - // expected-error@+2 {{'svwhilege_b64_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b64_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b64,_s64,,)(i64, i64); - // expected-error@+2 {{'svsubwt_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_s64,,)(svundef_s64(), svundef_s32()); - // expected-error@+2 {{'svsubwt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_n_s64,,)(svundef_s64(), i32); - // expected-error@+2 {{'svqsubr_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqsubr_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqsubr_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqsubr_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqsubr_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqsubr_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_s64,_x,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svaddp_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svaddp_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqadd_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqadd_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqadd_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqadd_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqadd_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqadd_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_s64,_x,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svabdlb_s64' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svabdlb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svtbx_s64' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_s64,,)(svundef_s64(), svundef_s64(), svundef_u64()); - // expected-error@+2 {{'svabdlt_s64' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svabdlt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svminp_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svminp_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqsub_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqsub_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqsub_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqsub_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqsub_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqsub_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_s64,_x,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svrsubhnb_s64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_s64,,)(svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrsubhnb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_n_s64,,)(svundef_s64(), i64); - // expected-error@+2 {{'svaddhnb_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_s64,,)(svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svaddhnb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_n_s64,,)(svundef_s64(), i64); - // expected-error@+2 {{'svabalt_s64' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svabalt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'sveor3_s64' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'sveor3_n_s64' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svhadd_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhadd_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svhadd_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhadd_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svhadd_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhadd_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_s64,_x,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svmovlb_s64' needs target feature sve2}} - // overload-error@+1 {{'svmovlb' needs target feature sve2}} + // expected-error@+2 {{'svmovlb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlb,_s64,,)(svundef_s32()); // expected-error@+2 {{'svstnt1_scatter_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter' needs target feature sve2}} @@ -2164,29 +2164,29 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1_scatter_u64base_index_s64' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1_scatter, _u64base, _index, _s64)(pg, svundef_u64(), i64, svundef_s64()); - // expected-error@+2 {{'svqrdmlsh_s64' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqrdmlsh_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlsh' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlsh_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlsh' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlsh,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svqdmlslt_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslt,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmlslt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmlslt' needs target feature sve2}} + // expected-error@+2 {{'svqdmlslt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmlslt,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svmaxp_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svmaxp_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svmullt_s64' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmullt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_n_s64,,)(svundef_s32(), i32); // expected-error@+2 {{'svldnt1sh_gather_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_s64' needs target feature sve2}} @@ -2209,44 +2209,44 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sh_gather_u64base_index_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_index_s64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sh_gather, _u64base, _index_s64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svqxtunb_s64' needs target feature sve2}} - // overload-error@+1 {{'svqxtunb' needs target feature sve2}} + // expected-error@+2 {{'svqxtunb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtunb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtunb,_s64,,)(svundef_s64()); - // expected-error@+2 {{'svwhilerw_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_s64,,)(const_i64_ptr, const_i64_ptr); - // expected-error@+2 {{'svrhadd_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrhadd_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svrhadd_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrhadd_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svrhadd_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrhadd_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_s64,_x,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svraddhnb_s64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_s64,,)(svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svraddhnb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_n_s64,,)(svundef_s64(), i64); - // expected-error@+2 {{'svwhilewr_s64' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_s64,,)(const_i64_ptr, const_i64_ptr); - // expected-error@+2 {{'svmlalb_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmlalb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_n_s64,,)(svundef_s64(), svundef_s32(), i32); // expected-error@+2 {{'svldnt1sb_gather_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_s64' needs target feature sve2}} @@ -2260,11 +2260,11 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sb_gather_u64base_offset_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_offset_s64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sb_gather, _u64base, _offset_s64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svsubwb_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_s64,,)(svundef_s64(), svundef_s32()); - // expected-error@+2 {{'svsubwb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_n_s64,,)(svundef_s64(), i32); // expected-error@+2 {{'svldnt1ub_gather_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_s64' needs target feature sve2}} @@ -2278,41 +2278,41 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1ub_gather_u64base_offset_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_offset_s64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1ub_gather, _u64base, _offset_s64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svaba_s64' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svaba_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svraddhnt_s64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_s64,,)(svundef_s32(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svraddhnt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_n_s64,,)(svundef_s32(), svundef_s64(), i64); - // expected-error@+2 {{'svuqadd_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s64,_m,)(pg, svundef_s64(), svundef_u64()); - // expected-error@+2 {{'svuqadd_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s64,_m,)(pg, svundef_s64(), u64); - // expected-error@+2 {{'svuqadd_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s64,_z,)(pg, svundef_s64(), svundef_u64()); - // expected-error@+2 {{'svuqadd_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s64,_z,)(pg, svundef_s64(), u64); - // expected-error@+2 {{'svuqadd_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_s64,_x,)(pg, svundef_s64(), svundef_u64()); - // expected-error@+2 {{'svuqadd_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svuqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svuqadd_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svuqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svuqadd,_n_s64,_x,)(pg, svundef_s64(), u64); - // expected-error@+2 {{'sveorbt_s64' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'sveorbt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_s64,,)(svundef_s64(), svundef_s64(), i64); // expected-error@+2 {{'svldnt1sw_gather_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sw_gather_s64' needs target feature sve2}} @@ -2335,35 +2335,35 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sw_gather_u64base_index_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sw_gather_index_s64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sw_gather, _u64base, _index_s64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svbsl_s64' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svbsl_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svsubltb_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubltb' needs target feature sve2}} + // expected-error@+2 {{'svsubltb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubltb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubltb,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svsubltb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsubltb' needs target feature sve2}} + // expected-error@+2 {{'svsubltb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubltb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubltb,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svhsub_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhsub_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhsub_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svhsub_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svhsub_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svhsub_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_s64,_x,)(pg, svundef_s64(), i64); // expected-error@+2 {{'svldnt1_gather_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_s64' needs target feature sve2}} @@ -2386,23 +2386,23 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1_gather_u64base_index_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_index_s64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1_gather, _u64base, _index_s64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svaddlb_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svaddlb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svqrdmlah_s64' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqrdmlah_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqrdmlah' needs target feature sve2}} + // expected-error@+2 {{'svqrdmlah_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrdmlah' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrdmlah,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svqdmullb_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmullb' needs target feature sve2}} + // expected-error@+2 {{'svqdmullb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullb,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svqdmullb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svqdmullb' needs target feature sve2}} + // expected-error@+2 {{'svqdmullb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqdmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqdmullb,_n_s64,,)(svundef_s32(), i32); // expected-error@+2 {{'svldnt1uw_gather_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svldnt1uw_gather_s64' needs target feature sve2}} @@ -2458,17 +2458,17 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1b_scatter_u64base_offset_s64' needs target feature sve2}} // overload-error@+1 {{'svstnt1b_scatter_offset' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1b_scatter, _u64base, _offset, _s64)(pg, svundef_u64(), i64, svundef_s64()); - // expected-error@+2 {{'svbsl2n_s64' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svbsl2n_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svaddlt_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svaddlt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_n_s64,,)(svundef_s32(), i32); // expected-error@+2 {{'svstnt1w_scatter_u64base_s64' needs target feature sve2}} // overload-error@+1 {{'svstnt1w_scatter' needs target feature sve2}} @@ -2491,980 +2491,980 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1w_scatter_u64base_index_s64' needs target feature sve2}} // overload-error@+1 {{'svstnt1w_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1w_scatter, _u64base, _index, _s64)(pg, svundef_u64(), i64, svundef_s64()); - // expected-error@+2 {{'svqxtunt_s64' needs target feature sve2}} - // overload-error@+1 {{'svqxtunt' needs target feature sve2}} + // expected-error@+2 {{'svqxtunt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtunt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtunt,_s64,,)(svundef_u32(), svundef_s64()); - // expected-error@+2 {{'svabalb_s64' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svabalb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svsublb_s64' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_s64,,)(svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svsublb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_n_s64,,)(svundef_s32(), i32); - // expected-error@+2 {{'svbsl1n_s64' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svbsl1n_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_s64,,)(svundef_s64(), svundef_s64(), i64); - // expected-error@+2 {{'svrshl_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrshl_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrshl_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svrshl_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svrshl_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svrshl_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_s64,_x,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svaddwt_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_s64,,)(svundef_s64(), svundef_s32()); - // expected-error@+2 {{'svaddwt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_n_s64,,)(svundef_s64(), i32); - // expected-error@+2 {{'svmlslb_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmlslb_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svmlslt_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_s64,,)(svundef_s64(), svundef_s32(), svundef_s32()); - // expected-error@+2 {{'svmlslt_n_s64' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_n_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_n_s64,,)(svundef_s64(), svundef_s32(), i32); - // expected-error@+2 {{'svqneg_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqneg_z' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s64,_z,)(pg, svundef_s64()); - // expected-error@+2 {{'svqneg_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqneg_m' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s64,_m,)(svundef_s64(), pg, svundef_s64()); - // expected-error@+2 {{'svqneg_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqneg_x' needs target feature sve2}} + // expected-error@+2 {{'svqneg_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqneg_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqneg,_s64,_x,)(pg, svundef_s64()); - // expected-error@+2 {{'svmovlt_s64' needs target feature sve2}} - // overload-error@+1 {{'svmovlt' needs target feature sve2}} + // expected-error@+2 {{'svmovlt_s64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlt,_s64,,)(svundef_s32()); - // expected-error@+2 {{'svqshl_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s64,_z,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqshl_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s64,_m,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqshl_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_s64,_x,)(pg, svundef_s64(), svundef_s64()); - // expected-error@+2 {{'svqshl_n_s64_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s64,_z,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqshl_n_s64_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s64,_m,)(pg, svundef_s64(), i64); - // expected-error@+2 {{'svqshl_n_s64_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_s64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_s64,_x,)(pg, svundef_s64(), i64); // expected-error@+2 {{'svhistseg_u8' needs target feature sve2}} // overload-error@+1 {{'svhistseg' needs target feature sve2}} SVE_ACLE_FUNC(svhistseg,_u8,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svpmullb_pair_u8' needs target feature sve2}} - // overload-error@+1 {{'svpmullb_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_pair_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb_pair,_u8,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svpmullb_pair_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svpmullb_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_pair_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb_pair,_n_u8,,)(svundef_u8(), u8); - // expected-error@+2 {{'svnbsl_u8' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svnbsl_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svtbl2_u8' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_u8,,)(svundef2_u8(), svundef_u8()); - // expected-error@+2 {{'svhsubr_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u8,_z,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhsubr_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhsubr_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhsubr_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u8,_z,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svhsubr_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u8,_m,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svhsubr_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u8,_x,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svpmul_u8' needs target feature sve2}} - // overload-error@+1 {{'svpmul' needs target feature sve2}} + // expected-error@+2 {{'svpmul_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmul' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmul,_u8,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svpmul_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svpmul' needs target feature sve2}} + // expected-error@+2 {{'svpmul_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmul' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmul,_n_u8,,)(svundef_u8(), u8); - // expected-error@+2 {{'sveortb_u8' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'sveortb_n_u8' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svbcax_u8' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svbcax_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svqrshl_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u8,_z,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svqrshl_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u8,_m,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svqrshl_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u8,_x,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svqrshl_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u8,_z,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svqrshl_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u8,_m,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svqrshl_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u8,_x,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svpmullt_pair_u8' needs target feature sve2}} - // overload-error@+1 {{'svpmullt_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_pair_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt_pair,_u8,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svpmullt_pair_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svpmullt_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_pair_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt_pair,_n_u8,,)(svundef_u8(), u8); - // expected-error@+2 {{'svqsubr_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u8,_z,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqsubr_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqsubr_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqsubr_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u8,_z,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svqsubr_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u8,_m,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svqsubr_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u8,_x,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svaddp_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svaddp_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqadd_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqadd_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u8,_m,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svqadd_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u8,_z,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqadd_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u8,_z,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svqadd_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqadd_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u8,_x,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svtbx_u8' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svminp_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svminp_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svsqadd_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u8,_m,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svsqadd_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u8,_m,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svsqadd_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u8,_z,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svsqadd_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u8,_z,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svsqadd_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u8,_x,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svsqadd_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u8,_x,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svqsub_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u8,_z,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqsub_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqsub_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svqsub_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u8,_z,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svqsub_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u8,_m,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svqsub_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u8,_x,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'sveor3_u8' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'sveor3_n_u8' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svhadd_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhadd_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u8,_m,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svhadd_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u8,_z,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhadd_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u8,_z,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svhadd_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhadd_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u8,_x,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svmaxp_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svmaxp_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u8,_x,)(pg, svundef_u8(), svundef_u8()); // expected-error@+2 {{'svmatch_u8' needs target feature sve2}} // overload-error@+1 {{'svmatch' needs target feature sve2}} SVE_ACLE_FUNC(svmatch,_u8,,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svwhilerw_u8' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_u8,,)(const_u8_ptr, const_u8_ptr); - // expected-error@+2 {{'svrhadd_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svrhadd_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u8,_m,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svrhadd_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u8,_z,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svrhadd_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u8,_z,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svrhadd_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svrhadd_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u8,_x,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svwhilewr_u8' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_u8,,)(const_u8_ptr, const_u8_ptr); // expected-error@+2 {{'svnmatch_u8' needs target feature sve2}} // overload-error@+1 {{'svnmatch' needs target feature sve2}} SVE_ACLE_FUNC(svnmatch,_u8,,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svaba_u8' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svaba_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'sveorbt_u8' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'sveorbt_n_u8' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svbsl_u8' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svbsl_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svhsub_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u8,_z,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhsub_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u8,_m,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhsub_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u8,_x,)(pg, svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svhsub_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u8,_z,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svhsub_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u8,_m,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svhsub_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u8,_x,)(pg, svundef_u8(), u8); - // expected-error@+2 {{'svbsl2n_u8' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svbsl2n_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svbsl1n_u8' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svbsl1n_n_u8' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_u8' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_u8,,)(svundef_u8(), svundef_u8(), u8); - // expected-error@+2 {{'svrshl_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u8,_z,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svrshl_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u8,_m,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svrshl_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u8,_x,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svrshl_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u8,_z,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svrshl_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u8,_m,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svrshl_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u8,_x,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svqshl_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u8,_z,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svqshl_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u8,_m,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svqshl_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u8,_x,)(pg, svundef_u8(), svundef_s8()); - // expected-error@+2 {{'svqshl_n_u8_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u8_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u8,_z,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svqshl_n_u8_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u8_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u8,_m,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svqshl_n_u8_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u8_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u8,_x,)(pg, svundef_u8(), i8); - // expected-error@+2 {{'svmullb_u16' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svmullb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svpmullb_u16' needs target feature sve2}} - // overload-error@+1 {{'svpmullb' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svpmullb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svpmullb' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svaddwb_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_u16,,)(svundef_u16(), svundef_u8()); - // expected-error@+2 {{'svaddwb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_n_u16,,)(svundef_u16(), u8); - // expected-error@+2 {{'svsubhnb_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_u16,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svsubhnb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_n_u16,,)(svundef_u16(), u16); - // expected-error@+2 {{'svrsubhnt_u16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_u16,,)(svundef_u8(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svrsubhnt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_n_u16,,)(svundef_u8(), svundef_u16(), u16); - // expected-error@+2 {{'svnbsl_u16' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svnbsl_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svsubhnt_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_u16,,)(svundef_u8(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svsubhnt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_n_u16,,)(svundef_u8(), svundef_u16(), u16); - // expected-error@+2 {{'svtbl2_u16' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_u16,,)(svundef2_u16(), svundef_u16()); - // expected-error@+2 {{'svhsubr_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u16,_z,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhsubr_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhsubr_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhsubr_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u16,_z,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svhsubr_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u16,_m,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svhsubr_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u16,_x,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'sveortb_u16' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'sveortb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svqxtnb_u16' needs target feature sve2}} - // overload-error@+1 {{'svqxtnb' needs target feature sve2}} + // expected-error@+2 {{'svqxtnb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnb,_u16,,)(svundef_u16()); - // expected-error@+2 {{'svmlalt_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_u16,,)(svundef_u16(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svmlalt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_n_u16,,)(svundef_u16(), svundef_u8(), u8); - // expected-error@+2 {{'svaddhnt_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_u16,,)(svundef_u8(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svaddhnt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_n_u16,,)(svundef_u8(), svundef_u16(), u16); - // expected-error@+2 {{'svbcax_u16' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svbcax_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svqxtnt_u16' needs target feature sve2}} - // overload-error@+1 {{'svqxtnt' needs target feature sve2}} + // expected-error@+2 {{'svqxtnt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnt,_u16,,)(svundef_u8(), svundef_u16()); - // expected-error@+2 {{'svqrshl_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u16,_z,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svqrshl_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u16,_m,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svqrshl_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u16,_x,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svqrshl_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u16,_z,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svqrshl_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u16,_m,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svqrshl_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u16,_x,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svsublt_u16' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svsublt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svadalp_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svadalp_z' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u16,_z,)(pg, svundef_u16(), svundef_u8()); - // expected-error@+2 {{'svadalp_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svadalp_m' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u16,_m,)(pg, svundef_u16(), svundef_u8()); - // expected-error@+2 {{'svadalp_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svadalp_x' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u16,_x,)(pg, svundef_u16(), svundef_u8()); - // expected-error@+2 {{'svpmullt_u16' needs target feature sve2}} - // overload-error@+1 {{'svpmullt' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svpmullt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svpmullt' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svsubwt_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_u16,,)(svundef_u16(), svundef_u8()); - // expected-error@+2 {{'svsubwt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_n_u16,,)(svundef_u16(), u8); - // expected-error@+2 {{'svqsubr_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u16,_z,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqsubr_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqsubr_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqsubr_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u16,_z,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svqsubr_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u16,_m,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svqsubr_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u16,_x,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svaddp_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svaddp_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqadd_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqadd_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u16,_m,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svqadd_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u16,_z,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqadd_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u16,_z,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svqadd_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqadd_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u16,_x,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svabdlb_u16' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svabdlb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svtbx_u16' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svabdlt_u16' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svabdlt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svminp_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svminp_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svsqadd_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u16,_m,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svsqadd_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u16,_m,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svsqadd_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u16,_z,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svsqadd_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u16,_z,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svsqadd_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u16,_x,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svsqadd_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u16,_x,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svqsub_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u16,_z,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqsub_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqsub_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svqsub_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u16,_z,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svqsub_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u16,_m,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svqsub_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u16,_x,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svrsubhnb_u16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_u16,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svrsubhnb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_n_u16,,)(svundef_u16(), u16); - // expected-error@+2 {{'svaddhnb_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_u16,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svaddhnb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_n_u16,,)(svundef_u16(), u16); - // expected-error@+2 {{'svabalt_u16' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_u16,,)(svundef_u16(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svabalt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_n_u16,,)(svundef_u16(), svundef_u8(), u8); - // expected-error@+2 {{'sveor3_u16' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'sveor3_n_u16' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svhadd_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhadd_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u16,_m,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svhadd_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u16,_z,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhadd_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u16,_z,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svhadd_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhadd_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u16,_x,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svmovlb_u16' needs target feature sve2}} - // overload-error@+1 {{'svmovlb' needs target feature sve2}} + // expected-error@+2 {{'svmovlb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlb,_u16,,)(svundef_u8()); - // expected-error@+2 {{'svmaxp_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmaxp_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmullt_u16' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svmullt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_n_u16,,)(svundef_u8(), u8); // expected-error@+2 {{'svmatch_u16' needs target feature sve2}} // overload-error@+1 {{'svmatch' needs target feature sve2}} SVE_ACLE_FUNC(svmatch,_u16,,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svwhilerw_u16' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_u16,,)(const_u16_ptr, const_u16_ptr); - // expected-error@+2 {{'svrhadd_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svrhadd_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u16,_m,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svrhadd_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u16,_z,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svrhadd_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u16,_z,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svrhadd_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svrhadd_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u16,_x,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svraddhnb_u16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_u16,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svraddhnb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_n_u16,,)(svundef_u16(), u16); - // expected-error@+2 {{'svwhilewr_u16' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_u16,,)(const_u16_ptr, const_u16_ptr); - // expected-error@+2 {{'svmlalb_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_u16,,)(svundef_u16(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svmlalb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_n_u16,,)(svundef_u16(), svundef_u8(), u8); - // expected-error@+2 {{'svsubwb_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_u16,,)(svundef_u16(), svundef_u8()); - // expected-error@+2 {{'svsubwb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_n_u16,,)(svundef_u16(), u8); // expected-error@+2 {{'svnmatch_u16' needs target feature sve2}} // overload-error@+1 {{'svnmatch' needs target feature sve2}} SVE_ACLE_FUNC(svnmatch,_u16,,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svaba_u16' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svaba_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svraddhnt_u16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_u16,,)(svundef_u8(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svraddhnt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_n_u16,,)(svundef_u8(), svundef_u16(), u16); - // expected-error@+2 {{'sveorbt_u16' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'sveorbt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svbsl_u16' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svbsl_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svhsub_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u16,_z,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhsub_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u16,_m,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhsub_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u16,_x,)(pg, svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svhsub_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u16,_z,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svhsub_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u16,_m,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svhsub_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u16,_x,)(pg, svundef_u16(), u16); - // expected-error@+2 {{'svaddlb_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svaddlb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svbsl2n_u16' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svbsl2n_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svaddlt_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svaddlt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svabalb_u16' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_u16,,)(svundef_u16(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svabalb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_n_u16,,)(svundef_u16(), svundef_u8(), u8); - // expected-error@+2 {{'svsublb_u16' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_u16,,)(svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svsublb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_n_u16,,)(svundef_u8(), u8); - // expected-error@+2 {{'svbsl1n_u16' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svbsl1n_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_u16,,)(svundef_u16(), svundef_u16(), u16); - // expected-error@+2 {{'svrshl_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u16,_z,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svrshl_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u16,_m,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svrshl_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u16,_x,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svrshl_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u16,_z,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svrshl_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u16,_m,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svrshl_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u16,_x,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svaddwt_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_u16,,)(svundef_u16(), svundef_u8()); - // expected-error@+2 {{'svaddwt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_n_u16,,)(svundef_u16(), u8); - // expected-error@+2 {{'svmlslb_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_u16,,)(svundef_u16(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svmlslb_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_n_u16,,)(svundef_u16(), svundef_u8(), u8); - // expected-error@+2 {{'svmlslt_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_u16,,)(svundef_u16(), svundef_u8(), svundef_u8()); - // expected-error@+2 {{'svmlslt_n_u16' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_n_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_n_u16,,)(svundef_u16(), svundef_u8(), u8); - // expected-error@+2 {{'svmovlt_u16' needs target feature sve2}} - // overload-error@+1 {{'svmovlt' needs target feature sve2}} + // expected-error@+2 {{'svmovlt_u16' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlt,_u16,,)(svundef_u8()); - // expected-error@+2 {{'svqshl_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u16,_z,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svqshl_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u16,_m,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svqshl_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u16,_x,)(pg, svundef_u16(), svundef_s16()); - // expected-error@+2 {{'svqshl_n_u16_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u16,_z,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svqshl_n_u16_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u16,_m,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svqshl_n_u16_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u16,_x,)(pg, svundef_u16(), i16); - // expected-error@+2 {{'svmullb_u32' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmullb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_n_u32,,)(svundef_u16(), u16); - // expected-error@+2 {{'svpmullb_pair_u32' needs target feature sve2}} - // overload-error@+1 {{'svpmullb_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_pair_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb_pair,_u32,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svpmullb_pair_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svpmullb_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_pair_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb_pair,_n_u32,,)(svundef_u32(), u32); - // expected-error@+2 {{'svaddwb_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_u32,,)(svundef_u32(), svundef_u16()); - // expected-error@+2 {{'svaddwb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_n_u32,,)(svundef_u32(), u16); - // expected-error@+2 {{'svsubhnb_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_u32,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsubhnb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_n_u32,,)(svundef_u32(), u32); - // expected-error@+2 {{'svrsubhnt_u32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_u32,,)(svundef_u16(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svrsubhnt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_n_u32,,)(svundef_u16(), svundef_u32(), u32); - // expected-error@+2 {{'svnbsl_u32' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svnbsl_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svsubhnt_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_u32,,)(svundef_u16(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsubhnt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_n_u32,,)(svundef_u16(), svundef_u32(), u32); - // expected-error@+2 {{'svwhilegt_b8_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b8_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b8,_u32,,)(u32, u32); - // expected-error@+2 {{'svwhilegt_b16_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b16_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b16,_u32,,)(u32, u32); - // expected-error@+2 {{'svwhilegt_b32_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b32_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b32,_u32,,)(u32, u32); - // expected-error@+2 {{'svwhilegt_b64_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b64_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b64,_u32,,)(u32, u32); - // expected-error@+2 {{'svtbl2_u32' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_u32,,)(svundef2_u32(), svundef_u32()); - // expected-error@+2 {{'svhsubr_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhsubr_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhsubr_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhsubr_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u32,_z,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svhsubr_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u32,_m,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svhsubr_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u32,_x,)(pg, svundef_u32(), u32); // expected-error@+2 {{'svhistcnt_u32_z' needs target feature sve2}} // overload-error@+1 {{'svhistcnt_z' needs target feature sve2}} SVE_ACLE_FUNC(svhistcnt,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'sveortb_u32' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'sveortb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svqxtnb_u32' needs target feature sve2}} - // overload-error@+1 {{'svqxtnb' needs target feature sve2}} + // expected-error@+2 {{'svqxtnb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnb,_u32,,)(svundef_u32()); - // expected-error@+2 {{'svmlalt_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_u32,,)(svundef_u32(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmlalt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_n_u32,,)(svundef_u32(), svundef_u16(), u16); - // expected-error@+2 {{'svaddhnt_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_u32,,)(svundef_u16(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svaddhnt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_n_u32,,)(svundef_u16(), svundef_u32(), u32); // expected-error@+2 {{'svldnt1uh_gather_u32base_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_u32' needs target feature sve2}} @@ -3478,230 +3478,230 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1uh_gather_u32base_index_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_index_u32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1uh_gather, _u32base, _index_u32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svbcax_u32' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svbcax_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svqxtnt_u32' needs target feature sve2}} - // overload-error@+1 {{'svqxtnt' needs target feature sve2}} + // expected-error@+2 {{'svqxtnt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnt,_u32,,)(svundef_u16(), svundef_u32()); - // expected-error@+2 {{'svqrshl_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u32,_z,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svqrshl_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u32,_m,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svqrshl_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u32,_x,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svqrshl_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u32,_z,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svqrshl_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u32,_m,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svqrshl_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u32,_x,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svsublt_u32' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svsublt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_n_u32,,)(svundef_u16(), u16); - // expected-error@+2 {{'svadalp_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svadalp_z' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u32,_z,)(pg, svundef_u32(), svundef_u16()); - // expected-error@+2 {{'svadalp_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svadalp_m' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u32,_m,)(pg, svundef_u32(), svundef_u16()); - // expected-error@+2 {{'svadalp_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svadalp_x' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u32,_x,)(pg, svundef_u32(), svundef_u16()); - // expected-error@+2 {{'svwhilege_b8_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b8_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b8,_u32,,)(u32, u32); - // expected-error@+2 {{'svwhilege_b16_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b16_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b16,_u32,,)(u32, u32); - // expected-error@+2 {{'svwhilege_b32_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b32_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b32,_u32,,)(u32, u32); - // expected-error@+2 {{'svwhilege_b64_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b64_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b64,_u32,,)(u32, u32); - // expected-error@+2 {{'svpmullt_pair_u32' needs target feature sve2}} - // overload-error@+1 {{'svpmullt_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_pair_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt_pair,_u32,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svpmullt_pair_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svpmullt_pair' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_pair_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt_pair' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt_pair,_n_u32,,)(svundef_u32(), u32); - // expected-error@+2 {{'svsubwt_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_u32,,)(svundef_u32(), svundef_u16()); - // expected-error@+2 {{'svsubwt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_n_u32,,)(svundef_u32(), u16); - // expected-error@+2 {{'svqsubr_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqsubr_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqsubr_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqsubr_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u32,_z,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svqsubr_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u32,_m,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svqsubr_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u32,_x,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svadclt_u32' needs target feature sve2}} - // overload-error@+1 {{'svadclt' needs target feature sve2}} + // expected-error@+2 {{'svadclt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclt,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svadclt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svadclt' needs target feature sve2}} + // expected-error@+2 {{'svadclt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclt,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svaddp_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svaddp_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svrecpe_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svrecpe_z' needs target feature sve2}} + // expected-error@+2 {{'svrecpe_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrecpe_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrecpe,_u32,_z,)(pg, svundef_u32()); - // expected-error@+2 {{'svrecpe_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svrecpe_m' needs target feature sve2}} + // expected-error@+2 {{'svrecpe_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrecpe_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrecpe,_u32,_m,)(svundef_u32(), pg, svundef_u32()); - // expected-error@+2 {{'svrecpe_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svrecpe_x' needs target feature sve2}} + // expected-error@+2 {{'svrecpe_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrecpe_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrecpe,_u32,_x,)(pg, svundef_u32()); - // expected-error@+2 {{'svqadd_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqadd_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u32,_m,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svqadd_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqadd_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u32,_z,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svqadd_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqadd_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u32,_x,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svabdlb_u32' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svabdlb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_n_u32,,)(svundef_u16(), u16); - // expected-error@+2 {{'svtbx_u32' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svabdlt_u32' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svabdlt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_n_u32,,)(svundef_u16(), u16); - // expected-error@+2 {{'svminp_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svminp_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsqadd_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u32,_m,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svsqadd_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u32,_m,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svsqadd_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u32,_z,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svsqadd_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u32,_z,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svsqadd_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u32,_x,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svsqadd_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u32,_x,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svqsub_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqsub_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqsub_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svqsub_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u32,_z,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svqsub_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u32,_m,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svqsub_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u32,_x,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svrsubhnb_u32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_u32,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svrsubhnb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_n_u32,,)(svundef_u32(), u32); - // expected-error@+2 {{'svaddhnb_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_u32,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svaddhnb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_n_u32,,)(svundef_u32(), u32); - // expected-error@+2 {{'svabalt_u32' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_u32,,)(svundef_u32(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svabalt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_n_u32,,)(svundef_u32(), svundef_u16(), u16); - // expected-error@+2 {{'sveor3_u32' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'sveor3_n_u32' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svhadd_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhadd_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u32,_m,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svhadd_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhadd_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u32,_z,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svhadd_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhadd_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u32,_x,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svmovlb_u32' needs target feature sve2}} - // overload-error@+1 {{'svmovlb' needs target feature sve2}} + // expected-error@+2 {{'svmovlb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlb,_u32,,)(svundef_u16()); // expected-error@+2 {{'svstnt1_scatter_u32base_u32' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter' needs target feature sve2}} @@ -3715,23 +3715,23 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1_scatter_u32base_index_u32' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1_scatter, _u32base, _index, _u32)(pg, svundef_u32(), i64, svundef_u32()); - // expected-error@+2 {{'svmaxp_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svmaxp_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsbclt_u32' needs target feature sve2}} - // overload-error@+1 {{'svsbclt' needs target feature sve2}} + // expected-error@+2 {{'svsbclt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclt,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsbclt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsbclt' needs target feature sve2}} + // expected-error@+2 {{'svsbclt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclt,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svmullt_u32' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmullt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_n_u32,,)(svundef_u16(), u16); // expected-error@+2 {{'svldnt1sh_gather_u32base_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_u32' needs target feature sve2}} @@ -3745,41 +3745,41 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sh_gather_u32base_index_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_index_u32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sh_gather, _u32base, _index_u32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svwhilerw_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_u32,,)(const_u32_ptr, const_u32_ptr); - // expected-error@+2 {{'svrhadd_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svrhadd_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u32,_m,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svrhadd_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svrhadd_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u32,_z,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svrhadd_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svrhadd_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u32,_x,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svraddhnb_u32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_u32,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svraddhnb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_n_u32,,)(svundef_u32(), u32); - // expected-error@+2 {{'svwhilewr_u32' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_u32,,)(const_u32_ptr, const_u32_ptr); - // expected-error@+2 {{'svmlalb_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_u32,,)(svundef_u32(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmlalb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_n_u32,,)(svundef_u32(), svundef_u16(), u16); // expected-error@+2 {{'svldnt1sb_gather_u32base_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_u32' needs target feature sve2}} @@ -3790,11 +3790,11 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sb_gather_u32base_offset_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_offset_u32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sb_gather, _u32base, _offset_u32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svsubwb_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_u32,,)(svundef_u32(), svundef_u16()); - // expected-error@+2 {{'svsubwb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_n_u32,,)(svundef_u32(), u16); // expected-error@+2 {{'svldnt1ub_gather_u32base_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_u32' needs target feature sve2}} @@ -3805,53 +3805,53 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1ub_gather_u32base_offset_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_offset_u32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1ub_gather, _u32base, _offset_u32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svaba_u32' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svaba_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svraddhnt_u32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_u32,,)(svundef_u16(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svraddhnt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_n_u32,,)(svundef_u16(), svundef_u32(), u32); - // expected-error@+2 {{'sveorbt_u32' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'sveorbt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svbsl_u32' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svbsl_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svadclb_u32' needs target feature sve2}} - // overload-error@+1 {{'svadclb' needs target feature sve2}} + // expected-error@+2 {{'svadclb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclb,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svadclb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svadclb' needs target feature sve2}} + // expected-error@+2 {{'svadclb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclb,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svhsub_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u32,_z,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhsub_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u32,_m,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhsub_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u32,_x,)(pg, svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svhsub_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u32,_z,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svhsub_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u32,_m,)(pg, svundef_u32(), u32); - // expected-error@+2 {{'svhsub_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u32,_x,)(pg, svundef_u32(), u32); // expected-error@+2 {{'svldnt1_gather_u32base_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_u32' needs target feature sve2}} @@ -3865,11 +3865,11 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1_gather_u32base_index_u32' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_index_u32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1_gather, _u32base, _index_u32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svaddlb_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svaddlb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_n_u32,,)(svundef_u16(), u16); // expected-error@+2 {{'svstnt1h_scatter_u32base_u32' needs target feature sve2}} // overload-error@+1 {{'svstnt1h_scatter' needs target feature sve2}} @@ -3892,207 +3892,207 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1b_scatter_u32base_offset_u32' needs target feature sve2}} // overload-error@+1 {{'svstnt1b_scatter_offset' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1b_scatter, _u32base, _offset, _u32)(pg, svundef_u32(), i64, svundef_u32()); - // expected-error@+2 {{'svbsl2n_u32' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svbsl2n_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svaddlt_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svaddlt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_n_u32,,)(svundef_u16(), u16); - // expected-error@+2 {{'svabalb_u32' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_u32,,)(svundef_u32(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svabalb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_n_u32,,)(svundef_u32(), svundef_u16(), u16); - // expected-error@+2 {{'svsublb_u32' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_u32,,)(svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svsublb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_n_u32,,)(svundef_u16(), u16); - // expected-error@+2 {{'svsbclb_u32' needs target feature sve2}} - // overload-error@+1 {{'svsbclb' needs target feature sve2}} + // expected-error@+2 {{'svsbclb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclb,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsbclb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svsbclb' needs target feature sve2}} + // expected-error@+2 {{'svsbclb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclb,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svbsl1n_u32' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svbsl1n_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_u32,,)(svundef_u32(), svundef_u32(), u32); - // expected-error@+2 {{'svrshl_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u32,_z,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svrshl_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u32,_m,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svrshl_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u32,_x,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svrshl_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u32,_z,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svrshl_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u32,_m,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svrshl_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u32,_x,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svrsqrte_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svrsqrte_z' needs target feature sve2}} + // expected-error@+2 {{'svrsqrte_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsqrte_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsqrte,_u32,_z,)(pg, svundef_u32()); - // expected-error@+2 {{'svrsqrte_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svrsqrte_m' needs target feature sve2}} + // expected-error@+2 {{'svrsqrte_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsqrte_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsqrte,_u32,_m,)(svundef_u32(), pg, svundef_u32()); - // expected-error@+2 {{'svrsqrte_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svrsqrte_x' needs target feature sve2}} + // expected-error@+2 {{'svrsqrte_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsqrte_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsqrte,_u32,_x,)(pg, svundef_u32()); - // expected-error@+2 {{'svaddwt_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_u32,,)(svundef_u32(), svundef_u16()); - // expected-error@+2 {{'svaddwt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_n_u32,,)(svundef_u32(), u16); - // expected-error@+2 {{'svmlslb_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_u32,,)(svundef_u32(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmlslb_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_n_u32,,)(svundef_u32(), svundef_u16(), u16); - // expected-error@+2 {{'svmlslt_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_u32,,)(svundef_u32(), svundef_u16(), svundef_u16()); - // expected-error@+2 {{'svmlslt_n_u32' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_n_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_n_u32,,)(svundef_u32(), svundef_u16(), u16); - // expected-error@+2 {{'svmovlt_u32' needs target feature sve2}} - // overload-error@+1 {{'svmovlt' needs target feature sve2}} + // expected-error@+2 {{'svmovlt_u32' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlt,_u32,,)(svundef_u16()); - // expected-error@+2 {{'svqshl_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u32,_z,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svqshl_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u32,_m,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svqshl_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u32,_x,)(pg, svundef_u32(), svundef_s32()); - // expected-error@+2 {{'svqshl_n_u32_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u32,_z,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svqshl_n_u32_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u32,_m,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svqshl_n_u32_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u32,_x,)(pg, svundef_u32(), i32); - // expected-error@+2 {{'svmullb_u64' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svmullb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svmullb' needs target feature sve2}} + // expected-error@+2 {{'svmullb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullb,_n_u64,,)(svundef_u32(), u32); - // expected-error@+2 {{'svpmullb_u64' needs target feature sve2}} - // overload-error@+1 {{'svpmullb' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svpmullb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svpmullb' needs target feature sve2}} + // expected-error@+2 {{'svpmullb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullb,_n_u64,,)(svundef_u32(), u32); - // expected-error@+2 {{'svaddwb_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_u64,,)(svundef_u64(), svundef_u32()); - // expected-error@+2 {{'svaddwb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddwb' needs target feature sve2}} + // expected-error@+2 {{'svaddwb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwb,_n_u64,,)(svundef_u64(), u32); - // expected-error@+2 {{'svsubhnb_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_u64,,)(svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svsubhnb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svsubhnb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnb,_n_u64,,)(svundef_u64(), u64); - // expected-error@+2 {{'svrsubhnt_u64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_u64,,)(svundef_u32(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svrsubhnt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnt,_n_u64,,)(svundef_u32(), svundef_u64(), u64); - // expected-error@+2 {{'svnbsl_u64' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svnbsl_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svnbsl' needs target feature sve2}} + // expected-error@+2 {{'svnbsl_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svnbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svnbsl,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svsubhnt_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_u64,,)(svundef_u32(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svsubhnt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubhnt' needs target feature sve2}} + // expected-error@+2 {{'svsubhnt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubhnt,_n_u64,,)(svundef_u32(), svundef_u64(), u64); - // expected-error@+2 {{'svwhilegt_b8_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b8_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b8,_u64,,)(u64, u64); - // expected-error@+2 {{'svwhilegt_b16_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b16_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b16,_u64,,)(u64, u64); - // expected-error@+2 {{'svwhilegt_b32_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b32_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b32,_u64,,)(u64, u64); - // expected-error@+2 {{'svwhilegt_b64_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilegt_b64_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilegt_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilegt_b64,_u64,,)(u64, u64); - // expected-error@+2 {{'svtbl2_u64' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_u64,,)(svundef2_u64(), svundef_u64()); - // expected-error@+2 {{'svhsubr_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhsubr_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhsubr_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhsubr_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u64,_z,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svhsubr_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u64,_m,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svhsubr_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svhsubr_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsubr,_n_u64,_x,)(pg, svundef_u64(), u64); // expected-error@+2 {{'svhistcnt_u64_z' needs target feature sve2}} // overload-error@+1 {{'svhistcnt_z' needs target feature sve2}} SVE_ACLE_FUNC(svhistcnt,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'sveortb_u64' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'sveortb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'sveortb' needs target feature sve2}} + // expected-error@+2 {{'sveortb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveortb' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveortb,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svqxtnb_u64' needs target feature sve2}} - // overload-error@+1 {{'svqxtnb' needs target feature sve2}} + // expected-error@+2 {{'svqxtnb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnb,_u64,,)(svundef_u64()); - // expected-error@+2 {{'svmlalt_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_u64,,)(svundef_u64(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svmlalt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlalt' needs target feature sve2}} + // expected-error@+2 {{'svmlalt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalt,_n_u64,,)(svundef_u64(), svundef_u32(), u32); - // expected-error@+2 {{'svaddhnt_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_u64,,)(svundef_u32(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svaddhnt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnt' needs target feature sve2}} + // expected-error@+2 {{'svaddhnt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnt,_n_u64,,)(svundef_u32(), svundef_u64(), u64); // expected-error@+2 {{'svldnt1uh_gather_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_u64' needs target feature sve2}} @@ -4115,221 +4115,221 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1uh_gather_u64base_index_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1uh_gather_index_u64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1uh_gather, _u64base, _index_u64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svbcax_u64' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svbcax_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svbcax' needs target feature sve2}} + // expected-error@+2 {{'svbcax_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbcax' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbcax,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svqxtnt_u64' needs target feature sve2}} - // overload-error@+1 {{'svqxtnt' needs target feature sve2}} + // expected-error@+2 {{'svqxtnt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svqxtnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqxtnt,_u64,,)(svundef_u32(), svundef_u64()); - // expected-error@+2 {{'svqrshl_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u64,_z,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svqrshl_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u64,_m,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svqrshl_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_u64,_x,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svqrshl_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u64,_z,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svqrshl_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u64,_m,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svqrshl_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqrshl_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqrshl,_n_u64,_x,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svsublt_u64' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsublt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsublt' needs target feature sve2}} + // expected-error@+2 {{'svsublt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublt,_n_u64,,)(svundef_u32(), u32); - // expected-error@+2 {{'svadalp_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svadalp_z' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u64,_z,)(pg, svundef_u64(), svundef_u32()); - // expected-error@+2 {{'svadalp_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svadalp_m' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u64,_m,)(pg, svundef_u64(), svundef_u32()); - // expected-error@+2 {{'svadalp_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svadalp_x' needs target feature sve2}} + // expected-error@+2 {{'svadalp_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svadalp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadalp,_u64,_x,)(pg, svundef_u64(), svundef_u32()); - // expected-error@+2 {{'svwhilege_b8_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b8' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b8_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b8' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b8,_u64,,)(u64, u64); - // expected-error@+2 {{'svwhilege_b16_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b16' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b16_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b16' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b16,_u64,,)(u64, u64); - // expected-error@+2 {{'svwhilege_b32_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b32' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b32_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b32' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b32,_u64,,)(u64, u64); - // expected-error@+2 {{'svwhilege_b64_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilege_b64' needs target feature sve2}} + // expected-error@+2 {{'svwhilege_b64_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilege_b64' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilege_b64,_u64,,)(u64, u64); - // expected-error@+2 {{'svpmullt_u64' needs target feature sve2}} - // overload-error@+1 {{'svpmullt' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svpmullt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svpmullt' needs target feature sve2}} + // expected-error@+2 {{'svpmullt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svpmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svpmullt,_n_u64,,)(svundef_u32(), u32); - // expected-error@+2 {{'svsubwt_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_u64,,)(svundef_u64(), svundef_u32()); - // expected-error@+2 {{'svsubwt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubwt' needs target feature sve2}} + // expected-error@+2 {{'svsubwt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwt,_n_u64,,)(svundef_u64(), u32); - // expected-error@+2 {{'svqsubr_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqsubr_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqsubr_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqsubr_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_z' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u64,_z,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svqsubr_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_m' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u64,_m,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svqsubr_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsubr_x' needs target feature sve2}} + // expected-error@+2 {{'svqsubr_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsubr_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsubr,_n_u64,_x,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svadclt_u64' needs target feature sve2}} - // overload-error@+1 {{'svadclt' needs target feature sve2}} + // expected-error@+2 {{'svadclt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclt,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svadclt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svadclt' needs target feature sve2}} + // expected-error@+2 {{'svadclt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclt,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svaddp_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svaddp_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqadd_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqadd_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u64,_m,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svqadd_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqadd_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u64,_z,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svqadd_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqadd_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svqadd_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqadd,_n_u64,_x,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svabdlb_u64' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svabdlb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svabdlb' needs target feature sve2}} + // expected-error@+2 {{'svabdlb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlb,_n_u64,,)(svundef_u32(), u32); - // expected-error@+2 {{'svtbx_u64' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svabdlt_u64' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svabdlt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svabdlt' needs target feature sve2}} + // expected-error@+2 {{'svabdlt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabdlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabdlt,_n_u64,,)(svundef_u32(), u32); - // expected-error@+2 {{'svminp_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svminp_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svsqadd_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u64,_m,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svsqadd_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_m' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u64,_m,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svsqadd_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u64,_z,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svsqadd_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_z' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u64,_z,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svsqadd_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_u64,_x,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svsqadd_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svsqadd_x' needs target feature sve2}} + // expected-error@+2 {{'svsqadd_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svsqadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsqadd,_n_u64,_x,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svqsub_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqsub_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqsub_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svqsub_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqsub_z' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u64,_z,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svqsub_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqsub_m' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u64,_m,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svqsub_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqsub_x' needs target feature sve2}} + // expected-error@+2 {{'svqsub_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqsub,_n_u64,_x,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svrsubhnb_u64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_u64,,)(svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svrsubhnb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svrsubhnb' needs target feature sve2}} + // expected-error@+2 {{'svrsubhnb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svrsubhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrsubhnb,_n_u64,,)(svundef_u64(), u64); - // expected-error@+2 {{'svaddhnb_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_u64,,)(svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svaddhnb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddhnb' needs target feature sve2}} + // expected-error@+2 {{'svaddhnb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddhnb,_n_u64,,)(svundef_u64(), u64); - // expected-error@+2 {{'svabalt_u64' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_u64,,)(svundef_u64(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svabalt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svabalt' needs target feature sve2}} + // expected-error@+2 {{'svabalt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalt,_n_u64,,)(svundef_u64(), svundef_u32(), u32); - // expected-error@+2 {{'sveor3_u64' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'sveor3_n_u64' needs target feature sve2}} - // overload-error@+1 {{'sveor3' needs target feature sve2}} + // expected-error@+2 {{'sveor3_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveor3' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveor3,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svhadd_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhadd_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u64,_m,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svhadd_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhadd_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u64,_z,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svhadd_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhadd_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svhadd_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhadd,_n_u64,_x,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svmovlb_u64' needs target feature sve2}} - // overload-error@+1 {{'svmovlb' needs target feature sve2}} + // expected-error@+2 {{'svmovlb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlb,_u64,,)(svundef_u32()); // expected-error@+2 {{'svstnt1_scatter_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter' needs target feature sve2}} @@ -4352,23 +4352,23 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1_scatter_u64base_index_u64' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1_scatter, _u64base, _index, _u64)(pg, svundef_u64(), i64, svundef_u64()); - // expected-error@+2 {{'svmaxp_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svmaxp_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svsbclt_u64' needs target feature sve2}} - // overload-error@+1 {{'svsbclt' needs target feature sve2}} + // expected-error@+2 {{'svsbclt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclt,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svsbclt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsbclt' needs target feature sve2}} + // expected-error@+2 {{'svsbclt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclt,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svmullt_u64' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svmullt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svmullt' needs target feature sve2}} + // expected-error@+2 {{'svmullt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmullt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmullt,_n_u64,,)(svundef_u32(), u32); // expected-error@+2 {{'svldnt1sh_gather_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_u64' needs target feature sve2}} @@ -4391,41 +4391,41 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sh_gather_u64base_index_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sh_gather_index_u64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sh_gather, _u64base, _index_u64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svwhilerw_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_u64,,)(const_u64_ptr, const_u64_ptr); - // expected-error@+2 {{'svrhadd_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svrhadd_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_m' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u64,_m,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svrhadd_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svrhadd_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_z' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u64,_z,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svrhadd_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svrhadd_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svrhadd_x' needs target feature sve2}} + // expected-error@+2 {{'svrhadd_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrhadd_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrhadd,_n_u64,_x,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svraddhnb_u64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_u64,,)(svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svraddhnb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnb' needs target feature sve2}} + // expected-error@+2 {{'svraddhnb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnb,_n_u64,,)(svundef_u64(), u64); - // expected-error@+2 {{'svwhilewr_u64' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_u64,,)(const_u64_ptr, const_u64_ptr); - // expected-error@+2 {{'svmlalb_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_u64,,)(svundef_u64(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svmlalb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlalb' needs target feature sve2}} + // expected-error@+2 {{'svmlalb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlalb,_n_u64,,)(svundef_u64(), svundef_u32(), u32); // expected-error@+2 {{'svldnt1sb_gather_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_u64' needs target feature sve2}} @@ -4439,11 +4439,11 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sb_gather_u64base_offset_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sb_gather_offset_u64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sb_gather, _u64base, _offset_u64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svsubwb_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_u64,,)(svundef_u64(), svundef_u32()); - // expected-error@+2 {{'svsubwb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsubwb' needs target feature sve2}} + // expected-error@+2 {{'svsubwb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsubwb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsubwb,_n_u64,,)(svundef_u64(), u32); // expected-error@+2 {{'svldnt1ub_gather_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_u64' needs target feature sve2}} @@ -4457,23 +4457,23 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1ub_gather_u64base_offset_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1ub_gather_offset_u64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1ub_gather, _u64base, _offset_u64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svaba_u64' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svaba_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svaba' needs target feature sve2}} + // expected-error@+2 {{'svaba_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaba' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaba,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svraddhnt_u64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_u64,,)(svundef_u32(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svraddhnt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svraddhnt' needs target feature sve2}} + // expected-error@+2 {{'svraddhnt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svraddhnt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svraddhnt,_n_u64,,)(svundef_u32(), svundef_u64(), u64); - // expected-error@+2 {{'sveorbt_u64' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'sveorbt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'sveorbt' needs target feature sve2}} + // expected-error@+2 {{'sveorbt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'sveorbt' needs target feature sve2|sme}} SVE_ACLE_FUNC(sveorbt,_n_u64,,)(svundef_u64(), svundef_u64(), u64); // expected-error@+2 {{'svldnt1sw_gather_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sw_gather_u64' needs target feature sve2}} @@ -4496,35 +4496,35 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1sw_gather_u64base_index_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1sw_gather_index_u64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1sw_gather, _u64base, _index_u64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svbsl_u64' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svbsl_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svbsl' needs target feature sve2}} + // expected-error@+2 {{'svbsl_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svadclb_u64' needs target feature sve2}} - // overload-error@+1 {{'svadclb' needs target feature sve2}} + // expected-error@+2 {{'svadclb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclb,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svadclb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svadclb' needs target feature sve2}} + // expected-error@+2 {{'svadclb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svadclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svadclb,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svhsub_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u64,_z,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhsub_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u64,_m,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhsub_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_u64,_x,)(pg, svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svhsub_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svhsub_z' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u64,_z,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svhsub_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svhsub_m' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u64,_m,)(pg, svundef_u64(), u64); - // expected-error@+2 {{'svhsub_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svhsub_x' needs target feature sve2}} + // expected-error@+2 {{'svhsub_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svhsub_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svhsub,_n_u64,_x,)(pg, svundef_u64(), u64); // expected-error@+2 {{'svldnt1_gather_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_u64' needs target feature sve2}} @@ -4547,11 +4547,11 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1_gather_u64base_index_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_index_u64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1_gather, _u64base, _index_u64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svaddlb_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svaddlb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddlb' needs target feature sve2}} + // expected-error@+2 {{'svaddlb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlb,_n_u64,,)(svundef_u32(), u32); // expected-error@+2 {{'svldnt1uw_gather_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svldnt1uw_gather_u64' needs target feature sve2}} @@ -4607,17 +4607,17 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1b_scatter_u64base_offset_u64' needs target feature sve2}} // overload-error@+1 {{'svstnt1b_scatter_offset' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1b_scatter, _u64base, _offset, _u64)(pg, svundef_u64(), i64, svundef_u64()); - // expected-error@+2 {{'svbsl2n_u64' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svbsl2n_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svbsl2n' needs target feature sve2}} + // expected-error@+2 {{'svbsl2n_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl2n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl2n,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svaddlt_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svaddlt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddlt' needs target feature sve2}} + // expected-error@+2 {{'svaddlt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddlt,_n_u64,,)(svundef_u32(), u32); // expected-error@+2 {{'svstnt1w_scatter_u64base_u64' needs target feature sve2}} // overload-error@+1 {{'svstnt1w_scatter' needs target feature sve2}} @@ -4640,178 +4640,178 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1w_scatter_u64base_index_u64' needs target feature sve2}} // overload-error@+1 {{'svstnt1w_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1w_scatter, _u64base, _index, _u64)(pg, svundef_u64(), i64, svundef_u64()); - // expected-error@+2 {{'svabalb_u64' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_u64,,)(svundef_u64(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svabalb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svabalb' needs target feature sve2}} + // expected-error@+2 {{'svabalb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svabalb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svabalb,_n_u64,,)(svundef_u64(), svundef_u32(), u32); - // expected-error@+2 {{'svsublb_u64' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_u64,,)(svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svsublb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsublb' needs target feature sve2}} + // expected-error@+2 {{'svsublb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsublb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsublb,_n_u64,,)(svundef_u32(), u32); - // expected-error@+2 {{'svsbclb_u64' needs target feature sve2}} - // overload-error@+1 {{'svsbclb' needs target feature sve2}} + // expected-error@+2 {{'svsbclb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclb,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svsbclb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svsbclb' needs target feature sve2}} + // expected-error@+2 {{'svsbclb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svsbclb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svsbclb,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svbsl1n_u64' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64()); - // expected-error@+2 {{'svbsl1n_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svbsl1n' needs target feature sve2}} + // expected-error@+2 {{'svbsl1n_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svbsl1n' needs target feature sve2|sme}} SVE_ACLE_FUNC(svbsl1n,_n_u64,,)(svundef_u64(), svundef_u64(), u64); - // expected-error@+2 {{'svrshl_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u64,_z,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svrshl_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u64,_m,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svrshl_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_u64,_x,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svrshl_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svrshl_z' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u64,_z,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svrshl_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svrshl_m' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u64,_m,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svrshl_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svrshl_x' needs target feature sve2}} + // expected-error@+2 {{'svrshl_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svrshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svrshl,_n_u64,_x,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svaddwt_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_u64,,)(svundef_u64(), svundef_u32()); - // expected-error@+2 {{'svaddwt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svaddwt' needs target feature sve2}} + // expected-error@+2 {{'svaddwt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddwt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddwt,_n_u64,,)(svundef_u64(), u32); - // expected-error@+2 {{'svmlslb_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_u64,,)(svundef_u64(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svmlslb_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlslb' needs target feature sve2}} + // expected-error@+2 {{'svmlslb_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslb' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslb,_n_u64,,)(svundef_u64(), svundef_u32(), u32); - // expected-error@+2 {{'svmlslt_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_u64,,)(svundef_u64(), svundef_u32(), svundef_u32()); - // expected-error@+2 {{'svmlslt_n_u64' needs target feature sve2}} - // overload-error@+1 {{'svmlslt' needs target feature sve2}} + // expected-error@+2 {{'svmlslt_n_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmlslt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmlslt,_n_u64,,)(svundef_u64(), svundef_u32(), u32); - // expected-error@+2 {{'svmovlt_u64' needs target feature sve2}} - // overload-error@+1 {{'svmovlt' needs target feature sve2}} + // expected-error@+2 {{'svmovlt_u64' needs target feature sve2|sme}} + // overload-error@+1 {{'svmovlt' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmovlt,_u64,,)(svundef_u32()); - // expected-error@+2 {{'svqshl_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u64,_z,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svqshl_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u64,_m,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svqshl_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_u64,_x,)(pg, svundef_u64(), svundef_s64()); - // expected-error@+2 {{'svqshl_n_u64_z' needs target feature sve2}} - // overload-error@+1 {{'svqshl_z' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u64,_z,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svqshl_n_u64_m' needs target feature sve2}} - // overload-error@+1 {{'svqshl_m' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u64,_m,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svqshl_n_u64_x' needs target feature sve2}} - // overload-error@+1 {{'svqshl_x' needs target feature sve2}} + // expected-error@+2 {{'svqshl_n_u64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svqshl_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svqshl,_n_u64,_x,)(pg, svundef_u64(), i64); - // expected-error@+2 {{'svlogb_f16_z' needs target feature sve2}} - // overload-error@+1 {{'svlogb_z' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f16_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f16,_z,)(pg, svundef_f16()); - // expected-error@+2 {{'svlogb_f16_m' needs target feature sve2}} - // overload-error@+1 {{'svlogb_m' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f16,_m,)(svundef_s16(), pg, svundef_f16()); - // expected-error@+2 {{'svlogb_f16_x' needs target feature sve2}} - // overload-error@+1 {{'svlogb_x' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f16,_x,)(pg, svundef_f16()); - // expected-error@+2 {{'svminnmp_f16_m' needs target feature sve2}} - // overload-error@+1 {{'svminnmp_m' needs target feature sve2}} + // expected-error@+2 {{'svminnmp_f16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminnmp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminnmp,_f16,_m,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svminnmp_f16_x' needs target feature sve2}} - // overload-error@+1 {{'svminnmp_x' needs target feature sve2}} + // expected-error@+2 {{'svminnmp_f16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminnmp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminnmp,_f16,_x,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svtbl2_f16' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_f16' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_f16,,)(svundef2_f16(), svundef_u16()); - // expected-error@+2 {{'svaddp_f16_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_f16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_f16,_m,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svaddp_f16_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_f16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_f16,_x,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svtbx_f16' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_f16' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_f16,,)(svundef_f16(), svundef_f16(), svundef_u16()); - // expected-error@+2 {{'svminp_f16_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_f16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_f16,_m,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svminp_f16_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_f16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_f16,_x,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svmaxp_f16_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_f16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_f16,_m,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svmaxp_f16_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_f16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_f16,_x,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svmaxnmp_f16_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxnmp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxnmp_f16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxnmp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxnmp,_f16,_m,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svmaxnmp_f16_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxnmp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxnmp_f16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxnmp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxnmp,_f16,_x,)(pg, svundef_f16(), svundef_f16()); - // expected-error@+2 {{'svwhilerw_f16' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_f16' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_f16,,)(const_f16_ptr, const_f16_ptr); - // expected-error@+2 {{'svwhilewr_f16' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_f16' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_f16,,)(const_f16_ptr, const_f16_ptr); - // expected-error@+2 {{'svcvtlt_f32_f16_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtlt_f32_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtlt_f32_f16_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtlt_f32_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtlt_f32,_f16,_m,)(svundef_f32(), pg, svundef_f16()); - // expected-error@+2 {{'svcvtlt_f32_f16_x' needs target feature sve2}} - // overload-error@+1 {{'svcvtlt_f32_x' needs target feature sve2}} + // expected-error@+2 {{'svcvtlt_f32_f16_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtlt_f32_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtlt_f32,_f16,_x,)(pg, svundef_f16()); - // expected-error@+2 {{'svlogb_f32_z' needs target feature sve2}} - // overload-error@+1 {{'svlogb_z' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f32_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f32,_z,)(pg, svundef_f32()); - // expected-error@+2 {{'svlogb_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svlogb_m' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f32,_m,)(svundef_s32(), pg, svundef_f32()); - // expected-error@+2 {{'svlogb_f32_x' needs target feature sve2}} - // overload-error@+1 {{'svlogb_x' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f32,_x,)(pg, svundef_f32()); - // expected-error@+2 {{'svminnmp_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svminnmp_m' needs target feature sve2}} + // expected-error@+2 {{'svminnmp_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminnmp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminnmp,_f32,_m,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svminnmp_f32_x' needs target feature sve2}} - // overload-error@+1 {{'svminnmp_x' needs target feature sve2}} + // expected-error@+2 {{'svminnmp_f32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminnmp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminnmp,_f32,_x,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svtbl2_f32' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_f32' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_f32,,)(svundef2_f32(), svundef_u32()); - // expected-error@+2 {{'svaddp_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_f32,_m,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svaddp_f32_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_f32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_f32,_x,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svtbx_f32' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_f32' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_f32,,)(svundef_f32(), svundef_f32(), svundef_u32()); - // expected-error@+2 {{'svminp_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_f32,_m,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svminp_f32_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_f32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_f32,_x,)(pg, svundef_f32(), svundef_f32()); // expected-error@+2 {{'svstnt1_scatter_u32base_f32' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter' needs target feature sve2}} @@ -4825,35 +4825,35 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1_scatter_u32base_index_f32' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1_scatter, _u32base, _index, _f32)(pg, svundef_u32(), i64, svundef_f32()); - // expected-error@+2 {{'svmaxp_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_f32,_m,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svmaxp_f32_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_f32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_f32,_x,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svmaxnmp_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxnmp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxnmp_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxnmp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxnmp,_f32,_m,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svmaxnmp_f32_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxnmp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxnmp_f32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxnmp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxnmp,_f32,_x,)(pg, svundef_f32(), svundef_f32()); - // expected-error@+2 {{'svwhilerw_f32' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_f32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_f32,,)(const_f32_ptr, const_f32_ptr); - // expected-error@+2 {{'svcvtnt_f16_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtnt_f16_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtnt_f16_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtnt_f16_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtnt_f16,_f32,_m,)(svundef_f16(), pg, svundef_f32()); - // expected-error@+2 {{'svcvtnt_f16_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtnt_f16_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtnt_f16_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtnt_f16_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtnt_f16,_f32,_x,)(svundef_f16(), pg, svundef_f32()); - // expected-error@+2 {{'svwhilewr_f32' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_f32' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_f32,,)(const_f32_ptr, const_f32_ptr); - // expected-error@+2 {{'svcvtlt_f64_f32_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtlt_f64_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtlt_f64_f32_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtlt_f64_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtlt_f64,_f32,_m,)(svundef_f64(), pg, svundef_f32()); - // expected-error@+2 {{'svcvtlt_f64_f32_x' needs target feature sve2}} - // overload-error@+1 {{'svcvtlt_f64_x' needs target feature sve2}} + // expected-error@+2 {{'svcvtlt_f64_f32_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtlt_f64_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtlt_f64,_f32,_x,)(pg, svundef_f32()); // expected-error@+2 {{'svldnt1_gather_u32base_f32' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_f32' needs target feature sve2}} @@ -4868,38 +4868,38 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // overload-error@+1 {{'svldnt1_gather_index_f32' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1_gather, _u32base, _index_f32, )(pg, svundef_u32(), i64); - // expected-error@+2 {{'svlogb_f64_z' needs target feature sve2}} - // overload-error@+1 {{'svlogb_z' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f64,_z,)(pg, svundef_f64()); - // expected-error@+2 {{'svlogb_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svlogb_m' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f64,_m,)(svundef_s64(), pg, svundef_f64()); - // expected-error@+2 {{'svlogb_f64_x' needs target feature sve2}} - // overload-error@+1 {{'svlogb_x' needs target feature sve2}} + // expected-error@+2 {{'svlogb_f64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svlogb_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svlogb,_f64,_x,)(pg, svundef_f64()); - // expected-error@+2 {{'svminnmp_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svminnmp_m' needs target feature sve2}} + // expected-error@+2 {{'svminnmp_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminnmp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminnmp,_f64,_m,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svminnmp_f64_x' needs target feature sve2}} - // overload-error@+1 {{'svminnmp_x' needs target feature sve2}} + // expected-error@+2 {{'svminnmp_f64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminnmp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminnmp,_f64,_x,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svtbl2_f64' needs target feature sve2}} - // overload-error@+1 {{'svtbl2' needs target feature sve2}} + // expected-error@+2 {{'svtbl2_f64' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbl2' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbl2,_f64,,)(svundef2_f64(), svundef_u64()); - // expected-error@+2 {{'svaddp_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svaddp_m' needs target feature sve2}} + // expected-error@+2 {{'svaddp_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_f64,_m,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svaddp_f64_x' needs target feature sve2}} - // overload-error@+1 {{'svaddp_x' needs target feature sve2}} + // expected-error@+2 {{'svaddp_f64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svaddp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svaddp,_f64,_x,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svtbx_f64' needs target feature sve2}} - // overload-error@+1 {{'svtbx' needs target feature sve2}} + // expected-error@+2 {{'svtbx_f64' needs target feature sve2|sme}} + // overload-error@+1 {{'svtbx' needs target feature sve2|sme}} SVE_ACLE_FUNC(svtbx,_f64,,)(svundef_f64(), svundef_f64(), svundef_u64()); - // expected-error@+2 {{'svminp_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svminp_m' needs target feature sve2}} + // expected-error@+2 {{'svminp_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_f64,_m,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svminp_f64_x' needs target feature sve2}} - // overload-error@+1 {{'svminp_x' needs target feature sve2}} + // expected-error@+2 {{'svminp_f64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svminp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svminp,_f64,_x,)(pg, svundef_f64(), svundef_f64()); // expected-error@+2 {{'svstnt1_scatter_u64base_f64' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter' needs target feature sve2}} @@ -4922,38 +4922,38 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svstnt1_scatter_u64base_index_f64' needs target feature sve2}} // overload-error@+1 {{'svstnt1_scatter_index' needs target feature sve2}} SVE_ACLE_FUNC(svstnt1_scatter, _u64base, _index, _f64)(pg, svundef_u64(), i64, svundef_f64()); - // expected-error@+2 {{'svmaxp_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_f64,_m,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svmaxp_f64_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxp_f64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxp,_f64,_x,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svmaxnmp_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svmaxnmp_m' needs target feature sve2}} + // expected-error@+2 {{'svmaxnmp_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxnmp_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxnmp,_f64,_m,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svmaxnmp_f64_x' needs target feature sve2}} - // overload-error@+1 {{'svmaxnmp_x' needs target feature sve2}} + // expected-error@+2 {{'svmaxnmp_f64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svmaxnmp_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svmaxnmp,_f64,_x,)(pg, svundef_f64(), svundef_f64()); - // expected-error@+2 {{'svwhilerw_f64' needs target feature sve2}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2}} + // expected-error@+2 {{'svwhilerw_f64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilerw' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilerw,_f64,,)(const_f64_ptr, const_f64_ptr); - // expected-error@+2 {{'svcvtnt_f32_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtnt_f32_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtnt_f32_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtnt_f32_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtnt_f32,_f64,_m,)(svundef_f32(), pg, svundef_f64()); - // expected-error@+2 {{'svcvtnt_f32_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtnt_f32_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtnt_f32_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtnt_f32_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtnt_f32,_f64,_x,)(svundef_f32(), pg, svundef_f64()); - // expected-error@+2 {{'svwhilewr_f64' needs target feature sve2}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2}} + // expected-error@+2 {{'svwhilewr_f64' needs target feature sve2|sme}} + // overload-error@+1 {{'svwhilewr' needs target feature sve2|sme}} SVE_ACLE_FUNC(svwhilewr,_f64,,)(const_f64_ptr, const_f64_ptr); - // expected-error@+2 {{'svcvtx_f32_f64_z' needs target feature sve2}} - // overload-error@+1 {{'svcvtx_f32_z' needs target feature sve2}} + // expected-error@+2 {{'svcvtx_f32_f64_z' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtx_f32_z' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtx_f32,_f64,_z,)(pg, svundef_f64()); - // expected-error@+2 {{'svcvtx_f32_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtx_f32_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtx_f32_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtx_f32_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtx_f32,_f64,_m,)(svundef_f32(), pg, svundef_f64()); - // expected-error@+2 {{'svcvtx_f32_f64_x' needs target feature sve2}} - // overload-error@+1 {{'svcvtx_f32_x' needs target feature sve2}} + // expected-error@+2 {{'svcvtx_f32_f64_x' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtx_f32_x' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtx_f32,_f64,_x,)(pg, svundef_f64()); // expected-error@+2 {{'svldnt1_gather_u64base_f64' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_f64' needs target feature sve2}} @@ -4976,10 +4976,10 @@ void test(svbool_t pg, const int8_t *const_i8_ptr, const uint8_t *const_u8_ptr, // expected-error@+2 {{'svldnt1_gather_u64base_index_f64' needs target feature sve2}} // overload-error@+1 {{'svldnt1_gather_index_f64' needs target feature sve2}} SVE_ACLE_FUNC(svldnt1_gather, _u64base, _index_f64, )(pg, svundef_u64(), i64); - // expected-error@+2 {{'svcvtxnt_f32_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtxnt_f32_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtxnt_f32_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtxnt_f32_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtxnt_f32,_f64,_m,)(svundef_f32(), pg, svundef_f64()); - // expected-error@+2 {{'svcvtxnt_f32_f64_m' needs target feature sve2}} - // overload-error@+1 {{'svcvtxnt_f32_m' needs target feature sve2}} + // expected-error@+2 {{'svcvtxnt_f32_f64_m' needs target feature sve2|sme}} + // overload-error@+1 {{'svcvtxnt_f32_m' needs target feature sve2|sme}} SVE_ACLE_FUNC(svcvtxnt_f32,_f64,_x,)(svundef_f32(), pg, svundef_f64()); } diff --git a/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_bfloat.cpp b/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_bfloat.cpp index 60f5aa59e1055ab..bed86be606b104b 100644 --- a/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_bfloat.cpp +++ b/clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_bfloat.cpp @@ -14,16 +14,16 @@ void test_bfloat(const bfloat16_t *const_bf16_ptr, svbfloat16_t bf16, svbfloat16x2_t bf16x2) { - // expected-error@+2 {{'svwhilerw_bf16' needs target feature sve2,bf16}} - // overload-error@+1 {{'svwhilerw' needs target feature sve2,bf16}} + // expected-error@+2 {{'svwhilerw_bf16' needs target feature (sve2|sme),bf16}} + // overload-error@+1 {{'svwhilerw' needs target feature (sve2|sme),bf16}} SVE_ACLE_FUNC(svwhilerw,_bf16,,)(const_bf16_ptr, const_bf16_ptr); - // expected-error@+2 {{'svtbx_bf16' needs target feature sve2,bf16}} - // overload-error@+1 {{'svtbx' needs target feature sve2,bf16}} + // expected-error@+2 {{'svtbx_bf16' needs target feature (sve2|sme),bf16}} + // overload-error@+1 {{'svtbx' needs target feature (sve2|sme),bf16}} SVE_ACLE_FUNC(svtbx,_bf16,,)(bf16, bf16, svundef_u16()); - // expected-error@+2 {{'svtbl2_bf16' needs target feature sve2,bf16}} - // overload-error@+1 {{'svtbl2' needs target feature sve2,bf16}} + // expected-error@+2 {{'svtbl2_bf16' needs target feature (sve2|sme),bf16}} + // overload-error@+1 {{'svtbl2' needs target feature (sve2|sme),bf16}} SVE_ACLE_FUNC(svtbl2,_bf16,,)(bf16x2, svundef_u16()); - // expected-error@+2 {{'svwhilewr_bf16' needs target feature sve2,bf16}} - // overload-error@+1 {{'svwhilewr' needs target feature sve2,bf16}} + // expected-error@+2 {{'svwhilewr_bf16' needs target feature (sve2|sme),bf16}} + // overload-error@+1 {{'svwhilewr' needs target feature (sve2|sme),bf16}} SVE_ACLE_FUNC(svwhilewr,_bf16,,)(const_bf16_ptr, const_bf16_ptr); } diff --git a/clang/test/Sema/ptrauth-intrinsics-macro.c b/clang/test/Sema/ptrauth-intrinsics-macro.c index 07d637404514523..f76f677315dd35c 100644 --- a/clang/test/Sema/ptrauth-intrinsics-macro.c +++ b/clang/test/Sema/ptrauth-intrinsics-macro.c @@ -32,3 +32,12 @@ void test(int *dp, int value) { int t2 = ptrauth_sign_generic_data(dp, 0); (void)t2; } + +void test_string_discriminator(int *dp) { + ptrauth_extra_data_t t0 = ptrauth_string_discriminator("string"); + (void)t0; +} + +void test_sign_constant(int *dp) { + dp = ptrauth_sign_constant(&dv, VALID_DATA_KEY, 0); +} diff --git a/clang/test/Sema/ptrauth.c b/clang/test/Sema/ptrauth.c index 3ad3d70c24e4130..cd069881793c5dd 100644 --- a/clang/test/Sema/ptrauth.c +++ b/clang/test/Sema/ptrauth.c @@ -47,6 +47,18 @@ void test_blend_discriminator(int *dp, int (*fp)(int), int value) { float *mismatch = __builtin_ptrauth_blend_discriminator(dp, value); // expected-error {{incompatible integer to pointer conversion initializing 'float *' with an expression of type}} } +void test_string_discriminator(const char *str) { + __builtin_ptrauth_string_discriminator(); // expected-error {{too few arguments}} + __builtin_ptrauth_string_discriminator(str, str); // expected-error {{too many arguments}} + (void) __builtin_ptrauth_string_discriminator("test string"); // no warning + + __builtin_ptrauth_string_discriminator(str); // expected-error {{argument must be a string literal}} + __builtin_ptrauth_string_discriminator(L"wide test"); // expected-error {{argument must be a string literal}} expected-warning {{incompatible pointer types passing 'int[10]' to parameter of type 'const char *'}} + + void *mismatch = __builtin_ptrauth_string_discriminator("test string"); // expected-error {{incompatible integer to pointer conversion initializing 'void *' with an expression of type 'unsigned long'}} +} + + void test_sign_unauthenticated(int *dp, int (*fp)(int)) { __builtin_ptrauth_sign_unauthenticated(dp, VALID_DATA_KEY); // expected-error {{too few arguments}} __builtin_ptrauth_sign_unauthenticated(dp, VALID_DATA_KEY, dp, dp); // expected-error {{too many arguments}} @@ -124,3 +136,84 @@ void test_sign_generic_data(int *dp) { int *mismatch = __builtin_ptrauth_sign_generic_data(dp, 0); // expected-error {{incompatible integer to pointer conversion initializing 'int *' with an expression of type}} } + + +typedef int (*fp_t)(int); + +static int dv_weakref __attribute__((weakref("dv"))); +extern int dv_weak __attribute__((weak)); + +int *t_cst_sig1 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY); // expected-error {{too few arguments}} +int *t_cst_sig2 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, &dv, &dv); // expected-error {{too many arguments}} + +int *t_cst_sig3 = __builtin_ptrauth_sign_constant(mismatched_type, VALID_DATA_KEY, 0); // expected-error {{signed value must have pointer type; type here is 'struct A'}} +int *t_cst_sig4 = __builtin_ptrauth_sign_constant(&dv, mismatched_type, 0); // expected-error {{passing 'struct A' to parameter of incompatible type 'int'}} +int *t_cst_sig5 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, mismatched_type); // expected-error {{extra discriminator must have pointer or integer type; type here is 'struct A'}} + +float *t_cst_result = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, 0); // expected-warning {{incompatible pointer types initializing 'float *' with an expression of type 'int *'}} + +int *t_cst_valid1 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, 0); +int *t_cst_valid2 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(&dv, 0)); +int *t_cst_valid3 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(&dv + 8, 0)); +int *t_cst_valid4 = __builtin_ptrauth_sign_constant(&dv_weak, VALID_DATA_KEY, 0); +int *t_cst_valid5 = __builtin_ptrauth_sign_constant(&dv_weakref, VALID_DATA_KEY, 0); + +int *t_cst_ptr = __builtin_ptrauth_sign_constant(NULL, VALID_DATA_KEY, &dv); // expected-error {{argument to ptrauth_sign_constant must refer to a global variable or function}} +int *t_cst_key = __builtin_ptrauth_sign_constant(&dv, INVALID_KEY, 0); // expected-error {{does not identify a valid pointer authentication key for the current target}} +int *t_cst_disc1 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, &fv); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} +int *t_cst_disc2 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(&fv, 0)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + +fp_t t_cst_f_valid1 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, 0); +fp_t t_cst_f_valid2 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(&dv, 0)); +fp_t t_cst_f_valid3 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(&dv + 8, 0)); + +fp_t t_cst_f_key = __builtin_ptrauth_sign_constant(&fv, INVALID_KEY, 0); // expected-error {{does not identify a valid pointer authentication key for the current target}} +fp_t t_cst_f_disc1 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, &fv); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} +fp_t t_cst_f_disc2 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(&fv, 0)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + +int *t_cst_offset = __builtin_ptrauth_sign_constant((int *)((char*)&dv + 16), VALID_DATA_KEY, 0); +fp_t t_cst_f_offset = __builtin_ptrauth_sign_constant((int (*)(int))((char*)&fv + 16), VALID_CODE_KEY, 0); // expected-error {{argument to ptrauth_sign_constant must refer to a global variable or function}} + +void test_sign_constant(int *dp, fp_t fp) { + int *sig1 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY); // expected-error {{too few arguments}} + int *sig2 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, &dv, &dv); // expected-error {{too many arguments}} + + int *sig3 = __builtin_ptrauth_sign_constant(mismatched_type, VALID_DATA_KEY, 0); // expected-error {{signed value must have pointer type; type here is 'struct A'}} + int *sig4 = __builtin_ptrauth_sign_constant(&dv, mismatched_type, 0); // expected-error {{passing 'struct A' to parameter of incompatible type 'int'}} + int *sig5 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, mismatched_type); // expected-error {{extra discriminator must have pointer or integer type; type here is 'struct A'}} + + float *result = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, 0); // expected-warning {{incompatible pointer types initializing 'float *' with an expression of type 'int *'}} + + int *valid1 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, 0); + int *valid2 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(&dv, 0)); + int *valid3 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(&dv + 8, 0)); + int *valid4 = __builtin_ptrauth_sign_constant(&dv_weak, VALID_DATA_KEY, 0); + int *valid5 = __builtin_ptrauth_sign_constant(&dv_weakref, VALID_DATA_KEY, 0); + + int *ptr = __builtin_ptrauth_sign_constant(NULL, VALID_DATA_KEY, &dv); // expected-error {{argument to ptrauth_sign_constant must refer to a global variable or function}} + int *key = __builtin_ptrauth_sign_constant(&dv, INVALID_KEY, 0); // expected-error {{does not identify a valid pointer authentication key for the current target}} + int *disc1 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, &fv); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + int *disc2 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(&fv, 0)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + + int *ptr2 = __builtin_ptrauth_sign_constant(dp, VALID_DATA_KEY, 0); // expected-error {{argument to ptrauth_sign_constant must refer to a global variable or function}} + int *disc3 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, dp); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + int *disc4 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(dp, 0)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + int *disc5 = __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY, __builtin_ptrauth_blend_discriminator(&dv, *dp)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + + fp_t f_valid1 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, 0); + fp_t f_valid2 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(&dv, 0)); + fp_t f_valid3 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(&dv + 8, 0)); + + fp_t f_key = __builtin_ptrauth_sign_constant(&fv, INVALID_KEY, 0); // expected-error {{does not identify a valid pointer authentication key for the current target}} + fp_t f_disc1 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, &fv); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + fp_t f_disc2 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(&fv, 0)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + + fp_t f_ptr = __builtin_ptrauth_sign_constant(fp, VALID_CODE_KEY, 0); // expected-error {{argument to ptrauth_sign_constant must refer to a global variable or function}} + fp_t f_disc3 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, dp); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + + fp_t f_disc4 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(dp, 0)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + fp_t f_disc5 = __builtin_ptrauth_sign_constant(&fv, VALID_CODE_KEY, __builtin_ptrauth_blend_discriminator(&dv, *dp)); // expected-error {{discriminator argument to ptrauth_sign_constant must be a constant integer, the address of the global variable where the result will be stored, or a blend of the two}} + + int *offset = __builtin_ptrauth_sign_constant((int *)((char*)&dv + 16), VALID_DATA_KEY, 0); + fp_t f_offset = __builtin_ptrauth_sign_constant((fp_t)((char*)&fv + 16), VALID_CODE_KEY, 0); // expected-error {{argument to ptrauth_sign_constant must refer to a global variable or function}} +} diff --git a/clang/test/SemaCXX/PR20334-std_initializer_list_diagnosis_assertion.cpp b/clang/test/SemaCXX/PR20334-std_initializer_list_diagnosis_assertion.cpp index fb1feee01b29f1b..fa8cbe2795b6b76 100644 --- a/clang/test/SemaCXX/PR20334-std_initializer_list_diagnosis_assertion.cpp +++ b/clang/test/SemaCXX/PR20334-std_initializer_list_diagnosis_assertion.cpp @@ -1,23 +1,17 @@ -// RUN: %clang_cc1 -std=c++11 -verify -emit-llvm-only %s -// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s -DCPP98 -// RUN: %clang_cc1 -std=c++11 -verify -emit-llvm-only %s -fexperimental-new-constant-interpreter -// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s -DCPP98 -fexperimental-new-constant-interpreter +// RUN: %clang_cc1 -std=c++11 -verify=cxx11 -emit-llvm-only %s +// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify=cxx98 %s +// RUN: %clang_cc1 -std=c++11 -verify=cxx11 -emit-llvm-only %s -fexperimental-new-constant-interpreter +// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify=cxx98 %s -fexperimental-new-constant-interpreter namespace std { template - class initializer_list - {}; + class initializer_list {}; + // cxx11-error@-1 {{'std::initializer_list' layout not recognized. Must be a non-polymorphic class type with no bases and two fields: a 'const E *' and either another 'const E *' or a 'std::size_t'}} } template int f(std::initializer_list il); int F = f({1, 2, 3}); -#ifdef CPP98 -//expected-error@-2{{expected expression}} -#else -//expected-error@-4{{cannot compile}} -#endif - - +// cxx98-error@-1 {{expected expression}} diff --git a/clang/test/SemaCXX/auto-invalid-init-crash.cpp b/clang/test/SemaCXX/auto-invalid-init-crash.cpp index f727473dd608571..ec921a4286aa2af 100644 --- a/clang/test/SemaCXX/auto-invalid-init-crash.cpp +++ b/clang/test/SemaCXX/auto-invalid-init-crash.cpp @@ -1,8 +1,8 @@ // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fno-recovery-ast -verify %s namespace std { -template -class initializer_list{}; +template +class initializer_list { const E *a, *b; }; int a; auto c = a, &d = {a}; // expected-error {{'auto' deduced as 'int'}} \ expected-error {{non-const lvalue reference to type}} diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index 143d93cefc7c4b5..74aa7cb2abe8363 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -1,5 +1,18 @@ // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -DUNION_TEST -verify %s +#ifdef UNION_TEST +namespace std { + template + union initializer_list { + // expected-error@-1 {{'std::initializer_list' layout not recognized.}} + const E* begin; + decltype(sizeof 0) size; + }; + + auto x = { 1, 2, 3 }; +}; +#else // This must obviously come before the definition of std::initializer_list. void missing_initializerlist() { auto l = {1, 2, 3, 4}; // expected-error {{std::initializer_list was not found}} @@ -367,14 +380,49 @@ namespace designated_init { } namespace weird_initlist { + template struct weird {}; } -template<> struct std::initializer_list { int a, b, c; }; +template<> struct std::initializer_list> { int a, b, c; }; +// expected-error@-1 2 {{'std::initializer_list>' layout not recognized}} +template<> struct std::initializer_list> { std::size_t sz; const weird_initlist::weird<1>* p; }; +// expected-error@-1 {{'std::initializer_list>' layout not recognized}} +template<> struct std::initializer_list> { const weird_initlist::weird<2>* first; const weird_initlist::weird<2>* last; }; +template<> struct std::initializer_list> { weird_initlist::weird<3>* p; std::size_t sz; }; +// expected-error@-1 {{'std::initializer_list>' layout not recognized}} +template<> struct std::initializer_list> { const weird_initlist::weird<4>& p; std::size_t sz; }; +// expected-error@-1 {{'std::initializer_list>' layout not recognized}} +template<> struct std::initializer_list> { const weird_initlist::weird<5>* p; std::size_t : sizeof(std::size_t) * __CHAR_BIT__; }; +// expected-error@-1 {{'std::initializer_list>' layout not recognized}} +template<> struct std::initializer_list> { const weird_initlist::weird<6>* p; std::size_t sz : sizeof(std::size_t) * __CHAR_BIT__; }; +// expected-error@-1 {{'std::initializer_list>' layout not recognized}} +struct empty_base {}; +template<> struct std::initializer_list> : empty_base { const weird_initlist::weird<7>* p; std::size_t sz; }; +// expected-error@-1 {{'std::initializer_list>' layout not recognized}} +template<> struct std::initializer_list> { const weird_initlist::weird<8>* p; std::size_t sz; ~initializer_list(); }; +template<> struct std::initializer_list> { const weird_initlist::weird<9>* p; std::size_t sz; virtual void f(); }; +// expected-error@-1 {{'std::initializer_list>' layout not recognized}} +template<> struct std::initializer_list> { const weird_initlist::weird<10>* p; alignas(64) std::size_t sz; }; +template<> struct std::initializer_list>; +// expected-note@-1 {{forward declaration of 'std::initializer_list>'}} namespace weird_initlist { - // We don't check the struct layout in Sema. - auto x = {weird{}, weird{}, weird{}, weird{}, weird{}}; - // ... but we do in constant evaluation. - constexpr auto y = {weird{}, weird{}, weird{}, weird{}, weird{}}; // expected-error {{constant}} expected-note {{type 'const std::initializer_list' has unexpected layout}} + auto _0 = {weird<0>{}, weird<0>{}, weird<0>{}, weird<0>{}, weird<0>{}}; + constexpr auto _0c = {weird<0>{}, weird<0>{}, weird<0>{}, weird<0>{}, weird<0>{}}; + auto _1 = {weird<1>{}, weird<1>{}}; + auto _2 = {weird<2>{}, weird<2>{}, weird<2>{}}; + constexpr auto _2c = {weird<2>{}, weird<2>{}, weird<2>{}}; // (Two pointer representation is supported) + static_assert(_2c.first + 3 == _2c.last, ""); + auto _3 = {weird<3>{}, weird<3>{}}; + auto _4 = {weird<4>{}, weird<4>{}}; + auto _5 = {weird<5>{}, weird<5>{}}; + auto _6 = {weird<6>{}, weird<6>{}}; + auto _7 = {weird<7>{}, weird<7>{}}; + auto _8 = {weird<8>{}, weird<8>{}}; + auto _9 = {weird<9>{}, weird<9>{}}; + auto _10 = {weird<10>{}, weird<10>{}}; + constexpr auto _10c = {weird<10>{}, weird<10>{}, weird<10>{}}; + static_assert(_10c.sz == 3, ""); + const auto& _11 = {weird<11>{}, weird<11>{}}; // expected-error {{initialization of incomplete type 'const std::initializer_list>'}} } auto v = std::initializer_list{1,2,3}; // expected-warning {{array backing local initializer list 'v' will be destroyed at the end of the full-expression}} @@ -386,3 +434,4 @@ std::initializer_list get(int cond) { return {1, 2, 3}; // expected-warning {{returning address of local temporary object}} return std::initializer_list{1, 2, 3}; // expected-warning {{returning address of local temporary object}} } +#endif // UNION_TEST diff --git a/clang/test/SemaCXX/cxx0x-noexcept-expression.cpp b/clang/test/SemaCXX/cxx0x-noexcept-expression.cpp index c2b2244c117a09b..c616a77f36619a9 100644 --- a/clang/test/SemaCXX/cxx0x-noexcept-expression.cpp +++ b/clang/test/SemaCXX/cxx0x-noexcept-expression.cpp @@ -1,6 +1,10 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++2a %s -fexceptions -fcxx-exceptions -Wno-unevaluated-expression // RUN: %clang_cc1 -fsyntax-only -verify -std=c++2a %s -fexceptions -fcxx-exceptions -Wno-unevaluated-expression -fexperimental-new-constant-interpreter +namespace std { +struct type_info; +} + void f(); // expected-note {{possible target for call}} void f(int); // expected-note {{possible target for call}} @@ -97,3 +101,59 @@ void j() noexcept(0); void k() noexcept(1); void l() noexcept(2); // expected-error {{noexcept specifier argument evaluates to 2, which cannot be narrowed to type 'bool'}} } // namespace P1401 + +namespace typeid_ { +template +struct Polymorphic { + Polymorphic() noexcept(NoexceptConstructor) {} + virtual ~Polymorphic() noexcept(NoexceptDestructor) {} +}; + +static_assert(noexcept(typeid(Polymorphic{}))); // Not evaluated (not glvalue) +static_assert(noexcept(typeid((Polymorphic&&) Polymorphic{}))); +static_assert(!noexcept(typeid((Polymorphic&&) Polymorphic{}))); +static_assert(!noexcept(typeid((Polymorphic&&) Polymorphic{}))); +static_assert(!noexcept(typeid(*&(const Polymorphic&) Polymorphic{}))); +static_assert(!noexcept(typeid(*&(const Polymorphic&) Polymorphic{}))); +static_assert(!noexcept(typeid(*&(const Polymorphic&) Polymorphic{}))); + +template +struct X { + template void f(); +}; +template +void f1() { + X dependent; + // `dependent` should be type-dependent because the noexcept-expression should be value-dependent + // (it is true if T is int*, false if T is Polymorphic* for example) + dependent.f(); // This should need to be `.template f` to parse as a template + // expected-error@-1 {{use 'template' keyword to treat 'f' as a dependent template name}} +} +template +void f2() { + X*>(nullptr) && ... && T{}))))> dependent; + // X when T...[0] is a type with some operator&& which returns int* + // X when sizeof...(T) == 0 + dependent.f(); + // expected-error@-1 {{use 'template' keyword to treat 'f' as a dependent template name}} +} +template +void f3() { + X(nullptr)))> dependent; + // X when T is int, X when T is Polymorphic + dependent.f(); + // expected-error@-1 {{use 'template' keyword to treat 'f' as a dependent template name}} +} +template +void f4() { + X not_dependent; + not_dependent.non_existent(); + // expected-error@-1 {{no member named 'non_existent' in 'typeid_::X'}} +} +template +void f5() { + X not_dependent; + not_dependent.non_existent(); + // expected-error@-1 {{no member named 'non_existent' in 'typeid_::X'}} +} +} // namespace typeid_ diff --git a/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp b/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp index d77cebdeba50035..86738ab10b4cc7a 100644 --- a/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp +++ b/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s namespace std { -template class initializer_list { }; +template class initializer_list { const _Ep *a, *b; }; } namespace cva { diff --git a/clang/test/SemaCXX/cxx20-using-enum.cpp b/clang/test/SemaCXX/cxx20-using-enum.cpp index d16df4e1b9d3cd2..14ef4b29925a12f 100644 --- a/clang/test/SemaCXX/cxx20-using-enum.cpp +++ b/clang/test/SemaCXX/cxx20-using-enum.cpp @@ -148,13 +148,10 @@ template struct C { enum class D { d, e, f }; - using enum D; - - static constexpr int W = int(f) + I; + using enum D; // expected-error {{using-enum cannot name a dependent type}} }; static_assert(C<2>::V == 4); -static_assert(C<20>::W == 22); } // namespace Seven @@ -241,6 +238,13 @@ TPLa a; } // namespace Thirteen +namespace Fourteen { +template +int A = T(); + +using enum A; // expected-error {{A is not an enumerated type}} +} // namespace Fourteen + namespace GH58057 { struct Wrap { enum Things { diff --git a/clang/test/SemaCXX/cxx98-compat.cpp b/clang/test/SemaCXX/cxx98-compat.cpp index b31bee672bbe323..3ce69d6908c5b22 100644 --- a/clang/test/SemaCXX/cxx98-compat.cpp +++ b/clang/test/SemaCXX/cxx98-compat.cpp @@ -6,11 +6,11 @@ namespace std { struct type_info; using size_t = decltype(sizeof(0)); // expected-warning {{decltype}} expected-warning {{alias}} template struct initializer_list { - initializer_list(T*, size_t); - T *p; + initializer_list(const T*, size_t); + const T *p; size_t n; - T *begin(); - T *end(); + const T *begin(); + const T *end(); }; } diff --git a/clang/test/SemaCXX/invalid-member-expr.cpp b/clang/test/SemaCXX/invalid-member-expr.cpp index 6ef33ea575a1281..235db185c933023 100644 --- a/clang/test/SemaCXX/invalid-member-expr.cpp +++ b/clang/test/SemaCXX/invalid-member-expr.cpp @@ -26,7 +26,7 @@ void test2() { // PR6327 namespace test3 { template struct pair {}; - template class initializer_list {}; + template class initializer_list { const _E *a, *b; }; template pair<_Tp, _Tp> minmax(initializer_list<_Tp> __l) {}; void test0() { diff --git a/clang/test/SemaCXX/lambda-as-default-parameter.cpp b/clang/test/SemaCXX/lambda-as-default-parameter.cpp new file mode 100644 index 000000000000000..1f07a7f5644b7ca --- /dev/null +++ b/clang/test/SemaCXX/lambda-as-default-parameter.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s + +struct a; // expected-note {{forward declaration of 'a'}} \ + expected-note {{forward declaration of 'a'}} +void b(a c = [] { return c; }); // expected-error {{initialization of incomplete type 'a'}} \ + expected-error {{variable has incomplete type 'a'}} diff --git a/clang/test/SemaCXX/uninitialized.cpp b/clang/test/SemaCXX/uninitialized.cpp index c83c2e795824a57..8a640c9691b3217 100644 --- a/clang/test/SemaCXX/uninitialized.cpp +++ b/clang/test/SemaCXX/uninitialized.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -Wall -Wuninitialized -Wno-unused-value -Wno-unused-lambda-capture -Wno-uninitialized-const-reference -std=c++1z -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wall -Wuninitialized -Wno-unused-value -Wno-unused-lambda-capture -Wno-uninitialized-const-reference -std=c++1z -verify %s -fexperimental-new-constant-interpreter // definitions for std::move namespace std { diff --git a/clang/test/SemaHLSL/ScalarOverloadResolution.hlsl b/clang/test/SemaHLSL/ScalarOverloadResolution.hlsl index 41702ef175320a5..d1a47af228e2410 100644 --- a/clang/test/SemaHLSL/ScalarOverloadResolution.hlsl +++ b/clang/test/SemaHLSL/ScalarOverloadResolution.hlsl @@ -72,7 +72,7 @@ void Case1(half H, float F, double D) { HalfFloatDouble(D); } -// Case 2: A function declared with double and float overlaods. +// Case 2: A function declared with double and float overloads. // (a) When called with half, it will resolve to float because float is lower // ranked than double. // (b) When called with float it will resolve to float because float is an diff --git a/clang/test/SemaHLSL/VectorElementOverloadResolution.hlsl b/clang/test/SemaHLSL/VectorElementOverloadResolution.hlsl index 12575084ead2bbb..bbf8d3b5e102c7e 100644 --- a/clang/test/SemaHLSL/VectorElementOverloadResolution.hlsl +++ b/clang/test/SemaHLSL/VectorElementOverloadResolution.hlsl @@ -71,7 +71,7 @@ void Case1(half2 H, float2 F, double2 D) { HalfFloatDouble(D); } -// Case 2: A function declared with double and float overlaods. +// Case 2: A function declared with double and float overloads. // (a) When called with half, it will resolve to float because float is lower // ranked than double. // (b) When called with float it will resolve to float because float is an diff --git a/clang/test/SemaTemplate/instantiate-init.cpp b/clang/test/SemaTemplate/instantiate-init.cpp index 6db33a972f86db6..5fc3e83114e28e4 100644 --- a/clang/test/SemaTemplate/instantiate-init.cpp +++ b/clang/test/SemaTemplate/instantiate-init.cpp @@ -2,9 +2,9 @@ namespace std { template struct initializer_list { - T *p; + const T *p; __SIZE_TYPE__ n; - initializer_list(T*, __SIZE_TYPE__); + initializer_list(const T*, __SIZE_TYPE__); }; } diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp index 623e888a3bf863d..cdfe8cfbd937997 100644 --- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp +++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp @@ -50,6 +50,7 @@ #include "llvm/Support/SourceMgr.h" #include "llvm/Support/StringSaver.h" #include "llvm/Support/TargetSelect.h" +#include "llvm/Support/TimeProfiler.h" #include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" diff --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp index 38002052227cd2e..bc4b1628807901e 100644 --- a/clang/tools/libclang/CXCursor.cpp +++ b/clang/tools/libclang/CXCursor.cpp @@ -335,6 +335,7 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent, case Stmt::ObjCSubscriptRefExprClass: case Stmt::RecoveryExprClass: case Stmt::SYCLUniqueStableNameExprClass: + case Stmt::EmbedExprClass: K = CXCursor_UnexposedExpr; break; diff --git a/clang/unittests/AST/CommentParser.cpp b/clang/unittests/AST/CommentParser.cpp index 1c57c899f907455..e0df182d430c36a 100644 --- a/clang/unittests/AST/CommentParser.cpp +++ b/clang/unittests/AST/CommentParser.cpp @@ -1639,6 +1639,143 @@ TEST_F(CommentParserTest, ThrowsCommandHasArg9) { } } +TEST_F(CommentParserTest, ParCommandHasArg1) { + const char *Sources[] = { + "/// @par Paragraph header:", "/// @par Paragraph header:\n", + "/// @par Paragraph header:\r\n", "/// @par Paragraph header:\n\r", + "/** @par Paragraph header:*/", + }; + + for (size_t i = 0, e = std::size(Sources); i != e; i++) { + FullComment *FC = parseString(Sources[i]); + ASSERT_TRUE(HasChildCount(FC, 2)); + + ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " ")); + { + BlockCommandComment *BCC; + ParagraphComment *PC; + ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "par", PC)); + ASSERT_TRUE(HasChildCount(PC, 0)); + ASSERT_TRUE(BCC->getNumArgs() == 1); + ASSERT_TRUE(BCC->getArgText(0) == "Paragraph header:"); + } + } +} + +TEST_F(CommentParserTest, ParCommandHasArg2) { + const char *Sources[] = { + "/// @par Paragraph header: ", "/// @par Paragraph header: \n", + "/// @par Paragraph header: \r\n", "/// @par Paragraph header: \n\r", + "/** @par Paragraph header: */", + }; + + for (size_t i = 0, e = std::size(Sources); i != e; i++) { + FullComment *FC = parseString(Sources[i]); + ASSERT_TRUE(HasChildCount(FC, 2)); + + ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " ")); + { + BlockCommandComment *BCC; + ParagraphComment *PC; + ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "par", PC)); + ASSERT_TRUE(HasChildCount(PC, 0)); + ASSERT_TRUE(BCC->getNumArgs() == 1); + ASSERT_TRUE(BCC->getArgText(0) == "Paragraph header: "); + } + } +} + +TEST_F(CommentParserTest, ParCommandHasArg3) { + const char *Sources[] = { + ("/// @par Paragraph header:\n" + "/// Paragraph body"), + ("/// @par Paragraph header:\r\n" + "/// Paragraph body"), + ("/// @par Paragraph header:\n\r" + "/// Paragraph body"), + }; + + for (size_t i = 0, e = std::size(Sources); i != e; i++) { + FullComment *FC = parseString(Sources[i]); + ASSERT_TRUE(HasChildCount(FC, 2)); + + ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " ")); + { + BlockCommandComment *BCC; + ParagraphComment *PC; + TextComment *TC; + ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "par", PC)); + ASSERT_TRUE(HasChildCount(PC, 1)); + ASSERT_TRUE(BCC->getNumArgs() == 1); + ASSERT_TRUE(BCC->getArgText(0) == "Paragraph header:"); + ASSERT_TRUE(GetChildAt(PC, 0, TC)); + ASSERT_TRUE(TC->getText() == " Paragraph body"); + } + } +} + +TEST_F(CommentParserTest, ParCommandHasArg4) { + const char *Sources[] = { + ("/// @par Paragraph header:\n" + "/// Paragraph body1\n" + "/// Paragraph body2"), + ("/// @par Paragraph header:\r\n" + "/// Paragraph body1\n" + "/// Paragraph body2"), + ("/// @par Paragraph header:\n\r" + "/// Paragraph body1\n" + "/// Paragraph body2"), + }; + + for (size_t i = 0, e = std::size(Sources); i != e; i++) { + FullComment *FC = parseString(Sources[i]); + ASSERT_TRUE(HasChildCount(FC, 2)); + + ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " ")); + { + BlockCommandComment *BCC; + ParagraphComment *PC; + TextComment *TC; + ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "par", PC)); + ASSERT_TRUE(HasChildCount(PC, 2)); + ASSERT_TRUE(BCC->getNumArgs() == 1); + ASSERT_TRUE(BCC->getArgText(0) == "Paragraph header:"); + ASSERT_TRUE(GetChildAt(PC, 0, TC)); + ASSERT_TRUE(TC->getText() == " Paragraph body1"); + ASSERT_TRUE(GetChildAt(PC, 1, TC)); + ASSERT_TRUE(TC->getText() == " Paragraph body2"); + } + } +} + +TEST_F(CommentParserTest, ParCommandHasArg5) { + const char *Sources[] = { + ("/// @par \n" + "/// Paragraphs with no text before newline have no heading"), + ("/// @par \r\n" + "/// Paragraphs with no text before newline have no heading"), + ("/// @par \n\r" + "/// Paragraphs with no text before newline have no heading"), + }; + + for (size_t i = 0, e = std::size(Sources); i != e; i++) { + FullComment *FC = parseString(Sources[i]); + ASSERT_TRUE(HasChildCount(FC, 2)); + + ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " ")); + { + BlockCommandComment *BCC; + ParagraphComment *PC; + TextComment *TC; + ASSERT_TRUE(HasBlockCommandAt(FC, Traits, 1, BCC, "par", PC)); + ASSERT_TRUE(HasChildCount(PC, 1)); + ASSERT_TRUE(BCC->getNumArgs() == 0); + ASSERT_TRUE(GetChildAt(PC, 0, TC)); + ASSERT_TRUE(TC->getText() == + "Paragraphs with no text before newline have no heading"); + } + } +} } // unnamed namespace diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp index 2e42b85808953eb..f2eaf19d61402a4 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp @@ -1427,8 +1427,8 @@ TEST_P(ASTMatchersTest, return; } StringRef code = "namespace std {" - "template class initializer_list {" - " public: initializer_list() noexcept {}" + "template class initializer_list {" + " public: const E *a, *b;" "};" "}" "struct A {" diff --git a/clang/unittests/Analysis/FlowSensitive/TestingSupport.h b/clang/unittests/Analysis/FlowSensitive/TestingSupport.h index 7348f8b1740d0e4..2ba84373531c6db 100644 --- a/clang/unittests/Analysis/FlowSensitive/TestingSupport.h +++ b/clang/unittests/Analysis/FlowSensitive/TestingSupport.h @@ -110,6 +110,22 @@ struct AnalysisOutputs { llvm::ArrayRef> BlockStates; }; +/// A callback to be called with the state before or after visiting a CFG +/// element. +/// This differs from `DiagnosisCallback` in that the return type is void. +template +using DiagnosisCallbackForTesting = std::function &)>; + +/// A pair of callbacks to be called with the state before and after visiting a +/// CFG element. +/// Either or both of the callbacks may be null. +template struct DiagnosisCallbacksForTesting { + DiagnosisCallbackForTesting Before; + DiagnosisCallbackForTesting After; +}; + /// Arguments for building the dataflow analysis. template struct AnalysisInputs { /// Required fields are set in constructor. @@ -126,12 +142,16 @@ template struct AnalysisInputs { SetupTest = std::move(Arg); return std::move(*this); } - AnalysisInputs &&withPostVisitCFG( - std::function &)> - Arg) && { - PostVisitCFG = std::move(Arg); + AnalysisInputs && + withDiagnosisCallbacks(DiagnosisCallbacksForTesting Arg) && { + Callbacks = std::move(Arg); + return std::move(*this); + } + /// Provided for backwards compatibility. New callers should use + /// `withDiagnosisCallbacks()`. + AnalysisInputs && + withPostVisitCFG(DiagnosisCallbackForTesting Arg) && { + Callbacks.After = std::move(Arg); return std::move(*this); } AnalysisInputs &&withASTBuildArgs(ArrayRef Arg) && { @@ -168,12 +188,8 @@ template struct AnalysisInputs { /// the `AnalysisOutputs` argument will be initialized except for the /// `BlockStates` field which is only computed later during the analysis. std::function SetupTest = nullptr; - /// Optional. If provided, this function is applied on each CFG element after - /// the analysis has been run. - std::function &)> - PostVisitCFG = nullptr; + /// Callbacks to run on each CFG element after the analysis has been run. + DiagnosisCallbacksForTesting Callbacks; /// Optional. Options for building the AST context. ArrayRef ASTBuildArgs = {}; @@ -199,7 +215,7 @@ llvm::DenseMap buildLineToAnnotationMapping( const SourceManager &SM, const LangOptions &LangOpts, SourceRange BoundingRange, llvm::Annotations AnnotatedCode); -/// Runs dataflow specified from `AI.MakeAnalysis` and `AI.PostVisitCFG` on all +/// Runs dataflow specified from `AI.MakeAnalysis` and `AI.Callbacks` on all /// functions that match `AI.TargetFuncMatcher` in `AI.Code`. Given the /// analysis outputs, `VerifyResults` checks that the results from the analysis /// are correct. @@ -230,19 +246,30 @@ checkDataflow(AnalysisInputs AI, "they were printed to the test log"); } - std::function - TypeErasedPostVisitCFG = nullptr; - if (AI.PostVisitCFG) { - TypeErasedPostVisitCFG = [&AI, &Context]( - const CFGElement &Element, - const TypeErasedDataflowAnalysisState &State) { - AI.PostVisitCFG(Context, Element, - TransferStateForDiagnostics( - llvm::any_cast( - State.Lattice.Value), - State.Env)); - }; + CFGEltCallbacksTypeErased PostAnalysisCallbacks; + if (AI.Callbacks.Before) { + PostAnalysisCallbacks.Before = + [&AI, &Context](const CFGElement &Element, + const TypeErasedDataflowAnalysisState &State) { + AI.Callbacks.Before( + Context, Element, + TransferStateForDiagnostics( + llvm::any_cast( + State.Lattice.Value), + State.Env)); + }; + } + if (AI.Callbacks.After) { + PostAnalysisCallbacks.After = + [&AI, &Context](const CFGElement &Element, + const TypeErasedDataflowAnalysisState &State) { + AI.Callbacks.After( + Context, Element, + TransferStateForDiagnostics( + llvm::any_cast( + State.Lattice.Value), + State.Env)); + }; } SmallVector MatchResult = ast_matchers::match( @@ -285,7 +312,7 @@ checkDataflow(AnalysisInputs AI, llvm::Expected>> MaybeBlockStates = runTypeErasedDataflowAnalysis(ACFG, Analysis, InitEnv, - TypeErasedPostVisitCFG, + PostAnalysisCallbacks, MaxBlockVisitsInAnalysis); if (!MaybeBlockStates) return MaybeBlockStates.takeError(); AO.BlockStates = *MaybeBlockStates; @@ -369,14 +396,16 @@ checkDataflow(AnalysisInputs AI, // Save the states computed for program points immediately following annotated // statements. The saved states are keyed by the content of the annotation. llvm::StringMap AnnotationStates; - auto PostVisitCFG = + DiagnosisCallbacksForTesting Callbacks; + Callbacks.Before = std::move(AI.Callbacks.Before); + Callbacks.After = [&StmtToAnnotations, &AnnotationStates, - PrevPostVisitCFG = std::move(AI.PostVisitCFG)]( + PrevCallbackAfter = std::move(AI.Callbacks.After)]( ASTContext &Ctx, const CFGElement &Elt, const TransferStateForDiagnostics &State) { - if (PrevPostVisitCFG) { - PrevPostVisitCFG(Ctx, Elt, State); + if (PrevCallbackAfter) { + PrevCallbackAfter(Ctx, Elt, State); } // FIXME: Extend retrieval of state for non statement constructs. auto Stmt = Elt.getAs(); @@ -394,7 +423,7 @@ checkDataflow(AnalysisInputs AI, return checkDataflow( std::move(AI) .withSetupTest(std::move(SetupTest)) - .withPostVisitCFG(std::move(PostVisitCFG)), + .withDiagnosisCallbacks(std::move(Callbacks)), [&VerifyResults, &AnnotationStates](const AnalysisOutputs &AO) { VerifyResults(AnnotationStates, AO); diff --git a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp index 2a74d7fa63fd74a..cfbc64c77b0cc4d 100644 --- a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp @@ -3265,7 +3265,7 @@ TEST(TransferTest, ResultObjectLocationForStdInitializerListExpr) { std::string Code = R"( namespace std { template - struct initializer_list {}; + struct initializer_list { const T *a, *b; }; } // namespace std void target() { diff --git a/clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp b/clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp index f16472ef17141cf..4227a6bfdeba876 100644 --- a/clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp @@ -552,6 +552,7 @@ namespace std { template class initializer_list { public: + const T *a, *b; initializer_list() noexcept; }; @@ -1336,15 +1337,17 @@ class UncheckedOptionalAccessTest [](ASTContext &Ctx, Environment &Env) { return UncheckedOptionalAccessModel(Ctx, Env); }) - .withPostVisitCFG( - [&Diagnostics, - Diagnoser = UncheckedOptionalAccessDiagnoser(Options)]( - ASTContext &Ctx, const CFGElement &Elt, - const TransferStateForDiagnostics - &State) mutable { - auto EltDiagnostics = Diagnoser(Elt, Ctx, State); - llvm::move(EltDiagnostics, std::back_inserter(Diagnostics)); - }) + .withDiagnosisCallbacks( + {/*Before=*/[&Diagnostics, + Diagnoser = + UncheckedOptionalAccessDiagnoser(Options)]( + ASTContext &Ctx, const CFGElement &Elt, + const TransferStateForDiagnostics + &State) mutable { + auto EltDiagnostics = Diagnoser(Elt, Ctx, State); + llvm::move(EltDiagnostics, std::back_inserter(Diagnostics)); + }, + /*After=*/nullptr}) .withASTBuildArgs( {"-fsyntax-only", CxxMode, "-Wno-undefined-inline"}) .withASTBuildVirtualMappedFiles( diff --git a/clang/unittests/Support/TimeProfilerTest.cpp b/clang/unittests/Support/TimeProfilerTest.cpp index 97fdbb7232b1351..5f3950ff033f130 100644 --- a/clang/unittests/Support/TimeProfilerTest.cpp +++ b/clang/unittests/Support/TimeProfilerTest.cpp @@ -12,6 +12,7 @@ #include "llvm/Support/JSON.h" #include "llvm/Support/TimeProfiler.h" +#include #include "gtest/gtest.h" diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index 660d7b57d8e0b7f..307334a65b1fe29 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -903,13 +903,15 @@ namespace { StringRef shortType; std::vector values, enums, uniques; bool isExternal; + bool isCovered; public: EnumArgument(const Record &Arg, StringRef Attr) : Argument(Arg, Attr), values(Arg.getValueAsListOfStrings("Values")), enums(Arg.getValueAsListOfStrings("Enums")), uniques(uniqueEnumsInOrder(enums)), - isExternal(Arg.getValueAsBit("IsExternalType")) { + isExternal(Arg.getValueAsBit("IsExternalType")), + isCovered(Arg.getValueAsBit("IsCovered")) { StringRef Type = Arg.getValueAsString("Type"); shortType = isExternal ? Type.rsplit("::").second : Type; // If shortType didn't contain :: at all rsplit will give us an empty @@ -993,7 +995,7 @@ namespace { OS << " OS << \" " << I << "\";\n"; OS << " break;\n"; } - if (isExternal) { + if (!isCovered) { OS << " default:\n"; OS << " llvm_unreachable(\"Invalid attribute value\");\n"; } @@ -1036,7 +1038,7 @@ namespace { OS << " case " << fullType << "::" << enums[I] << ": return \"" << values[I] << "\";\n"; } - if (isExternal) { + if (!isCovered) { OS << " default: llvm_unreachable(\"Invalid attribute value\");\n"; } OS << " }\n" @@ -1050,6 +1052,7 @@ namespace { StringRef shortType; std::vector values, enums, uniques; bool isExternal; + bool isCovered; protected: void writeValueImpl(raw_ostream &OS) const override { @@ -1068,7 +1071,8 @@ namespace { values(Arg.getValueAsListOfStrings("Values")), enums(Arg.getValueAsListOfStrings("Enums")), uniques(uniqueEnumsInOrder(enums)), - isExternal(Arg.getValueAsBit("IsExternalType")) { + isExternal(Arg.getValueAsBit("IsExternalType")), + isCovered(Arg.getValueAsBit("IsCovered")) { StringRef Type = Arg.getValueAsString("Type"); shortType = isExternal ? Type.rsplit("::").second : Type; // If shortType didn't contain :: at all rsplit will give us an empty @@ -1111,6 +1115,10 @@ namespace { OS << " OS << \" " << UI << "\";\n"; OS << " break;\n"; } + if (!isCovered) { + OS << " default:\n"; + OS << " llvm_unreachable(\"Invalid attribute value\");\n"; + } OS << " }\n"; OS << " }\n"; } @@ -1168,6 +1176,9 @@ namespace { OS << " case " << fullType << "::" << enums[I] << ": return \"" << values[I] << "\";\n"; } + if (!isCovered) { + OS << " default: llvm_unreachable(\"Invalid attribute value\");\n"; + } OS << " }\n" << " llvm_unreachable(\"No enumerator with that value\");\n" << "}\n"; diff --git a/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp b/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp index a113b02e19995da..aee7d38786a51c6 100644 --- a/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp +++ b/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp @@ -32,8 +32,7 @@ void clang::EmitClangCommentCommandInfo(RecordKeeper &Records, Record &Tag = *Tags[i]; OS << " { " << "\"" << Tag.getValueAsString("Name") << "\", " - << "\"" << Tag.getValueAsString("EndCommandName") << "\", " - << i << ", " + << "\"" << Tag.getValueAsString("EndCommandName") << "\", " << i << ", " << Tag.getValueAsInt("NumArgs") << ", " << Tag.getValueAsBit("IsInlineCommand") << ", " << Tag.getValueAsBit("IsBlockCommand") << ", " @@ -44,6 +43,7 @@ void clang::EmitClangCommentCommandInfo(RecordKeeper &Records, << Tag.getValueAsBit("IsThrowsCommand") << ", " << Tag.getValueAsBit("IsDeprecatedCommand") << ", " << Tag.getValueAsBit("IsHeaderfileCommand") << ", " + << Tag.getValueAsBit("IsParCommand") << ", " << Tag.getValueAsBit("IsEmptyParagraphAllowed") << ", " << Tag.getValueAsBit("IsVerbatimBlockCommand") << ", " << Tag.getValueAsBit("IsVerbatimBlockEndCommand") << ", " @@ -52,8 +52,7 @@ void clang::EmitClangCommentCommandInfo(RecordKeeper &Records, << Tag.getValueAsBit("IsFunctionDeclarationCommand") << ", " << Tag.getValueAsBit("IsRecordLikeDetailCommand") << ", " << Tag.getValueAsBit("IsRecordLikeDeclarationCommand") << ", " - << /* IsUnknownCommand = */ "0" - << " }"; + << /* IsUnknownCommand = */ "0" << " }"; if (i + 1 != e) OS << ","; OS << "\n"; diff --git a/clang/utils/TableGen/SveEmitter.cpp b/clang/utils/TableGen/SveEmitter.cpp index 7d25914c7353901..c41c812ab9707aa 100644 --- a/clang/utils/TableGen/SveEmitter.cpp +++ b/clang/utils/TableGen/SveEmitter.cpp @@ -1781,7 +1781,12 @@ void SVEEmitter::createStreamingAttrs(raw_ostream &OS, ACLEKind Kind) { uint64_t VerifyRuntimeMode = getEnumValueForFlag("VerifyRuntimeMode"); uint64_t IsStreamingCompatibleFlag = getEnumValueForFlag("IsStreamingCompatible"); + for (auto &Def : Defs) { + if (!Def->isFlagSet(VerifyRuntimeMode) && Def->getGuard().contains("sve") && + Def->getGuard().contains("sme")) + llvm_unreachable("Missing VerifyRuntimeMode flag"); + if (Def->isFlagSet(IsStreamingFlag)) StreamingMap["ArmStreaming"].insert(Def->getMangledName()); else if (Def->isFlagSet(VerifyRuntimeMode)) diff --git a/clang/www/c_status.html b/clang/www/c_status.html index a94c606c3244a43..d71d4c216f74473 100644 --- a/clang/www/c_status.html +++ b/clang/www/c_status.html @@ -44,7 +44,15 @@

C Support in Clang

C99 -std=c99 - Almost certainly + Clang 17 + C11 @@ -63,9 +71,9 @@

C Support in Clang

-

The implementation status for C99, C11, C17, and C23 are currently under -investigation. Any proposal whose status in Clang is currently unknown -will be marked in magenta.

+

The implementation status for C11 and C23 are currently under investigation. +Any proposal whose status in Clang is currently unknown will be marked in +magenta.

The Clang community is continually striving to improve C standards compliance between releases by submitting and tracking @@ -83,7 +91,7 @@

C89 implementation status

C99 implementation status

-

Clang implements a significant portion of the ISO 9899:1999 (C99) standard, but the status of individual proposals is still under investigation.

+

Clang implements all of the ISO 9899:1999 (C99) standard.

Note, the list of C99 features comes from the C99 committee draft. Not all C99 documents are publicly available, so the documents referenced in this section may be inaccurate, unknown, or not linked.

Benign typedef redefinition @@ -472,11 +503,6 @@

C11 implementation status

N1391 Yes - - Analyzability (along the lines) - N1394 - Unknown - Wide function returns (alternate proposal) N1396 @@ -1213,7 +1239,7 @@

C23 implementation status

#embed N3017 - No + Clang 19 diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index dac38cedfcb751b..937f67981e2963b 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -8,12 +8,19 @@