68 lines · c
1// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \
2// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \
3// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
4// REQUIRES: riscv-registered-target
5
6#include <riscv_vector.h>
7
8vfloat32mf2_t test_asin_vv_i8mf8(vfloat32mf2_t v) {
9
10 return __builtin_elementwise_asin(v);
11 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
12 }
13
14 vfloat32mf2_t test_acos_vv_i8mf8(vfloat32mf2_t v) {
15
16 return __builtin_elementwise_acos(v);
17 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
18 }
19
20 vfloat32mf2_t test_atan_vv_i8mf8(vfloat32mf2_t v) {
21
22 return __builtin_elementwise_atan(v);
23 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
24 }
25
26vfloat32mf2_t test_atan2_vv_i8mf8(vfloat32mf2_t v) {
27
28 return __builtin_elementwise_atan2(v, v);
29 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
30}
31
32vfloat32mf2_t test_sin_vv_i8mf8(vfloat32mf2_t v) {
33
34 return __builtin_elementwise_sin(v);
35 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
36}
37
38vfloat32mf2_t test_cos_vv_i8mf8(vfloat32mf2_t v) {
39
40 return __builtin_elementwise_cos(v);
41 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
42}
43
44vfloat32mf2_t test_tan_vv_i8mf8(vfloat32mf2_t v) {
45
46 return __builtin_elementwise_tan(v);
47 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
48}
49
50vfloat32mf2_t test_sinh_vv_i8mf8(vfloat32mf2_t v) {
51
52 return __builtin_elementwise_sinh(v);
53 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
54 }
55
56 vfloat32mf2_t test_cosh_vv_i8mf8(vfloat32mf2_t v) {
57
58 return __builtin_elementwise_cosh(v);
59 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
60 }
61
62 vfloat32mf2_t test_tanh_vv_i8mf8(vfloat32mf2_t v) {
63
64 return __builtin_elementwise_tanh(v);
65 // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types}}
66 }
67
68