Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / aarch64_neon_sve_bridge_intrinsics / target.c
blobb5cbd24d5ff4878fcd26b928afe9fbdd672b0707
1 // REQUIRES: aarch64-registered-target
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -S -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@+1 {{'svundef_s8' needs target feature sve}}
22 svset_neonq_s8(svundef_s8(), n); // expected-error {{'svset_neonq_s8' needs target feature sve}}
23 // expected-error@+1 {{'svundef_s8' needs target feature sve}}
24 svget_neonq_s8(svundef_s8()); // expected-error {{'svget_neonq_s8' needs target feature sve}}
25 svdup_neonq_s8(n); // expected-error {{'svdup_neonq_s8' needs target feature sve}}
27 // expected-error@+1 {{'svundef_bf16' needs target feature sve}}
28 svset_neonq_bf16(svundef_bf16(), m); // expected-error {{'svset_neonq_bf16' needs target feature sve,bf16}}
29 // expected-error@+1 {{'svundef_bf16' needs target feature sve}}
30 svget_neonq_bf16(svundef_bf16()); // expected-error {{'svget_neonq_bf16' needs target feature sve,bf16}}
31 svdup_neonq_bf16(m); // expected-error {{'svdup_neonq_bf16' needs target feature sve,bf16}}