File: attr-target-version-riscv.cpp

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.8-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,388 kB
  • sloc: cpp: 7,438,767; ansic: 1,393,871; asm: 1,012,926; python: 241,728; f90: 86,635; objc: 75,411; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (119 lines) | stat: -rw-r--r-- 8,156 bytes parent folder | download | duplicates (6)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// RUN: %clang_cc1 -triple riscv64-linux-gnu  -fsyntax-only -verify -fexceptions -fcxx-exceptions %s -std=c++14

// expected-warning@+2 {{unsupported 'arch=rv64gcv' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=rv64gcv"))) int fullArchString(void) { return 2; }
// expected-error@+2 {{redefinition of 'fullArchString'}}
// expected-warning@+1 {{unsupported 'arch=default' in the 'target_version' attribute string; 'target_version' attribute ignored}}
__attribute__((target_version("arch=default"))) int fullArchString(void) { return 2; }

// expected-warning@+2 {{unsupported 'mcpu=sifive-u74' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("mcpu=sifive-u74"))) int mcpu(void) { return 2; }
// expected-error@+1 {{redefinition of 'mcpu'}}
__attribute__((target_version("default"))) int mcpu(void) { return 2; }

// expected-warning@+2 {{unsupported 'mtune=sifive-u74' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("mtune=sifive-u74"))) int mtune(void) { return 2; }
// expected-error@+1 {{redefinition of 'mtune'}}
__attribute__((target_version("default"))) int mtune(void) { return 2; }

// expected-warning@+2 {{unsupported '' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version(""))) int emptyVersion(void) { return 2; }
// expected-error@+1 {{redefinition of 'emptyVersion'}}
__attribute__((target_version("default"))) int emptyVersion(void) { return 2; }

// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+c"))) int dupVersion(void) { return 2; }
// expected-error@+1 {{redefinition of 'dupVersion'}}
__attribute__((target_version("arch=+c"))) int dupVersion(void) { return 2; }
__attribute__((target_version("default"))) int dupVersion(void) { return 2; }

// expected-warning@+2 {{unsupported 'arch=+zicsr' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+zicsr"))) int UnsupportBitMaskExt(void) { return 2; }
// expected-error@+1 {{redefinition of 'UnsupportBitMaskExt'}}
__attribute__((target_version("default"))) int UnsupportBitMaskExt(void) { return 2; }

// expected-warning@+2 {{unsupported 'NotADigit' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+c;priority=NotADigit"))) int UnsupportPriority(void) { return 2; }
// expected-error@+1 {{redefinition of 'UnsupportPriority'}}
__attribute__((target_version("default"))) int UnsupportPriority(void) { return 2;}

// expected-warning@+1 {{unsupported 'default;priority=2' in the 'target_version' attribute string; 'target_version' attribute ignored}}
__attribute__((target_version("default;priority=2"))) int UnsupportDefaultPriority(void) { return 2; }

// expected-warning@+2 {{unsupported 'arch=+c,zbb' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+c,zbb"))) int WithoutAddSign(void) { return 2;}
// expected-error@+1 {{redefinition of 'WithoutAddSign'}}
__attribute__((target_version("default"))) int WithoutAddSign(void) { return 2; }

// expected-warning@+2 {{unsupported 'arch=+c;default' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+c;default"))) int DefaultInVersion(void) { return 2;}
// expected-error@+1 {{redefinition of 'DefaultInVersion'}}
__attribute__((target_version("default"))) int DefaultInVersion(void) { return 2; }

// expected-warning@+2 {{unsupported '' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+c;"))) int EmptyVersionAfterSemiColon(void) { return 2;}
// expected-error@+1 {{redefinition of 'EmptyVersionAfterSemiColon'}}
__attribute__((target_version("default"))) int EmptyVersionAfterSemiColon(void) { return 2; }

// expected-warning@+2 {{unsupported 'arch=+c;arch=+f' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+c;arch=+f"))) int dupArch(void) { return 2; }
// expected-error@+1 {{redefinition of 'dupArch'}}
__attribute__((target_version("default"))) int dupArch(void) { return 2; }

// expected-warning@+2 {{unsupported 'default;default' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("default;default"))) int dupDefault(void) { return 2;}
// expected-error@+1 {{redefinition of 'dupDefault'}}
__attribute__((target_version("default"))) int dupDefault(void) { return 2; }

// expected-warning@+2 {{unsupported 'priority=1;priority=2' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("priority=1;priority=2"))) int dupPriority(void) { return 2; }
// expected-error@+1 {{redefinition of 'dupPriority'}}
__attribute__((target_version("default"))) int dupPriority(void) { return 2; }

// expected-warning@+2 {{unsupported '=1' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("=1"))) int invalidVerson1(void) { return 2; }
// expected-error@+1 {{redefinition of 'invalidVerson1'}}
__attribute__((target_version("default"))) int invalidVerson1(void) { return 2; }

// expected-warning@+2 {{unsupported '=+v' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("=+v"))) int invalidVerson2(void) { return 2; }
// expected-error@+1 {{redefinition of 'invalidVerson2'}}
__attribute__((target_version("default"))) int invalidVerson2(void) { return 2; }

// expected-warning@+2 {{unsupported 'v' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("v"))) int invalidVerson3(void) { return 2; }
// expected-error@+1 {{redefinition of 'invalidVerson3'}}
__attribute__((target_version("default"))) int invalidVerson3(void) { return 2; }

// expected-warning@+2 {{unsupported '' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version(";"))) int invalidVerson4(void) { return 2; }
// expected-error@+1 {{redefinition of 'invalidVerson4'}}
__attribute__((target_version("default"))) int invalidVerson4(void) { return 2; }

// expected-warning@+2 {{unsupported 'priority=1' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("priority=1"))) int prioriyWithoutArch(void) { return 2; }
// expected-error@+1 {{redefinition of 'prioriyWithoutArch'}}
__attribute__((target_version("default"))) int prioriyWithoutArch(void) { return 2; }

// expected-warning@+2 {{unsupported '-1' in the 'target_version' attribute string; 'target_version' attribute ignored}}
// expected-note@+1 {{previous definition is here}}
__attribute__((target_version("arch=+c;priority=-1"))) int UnsupportNegativePriority(void) { return 2; }
// expected-error@+1 {{redefinition of 'UnsupportNegativePriority'}}
__attribute__((target_version("default"))) int UnsupportNegativePriority(void) { return 2; }