xref: /llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/vlmul_trunc_v_invalid.c (revision a173edc987454927b95d6adefc4c36ccad294c97)
1 // REQUIRES: riscv-registered-target
2 // RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zfh \
3 // RUN:   -target-feature +zvfh -disable-O0-optnone %s -fsyntax-only -verify
4 
5 #include <riscv_vector.h>
6 
test_vlmul_trunc_v_u64m2_u64m2(vuint64m2_t op1)7 vuint64m2_t test_vlmul_trunc_v_u64m2_u64m2(vuint64m2_t op1) { // expected-note {{'test_vlmul_trunc_v_u64m2_u64m2' declared here}}
8   return __riscv_vlmul_trunc_v_u64m2_u64m2(op1); // expected-error {{call to undeclared function '__riscv_vlmul_trunc_v_u64m2_u64m2'; ISO C99 and later do not support implicit function declarations}} expected-error {{returning 'int' from a function with incompatible result type 'vuint64m2_t' (aka '__rvv_uint64m2_t')}} expected-note {{did you mean 'test_vlmul_trunc_v_u64m2_u64m2'?}}
9 }
10 
test_vlmul_trunc_v_u64m4_u64m4(vuint64m4_t op1)11 vuint64m4_t test_vlmul_trunc_v_u64m4_u64m4(vuint64m4_t op1) { // expected-note {{'test_vlmul_trunc_v_u64m4_u64m4' declared here}}
12   return __riscv_vlmul_trunc_v_u64m4_u64m4(op1); // expected-error {{call to undeclared function '__riscv_vlmul_trunc_v_u64m4_u64m4'; ISO C99 and later do not support implicit function declarations}} expected-error {{returning 'int' from a function with incompatible result type 'vuint64m4_t' (aka '__rvv_uint64m4_t')}} expected-note {{did you mean 'test_vlmul_trunc_v_u64m4_u64m4'?}}
13 }
14 
test_vlmul_trunc_v_u64m1_u64m1(vuint64m1_t op1)15 vuint64m1_t test_vlmul_trunc_v_u64m1_u64m1(vuint64m1_t op1) { // expected-note {{'test_vlmul_trunc_v_u64m1_u64m1' declared here}}
16   return __riscv_vlmul_trunc_v_u64m1_u64m1(op1); // expected-error {{call to undeclared function '__riscv_vlmul_trunc_v_u64m1_u64m1'; ISO C99 and later do not support implicit function declarations}} expected-error {{returning 'int' from a function with incompatible result type 'vuint64m1_t' (aka '__rvv_uint64m1_t')}} expected-note {{did you mean 'test_vlmul_trunc_v_u64m1_u64m1'?}}
17 }
18 
test_vlmul_trunc_v_u64m8_u64m8(vuint64m8_t op1)19 vuint64m8_t test_vlmul_trunc_v_u64m8_u64m8(vuint64m8_t op1) { // expected-note {{'test_vlmul_trunc_v_u64m8_u64m8' declared here}}
20   return __riscv_vlmul_trunc_v_u64m8_u64m8(op1); // expected-error {{call to undeclared function '__riscv_vlmul_trunc_v_u64m8_u64m8'; ISO C99 and later do not support implicit function declarations}} expected-error {{returning 'int' from a function with incompatible result type 'vuint64m8_t' (aka '__rvv_uint64m8_t')}} expected-note {{did you mean 'test_vlmul_trunc_v_u64m8_u64m8'?}}
21 }
22