| 1 |
// NOTE: File has been autogenerated by utils/aarch64_builtins_test_generator.py |
| 2 |
// RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sve -verify=guard |
| 3 |
// RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2p2 -target-feature +sve -verify |
| 4 |
// expected-no-diagnostics |
| 5 |
|
| 6 |
// REQUIRES: aarch64-registered-target |
| 7 |
|
| 8 |
#include <arm_sve.h> |
| 9 |
|
| 10 |
// Properties: guard="sve" streaming_guard="sme,sme2p2" flags="feature-dependent" |
| 11 |
|
| 12 |
void test(void) { |
| 13 |
svbool_t svbool_t_val; |
| 14 |
svfloat32_t svfloat32_t_val; |
| 15 |
svfloat64_t svfloat64_t_val; |
| 16 |
svint32_t svint32_t_val; |
| 17 |
svint64_t svint64_t_val; |
| 18 |
svuint32_t svuint32_t_val; |
| 19 |
svuint64_t svuint64_t_val; |
| 20 |
|
| 21 |
svcompact(svbool_t_val, svfloat32_t_val); |
| 22 |
svcompact(svbool_t_val, svfloat64_t_val); |
| 23 |
svcompact(svbool_t_val, svint32_t_val); |
| 24 |
svcompact(svbool_t_val, svint64_t_val); |
| 25 |
svcompact(svbool_t_val, svuint32_t_val); |
| 26 |
svcompact(svbool_t_val, svuint64_t_val); |
| 27 |
svcompact_f32(svbool_t_val, svfloat32_t_val); |
| 28 |
svcompact_f64(svbool_t_val, svfloat64_t_val); |
| 29 |
svcompact_s32(svbool_t_val, svint32_t_val); |
| 30 |
svcompact_s64(svbool_t_val, svint64_t_val); |
| 31 |
svcompact_u32(svbool_t_val, svuint32_t_val); |
| 32 |
svcompact_u64(svbool_t_val, svuint64_t_val); |
| 33 |
} |
| 34 |
|
| 35 |
void test_streaming(void) __arm_streaming{ |
| 36 |
svbool_t svbool_t_val; |
| 37 |
svfloat32_t svfloat32_t_val; |
| 38 |
svfloat64_t svfloat64_t_val; |
| 39 |
svint32_t svint32_t_val; |
| 40 |
svint64_t svint64_t_val; |
| 41 |
svuint32_t svuint32_t_val; |
| 42 |
svuint64_t svuint64_t_val; |
| 43 |
|
| 44 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 45 |
svcompact(svbool_t_val, svfloat32_t_val); |
| 46 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 47 |
svcompact(svbool_t_val, svfloat64_t_val); |
| 48 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 49 |
svcompact(svbool_t_val, svint32_t_val); |
| 50 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 51 |
svcompact(svbool_t_val, svint64_t_val); |
| 52 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 53 |
svcompact(svbool_t_val, svuint32_t_val); |
| 54 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 55 |
svcompact(svbool_t_val, svuint64_t_val); |
| 56 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 57 |
svcompact_f32(svbool_t_val, svfloat32_t_val); |
| 58 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 59 |
svcompact_f64(svbool_t_val, svfloat64_t_val); |
| 60 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 61 |
svcompact_s32(svbool_t_val, svint32_t_val); |
| 62 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 63 |
svcompact_s64(svbool_t_val, svint64_t_val); |
| 64 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 65 |
svcompact_u32(svbool_t_val, svuint32_t_val); |
| 66 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 67 |
svcompact_u64(svbool_t_val, svuint64_t_val); |
| 68 |
} |
| 69 |
|
| 70 |
void test_streaming_compatible(void) __arm_streaming_compatible{ |
| 71 |
svbool_t svbool_t_val; |
| 72 |
svfloat32_t svfloat32_t_val; |
| 73 |
svfloat64_t svfloat64_t_val; |
| 74 |
svint32_t svint32_t_val; |
| 75 |
svint64_t svint64_t_val; |
| 76 |
svuint32_t svuint32_t_val; |
| 77 |
svuint64_t svuint64_t_val; |
| 78 |
|
| 79 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 80 |
svcompact(svbool_t_val, svfloat32_t_val); |
| 81 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 82 |
svcompact(svbool_t_val, svfloat64_t_val); |
| 83 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 84 |
svcompact(svbool_t_val, svint32_t_val); |
| 85 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 86 |
svcompact(svbool_t_val, svint64_t_val); |
| 87 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 88 |
svcompact(svbool_t_val, svuint32_t_val); |
| 89 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 90 |
svcompact(svbool_t_val, svuint64_t_val); |
| 91 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 92 |
svcompact_f32(svbool_t_val, svfloat32_t_val); |
| 93 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 94 |
svcompact_f64(svbool_t_val, svfloat64_t_val); |
| 95 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 96 |
svcompact_s32(svbool_t_val, svint32_t_val); |
| 97 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 98 |
svcompact_s64(svbool_t_val, svint64_t_val); |
| 99 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 100 |
svcompact_u32(svbool_t_val, svuint32_t_val); |
| 101 |
// guard-error@+1 {{builtin can only be called from a non-streaming function}} |
| 102 |
svcompact_u64(svbool_t_val, svuint64_t_val); |
| 103 |
} |