[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / CodeGen / aarch64_neon_sve_bridge_intrinsics / target.c
blobbc5f01e7ce0ffdb3e539c6d1f24b9aea1784f646
1 // REQUIRES: aarch64-registered-target
2 // RUN: %clang_cc1 -triple aarch64 -target-feature +neon -verify -emit-llvm -o - %s
4 #include <arm_neon_sve_bridge.h>
6 __attribute__((target("sve")))
7 void target_sve(svint8_t s, int8x16_t n) {
8 svset_neonq_s8(s, n);
9 svget_neonq_s8(s);
10 svdup_neonq_s8(n);
13 __attribute__((target("sve,bf16")))
14 void target_svebf16(svbfloat16_t t, bfloat16x8_t m) {
15 svset_neonq_bf16(t, m);
16 svget_neonq_bf16(t);
17 svdup_neonq_bf16(m);
20 void base(int8x16_t n, bfloat16x8_t m) {
21 // expected-error@+3 {{SVE vector type 'svint8_t' (aka '__SVInt8_t') cannot be used in a target without sve}}
22 // expected-error@+2 {{SVE vector type 'svint8_t' (aka '__SVInt8_t') cannot be used in a target without sve}}
23 // expected-error@+1 {{SVE vector type 'svint8_t' (aka '__SVInt8_t') cannot be used in a target without sve}}
24 svset_neonq_s8(svundef_s8(), n);
25 // expected-error@+2 {{SVE vector type 'svint8_t' (aka '__SVInt8_t') cannot be used in a target without sve}}
26 // expected-error@+1 {{SVE vector type 'svint8_t' (aka '__SVInt8_t') cannot be used in a target without sve}}
27 svget_neonq_s8(svundef_s8());
28 // expected-error@+1 {{SVE vector type 'svint8_t' (aka '__SVInt8_t') cannot be used in a target without sve}}
29 svdup_neonq_s8(n);
31 // expected-error@+3 {{SVE vector type 'svbfloat16_t' (aka '__SVBfloat16_t') cannot be used in a target without sve}}
32 // expected-error@+2 {{SVE vector type 'svbfloat16_t' (aka '__SVBfloat16_t') cannot be used in a target without sve}}
33 // expected-error@+1 {{SVE vector type 'svbfloat16_t' (aka '__SVBfloat16_t') cannot be used in a target without sve}}
34 svset_neonq_bf16(svundef_bf16(), m);
35 // expected-error@+2 {{SVE vector type 'svbfloat16_t' (aka '__SVBfloat16_t') cannot be used in a target without sve}}
36 // expected-error@+1 {{SVE vector type 'svbfloat16_t' (aka '__SVBfloat16_t') cannot be used in a target without sve}}
37 svget_neonq_bf16(svundef_bf16());
38 // expected-error@+1 {{SVE vector type 'svbfloat16_t' (aka '__SVBfloat16_t') cannot be used in a target without sve}}
39 svdup_neonq_bf16(m);