1 // REQUIRES: riscv-registered-target
2 // RUN: not %clang_cc1 -triple riscv64 -target-feature +zifencei -target-feature +m -target-feature +a \
3 // RUN: -emit-llvm-only %s 2>&1 | FileCheck %s
5 #include <riscv_vector.h>
8 // CHECK: error: '__builtin_rvv_vsetvli' needs target feature zve32x
9 __riscv_vsetvl_e8m8(1);
12 void test_rvv_i32_type() {
13 // CHECK: error: RISC-V type 'vint32m1_t' (aka '__rvv_int32m1_t') requires the 'zve32x' extension
17 void test_rvv_f32_type() {
18 // CHECK: error: RISC-V type 'vfloat32m1_t' (aka '__rvv_float32m1_t') requires the 'zve32f' extension
22 void test_rvv_f64_type() {
23 // CHECK: error: RISC-V type 'vfloat64m1_t' (aka '__rvv_float64m1_t') requires the 'zve64d' extension
27 // CHECK: error: duplicate 'arch=' in the 'target' attribute string;
28 __attribute__((target("arch=rv64gc;arch=rv64gc_zbb"))) void testMultiArchSelectLast() {}
29 // CHECK: error: duplicate 'cpu=' in the 'target' attribute string;
30 __attribute__((target("cpu=sifive-u74;cpu=sifive-u54"))) void testMultiCpuSelectLast() {}
31 // CHECK: error: duplicate 'tune=' in the 'target' attribute string;
32 __attribute__((target("tune=sifive-u74;tune=sifive-u54"))) void testMultiTuneSelectLast() {}