File: acle_sve_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 (61 lines) | stat: -rw-r--r-- 3,593 bytes parent folder | download | duplicates (14)
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
// REQUIRES: aarch64-registered-target

// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fsyntax-only -verify %s
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -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(svbool_t pg)
{
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f16,_x,)(pg, svundef_f16(), svundef_f16(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f16,_z,)(pg, svundef_f16(), svundef_f16(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f16,_m,)(pg, svundef_f16(), svundef_f16(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f32,_x,)(pg, svundef_f32(), svundef_f32(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f32,_z,)(pg, svundef_f32(), svundef_f32(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f32,_m,)(pg, svundef_f32(), svundef_f32(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f64,_x,)(pg, svundef_f64(), svundef_f64(), 0);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f64,_z,)(pg, svundef_f64(), svundef_f64(), 180);
  // expected-error@+1 {{argument should be the value 90 or 270}}
  SVE_ACLE_FUNC(svcadd,_f64,_m,)(pg, svundef_f64(), svundef_f64(), 0);
}

void test_0_90_180_270(svbool_t pg)
{
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f16,_x,)(pg, svundef_f16(), svundef_f16(), svundef_f16(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f16,_z,)(pg, svundef_f16(), svundef_f16(), svundef_f16(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f16,_m,)(pg, svundef_f16(), svundef_f16(), svundef_f16(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla_lane,_f16,,)(svundef_f16(), svundef_f16(), svundef_f16(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f32,_x,)(pg, svundef_f32(), svundef_f32(), svundef_f32(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f32,_z,)(pg, svundef_f32(), svundef_f32(), svundef_f32(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f32,_m,)(pg, svundef_f32(), svundef_f32(), svundef_f32(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla_lane,_f32,,)(svundef_f32(), svundef_f32(), svundef_f32(), 0, 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f64,_x,)(pg, svundef_f64(), svundef_f64(), svundef_f64(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f64,_z,)(pg, svundef_f64(), svundef_f64(), svundef_f64(), 19);
  // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
  SVE_ACLE_FUNC(svcmla,_f64,_m,)(pg, svundef_f64(), svundef_f64(), svundef_f64(), 19);
}