File: acle_sve2_imm_rotation.cpp

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (89 lines) | stat: -rw-r--r-- 5,618 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// REQUIRES: aarch64-registered-target

// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2 -fsyntax-only -verify %s
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2 -fsyntax-only -verify %s

#ifdef SVE_OVERLOADED_FORMS
// A simple used,unused... macro, long enough to represent any SVE builtin.
#define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
#else
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
#endif

#include <arm_sve.h>

void test_90_270()
{
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_s8,,)(svundef_s8(), svundef_s8(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_u8,,)(svundef_u8(), svundef_u8(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_s16,,)(svundef_s16(), svundef_s16(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_u16,,)(svundef_u16(), svundef_u16(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_s32,,)(svundef_s32(), svundef_s32(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_u32,,)(svundef_u32(), svundef_u32(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_s64,,)(svundef_s64(), svundef_s64(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_u64,,)(svundef_u64(), svundef_u64(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svqcadd,_s8,,)(svundef_s8(), svundef_s8(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svqcadd,_s16,,)(svundef_s16(), svundef_s16(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svqcadd,_s32,,)(svundef_s32(), svundef_s32(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svqcadd,_s64,,)(svundef_s64(), svundef_s64(), 180);
}

void test_0_90_180_270()
{
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcdot,_s32,,)(svundef_s32(), svundef_s8(), svundef_s8(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcdot_lane,_s32,,)(svundef_s32(), svundef_s8(), svundef_s8(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcdot,_s64,,)(svundef_s64(), svundef_s16(), svundef_s16(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcdot_lane,_s64,,)(svundef_s64(), svundef_s16(), svundef_s16(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_u8,,)(svundef_u8(), svundef_u8(), svundef_u8(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla_lane,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla_lane,_u16,,)(svundef_u16(), svundef_u16(), svundef_u16(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla_lane,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32(), 1, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla_lane,_u32,,)(svundef_u32(), svundef_u32(), svundef_u32(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_u64,,)(svundef_u64(), svundef_u64(), svundef_u64(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svqrdcmlah,_s8,,)(svundef_s8(), svundef_s8(), svundef_s8(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svqrdcmlah,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svqrdcmlah_lane,_s16,,)(svundef_s16(), svundef_s16(), svundef_s16(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svqrdcmlah,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svqrdcmlah_lane,_s32,,)(svundef_s32(), svundef_s32(), svundef_s32(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svqrdcmlah,_s64,,)(svundef_s64(), svundef_s64(), svundef_s64(), 19);
}