[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / sparc-fixed-register.c
blob24880b9c9d86fddb2c50c2a7b16f04d9c8ab74ed
1 // RUN: %clang --target=sparc-none-gnu -ffixed-g1 -### %s 2> %t
2 // RUN: FileCheck --check-prefix=CHECK-FIXED-G1 < %t %s
3 // CHECK-FIXED-G1: "-target-feature" "+reserve-g1"
5 // RUN: %clang --target=sparc-none-gnu -ffixed-g2 -### %s 2> %t
6 // RUN: FileCheck --check-prefix=CHECK-FIXED-G2 < %t %s
7 // CHECK-FIXED-G2: "-target-feature" "+reserve-g2"
9 // RUN: %clang --target=sparc-none-gnu -ffixed-g3 -### %s 2> %t
10 // RUN: FileCheck --check-prefix=CHECK-FIXED-G3 < %t %s
11 // CHECK-FIXED-G3: "-target-feature" "+reserve-g3"
13 // RUN: %clang --target=sparc-none-gnu -ffixed-g4 -### %s 2> %t
14 // RUN: FileCheck --check-prefix=CHECK-FIXED-G4 < %t %s
15 // CHECK-FIXED-G4: "-target-feature" "+reserve-g4"
17 // RUN: %clang --target=sparc-none-gnu -ffixed-g5 -### %s 2> %t
18 // RUN: FileCheck --check-prefix=CHECK-FIXED-G5 < %t %s
19 // CHECK-FIXED-G5: "-target-feature" "+reserve-g5"
21 // RUN: %clang --target=sparc-none-gnu -ffixed-g6 -### %s 2> %t
22 // RUN: FileCheck --check-prefix=CHECK-FIXED-G6 < %t %s
23 // CHECK-FIXED-G6: "-target-feature" "+reserve-g6"
25 // RUN: %clang --target=sparc-none-gnu -ffixed-g7 -### %s 2> %t
26 // RUN: FileCheck --check-prefix=CHECK-FIXED-G7 < %t %s
27 // CHECK-FIXED-G7: "-target-feature" "+reserve-g7"
29 // RUN: %clang --target=sparc-none-gnu -ffixed-o0 -### %s 2> %t
30 // RUN: FileCheck --check-prefix=CHECK-FIXED-O0 < %t %s
31 // CHECK-FIXED-O0: "-target-feature" "+reserve-o0"
33 // RUN: %clang --target=sparc-none-gnu -ffixed-o1 -### %s 2> %t
34 // RUN: FileCheck --check-prefix=CHECK-FIXED-O1 < %t %s
35 // CHECK-FIXED-O1: "-target-feature" "+reserve-o1"
37 // RUN: %clang --target=sparc-none-gnu -ffixed-o2 -### %s 2> %t
38 // RUN: FileCheck --check-prefix=CHECK-FIXED-O2 < %t %s
39 // CHECK-FIXED-O2: "-target-feature" "+reserve-o2"
41 // RUN: %clang --target=sparc-none-gnu -ffixed-o3 -### %s 2> %t
42 // RUN: FileCheck --check-prefix=CHECK-FIXED-O3 < %t %s
43 // CHECK-FIXED-O3: "-target-feature" "+reserve-o3"
45 // RUN: %clang --target=sparc-none-gnu -ffixed-o4 -### %s 2> %t
46 // RUN: FileCheck --check-prefix=CHECK-FIXED-O4 < %t %s
47 // CHECK-FIXED-O4: "-target-feature" "+reserve-o4"
49 // RUN: %clang --target=sparc-none-gnu -ffixed-o5 -### %s 2> %t
50 // RUN: FileCheck --check-prefix=CHECK-FIXED-O5 < %t %s
51 // CHECK-FIXED-O5: "-target-feature" "+reserve-o5"
53 // RUN: %clang --target=sparc-none-gnu -ffixed-l0 -### %s 2> %t
54 // RUN: FileCheck --check-prefix=CHECK-FIXED-L0 < %t %s
55 // CHECK-FIXED-L0: "-target-feature" "+reserve-l0"
57 // RUN: %clang --target=sparc-none-gnu -ffixed-l1 -### %s 2> %t
58 // RUN: FileCheck --check-prefix=CHECK-FIXED-L1 < %t %s
59 // CHECK-FIXED-L1: "-target-feature" "+reserve-l1"
61 // RUN: %clang --target=sparc-none-gnu -ffixed-l2 -### %s 2> %t
62 // RUN: FileCheck --check-prefix=CHECK-FIXED-L2 < %t %s
63 // CHECK-FIXED-L2: "-target-feature" "+reserve-l2"
65 // RUN: %clang --target=sparc-none-gnu -ffixed-l3 -### %s 2> %t
66 // RUN: FileCheck --check-prefix=CHECK-FIXED-L3 < %t %s
67 // CHECK-FIXED-L3: "-target-feature" "+reserve-l3"
69 // RUN: %clang --target=sparc-none-gnu -ffixed-l4 -### %s 2> %t
70 // RUN: FileCheck --check-prefix=CHECK-FIXED-L4 < %t %s
71 // CHECK-FIXED-L4: "-target-feature" "+reserve-l4"
73 // RUN: %clang --target=sparc-none-gnu -ffixed-l5 -### %s 2> %t
74 // RUN: FileCheck --check-prefix=CHECK-FIXED-L5 < %t %s
75 // CHECK-FIXED-L5: "-target-feature" "+reserve-l5"
77 // RUN: %clang --target=sparc-none-gnu -ffixed-l6 -### %s 2> %t
78 // RUN: FileCheck --check-prefix=CHECK-FIXED-L6 < %t %s
79 // CHECK-FIXED-L6: "-target-feature" "+reserve-l6"
81 // RUN: %clang --target=sparc-none-gnu -ffixed-l7 -### %s 2> %t
82 // RUN: FileCheck --check-prefix=CHECK-FIXED-L7 < %t %s
83 // CHECK-FIXED-L7: "-target-feature" "+reserve-l7"
85 // RUN: %clang --target=sparc-none-gnu -ffixed-i0 -### %s 2> %t
86 // RUN: FileCheck --check-prefix=CHECK-FIXED-I0 < %t %s
87 // CHECK-FIXED-I0: "-target-feature" "+reserve-i0"
89 // RUN: %clang --target=sparc-none-gnu -ffixed-i1 -### %s 2> %t
90 // RUN: FileCheck --check-prefix=CHECK-FIXED-I1 < %t %s
91 // CHECK-FIXED-I1: "-target-feature" "+reserve-i1"
93 // RUN: %clang --target=sparc-none-gnu -ffixed-i2 -### %s 2> %t
94 // RUN: FileCheck --check-prefix=CHECK-FIXED-I2 < %t %s
95 // CHECK-FIXED-I2: "-target-feature" "+reserve-i2"
97 // RUN: %clang --target=sparc-none-gnu -ffixed-i3 -### %s 2> %t
98 // RUN: FileCheck --check-prefix=CHECK-FIXED-I3 < %t %s
99 // CHECK-FIXED-I3: "-target-feature" "+reserve-i3"
101 // RUN: %clang --target=sparc-none-gnu -ffixed-i4 -### %s 2> %t
102 // RUN: FileCheck --check-prefix=CHECK-FIXED-I4 < %t %s
103 // CHECK-FIXED-I4: "-target-feature" "+reserve-i4"
105 // RUN: %clang --target=sparc-none-gnu -ffixed-i5 -### %s 2> %t
106 // RUN: FileCheck --check-prefix=CHECK-FIXED-I5 < %t %s
107 // CHECK-FIXED-I5: "-target-feature" "+reserve-i5"
109 // Test multiple of reserve-* options together.
110 // RUN: %clang --target=sparc-none-gnu \
111 // RUN: -ffixed-g1 \
112 // RUN: -ffixed-o2 \
113 // RUN: -ffixed-l3 \
114 // RUN: -ffixed-i4 \
115 // RUN: -### %s 2> %t
116 // RUN: FileCheck \
117 // RUN: --check-prefix=CHECK-FIXED-G1 \
118 // RUN: --check-prefix=CHECK-FIXED-O2 \
119 // RUN: --check-prefix=CHECK-FIXED-L3 \
120 // RUN: --check-prefix=CHECK-FIXED-I4 \
121 // RUN: < %t %s
123 // Test all reserve-* options together.
124 // RUN: %clang --target=sparc-none-gnu \
125 // RUN: -ffixed-g1 \
126 // RUN: -ffixed-g2 \
127 // RUN: -ffixed-g3 \
128 // RUN: -ffixed-g4 \
129 // RUN: -ffixed-g5 \
130 // RUN: -ffixed-g6 \
131 // RUN: -ffixed-g7 \
132 // RUN: -ffixed-o0 \
133 // RUN: -ffixed-o1 \
134 // RUN: -ffixed-o2 \
135 // RUN: -ffixed-o3 \
136 // RUN: -ffixed-o4 \
137 // RUN: -ffixed-o5 \
138 // RUN: -ffixed-l0 \
139 // RUN: -ffixed-l1 \
140 // RUN: -ffixed-l2 \
141 // RUN: -ffixed-l3 \
142 // RUN: -ffixed-l4 \
143 // RUN: -ffixed-l5 \
144 // RUN: -ffixed-l6 \
145 // RUN: -ffixed-l7 \
146 // RUN: -ffixed-i0 \
147 // RUN: -ffixed-i1 \
148 // RUN: -ffixed-i2 \
149 // RUN: -ffixed-i3 \
150 // RUN: -ffixed-i4 \
151 // RUN: -ffixed-i5 \
152 // RUN: -### %s 2> %t
153 // RUN: FileCheck \
154 // RUN: --check-prefix=CHECK-FIXED-G1 \
155 // RUN: --check-prefix=CHECK-FIXED-G2 \
156 // RUN: --check-prefix=CHECK-FIXED-G3 \
157 // RUN: --check-prefix=CHECK-FIXED-G4 \
158 // RUN: --check-prefix=CHECK-FIXED-G5 \
159 // RUN: --check-prefix=CHECK-FIXED-G6 \
160 // RUN: --check-prefix=CHECK-FIXED-G7 \
161 // RUN: --check-prefix=CHECK-FIXED-O0 \
162 // RUN: --check-prefix=CHECK-FIXED-O1 \
163 // RUN: --check-prefix=CHECK-FIXED-O2 \
164 // RUN: --check-prefix=CHECK-FIXED-O3 \
165 // RUN: --check-prefix=CHECK-FIXED-O4 \
166 // RUN: --check-prefix=CHECK-FIXED-O5 \
167 // RUN: --check-prefix=CHECK-FIXED-L0 \
168 // RUN: --check-prefix=CHECK-FIXED-L1 \
169 // RUN: --check-prefix=CHECK-FIXED-L2 \
170 // RUN: --check-prefix=CHECK-FIXED-L3 \
171 // RUN: --check-prefix=CHECK-FIXED-L4 \
172 // RUN: --check-prefix=CHECK-FIXED-L5 \
173 // RUN: --check-prefix=CHECK-FIXED-L6 \
174 // RUN: --check-prefix=CHECK-FIXED-L7 \
175 // RUN: --check-prefix=CHECK-FIXED-I0 \
176 // RUN: --check-prefix=CHECK-FIXED-I1 \
177 // RUN: --check-prefix=CHECK-FIXED-I2 \
178 // RUN: --check-prefix=CHECK-FIXED-I3 \
179 // RUN: --check-prefix=CHECK-FIXED-I4 \
180 // RUN: --check-prefix=CHECK-FIXED-I5 \
181 // RUN: < %t %s