brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · bc5f01e Raw
41 lines · c
1// REQUIRES: aarch64-registered-target2// RUN: %clang_cc1 -triple aarch64 -target-feature +neon -verify -emit-llvm -o - %s3 4#include <arm_neon_sve_bridge.h>5 6__attribute__((target("sve")))7void target_sve(svint8_t s, int8x16_t n) {8  svset_neonq_s8(s, n);9  svget_neonq_s8(s);10  svdup_neonq_s8(n);11}12 13__attribute__((target("sve,bf16")))14void target_svebf16(svbfloat16_t t, bfloat16x8_t m) {15  svset_neonq_bf16(t, m);16  svget_neonq_bf16(t);17  svdup_neonq_bf16(m);18}19 20void 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);30 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);40}41