1 // RUN: %clang_cc1 -triple aarch64 -target-feature +v8a -verify -DHAS8 -S %s -o -
2 // RUN: %clang_cc1 -triple aarch64 -target-feature +v8.1a -verify -DHAS81 -S %s -o -
3 // RUN: %clang_cc1 -triple aarch64 -target-feature +v9a -verify -DHAS9 -S %s -o -
4 // REQUIRES: aarch64-registered-target
7 // expected-no-diagnostics
14 __attribute__((target("arch=armv8.1-a")))
17 return __crc32cd(1, 1);
20 __attribute__((target("arch=armv9-a")))
21 svint8_t
test_svadd_attr(svbool_t pg
, svint8_t op1
, svint8_t op2
)
23 return svadd_s8_z(pg
, op1
, op2
);
26 __attribute__((target("arch=armv9-a")))
27 float16_t
test_fp16_on_v9(float16_t x
, float16_t y
)
29 return vabdh_f16(x
, y
);
35 // expected-error@+2{{always_inline function '__crc32cd' requires target feature 'crc'}}
42 #if defined(HAS8) || defined(HAS81)
43 // expected-error@+2{{SVE vector type 'svint8_t' (aka '__SVInt8_t') cannot be used in a target without sve}}