Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / AArch64 / fmv-dependencies.c
blobf74b7aa32c7dcafeed587ec84ffde765a4cad3a7
1 // Test/document all of the dependencies between possible AArch64 FMV extensions.
2 // Also test the name mangling.
4 // RUN: %clang --target=aarch64-linux-gnu --rtlib=compiler-rt -emit-llvm -S -o - %s | FileCheck %s
6 // CHECK: define dso_local i32 @fmv._Maes() #[[aes:[0-9]+]] {
7 __attribute__((target_version("aes"))) int fmv(void) { return 0; }
9 // CHECK: define dso_local i32 @fmv._Mbf16() #[[bf16:[0-9]+]] {
10 __attribute__((target_version("bf16"))) int fmv(void) { return 0; }
12 // CHECK: define dso_local i32 @fmv._Mbti() #[[bti:[0-9]+]] {
13 __attribute__((target_version("bti"))) int fmv(void) { return 0; }
15 // CHECK: define dso_local i32 @fmv._Mcrc() #[[crc:[0-9]+]] {
16 __attribute__((target_version("crc"))) int fmv(void) { return 0; }
18 // CHECK: define dso_local i32 @fmv._Mdit() #[[dit:[0-9]+]] {
19 __attribute__((target_version("dit"))) int fmv(void) { return 0; }
21 // CHECK: define dso_local i32 @fmv._Mdotprod() #[[dotprod:[0-9]+]] {
22 __attribute__((target_version("dotprod"))) int fmv(void) { return 0; }
24 // CHECK: define dso_local i32 @fmv._Mdpb() #[[dpb:[0-9]+]] {
25 __attribute__((target_version("dpb"))) int fmv(void) { return 0; }
27 // CHECK: define dso_local i32 @fmv._Mdpb2() #[[dpb2:[0-9]+]] {
28 __attribute__((target_version("dpb2"))) int fmv(void) { return 0; }
30 // CHECK: define dso_local i32 @fmv._Mf32mm() #[[f32mm:[0-9]+]] {
31 __attribute__((target_version("f32mm"))) int fmv(void) { return 0; }
33 // CHECK: define dso_local i32 @fmv._Mf64mm() #[[f64mm:[0-9]+]] {
34 __attribute__((target_version("f64mm"))) int fmv(void) { return 0; }
36 // CHECK: define dso_local i32 @fmv._Mfcma() #[[fcma:[0-9]+]] {
37 __attribute__((target_version("fcma"))) int fmv(void) { return 0; }
39 // CHECK: define dso_local i32 @fmv._Mflagm() #[[flagm:[0-9]+]] {
40 __attribute__((target_version("flagm"))) int fmv(void) { return 0; }
42 // CHECK: define dso_local i32 @fmv._Mflagm2() #[[flagm2:[0-9]+]] {
43 __attribute__((target_version("flagm2"))) int fmv(void) { return 0; }
45 // CHECK: define dso_local i32 @fmv._Mfp() #[[default:[0-9]+]] {
46 __attribute__((target_version("fp"))) int fmv(void) { return 0; }
48 // CHECK: define dso_local i32 @fmv._Mfp16() #[[fp16:[0-9]+]] {
49 __attribute__((target_version("fp16"))) int fmv(void) { return 0; }
51 // CHECK: define dso_local i32 @fmv._Mfp16fml() #[[fp16fml:[0-9]+]] {
52 __attribute__((target_version("fp16fml"))) int fmv(void) { return 0; }
54 // CHECK: define dso_local i32 @fmv._Mfrintts() #[[frintts:[0-9]+]] {
55 __attribute__((target_version("frintts"))) int fmv(void) { return 0; }
57 // CHECK: define dso_local i32 @fmv._Mi8mm() #[[i8mm:[0-9]+]] {
58 __attribute__((target_version("i8mm"))) int fmv(void) { return 0; }
60 // CHECK: define dso_local i32 @fmv._Mjscvt() #[[jscvt:[0-9]+]] {
61 __attribute__((target_version("jscvt"))) int fmv(void) { return 0; }
63 // CHECK: define dso_local i32 @fmv._Mls64() #[[ls64:[0-9]+]] {
64 __attribute__((target_version("ls64"))) int fmv(void) { return 0; }
66 // CHECK: define dso_local i32 @fmv._Mlse() #[[lse:[0-9]+]] {
67 __attribute__((target_version("lse"))) int fmv(void) { return 0; }
69 // CHECK: define dso_local i32 @fmv._Mmemtag() #[[memtag:[0-9]+]] {
70 __attribute__((target_version("memtag"))) int fmv(void) { return 0; }
72 // CHECK: define dso_local i32 @fmv._Mmops() #[[mops:[0-9]+]] {
73 __attribute__((target_version("mops"))) int fmv(void) { return 0; }
75 // CHECK: define dso_local i32 @fmv._Mpredres() #[[predres:[0-9]+]] {
76 __attribute__((target_version("predres"))) int fmv(void) { return 0; }
78 // CHECK: define dso_local i32 @fmv._Mrcpc() #[[rcpc:[0-9]+]] {
79 __attribute__((target_version("rcpc"))) int fmv(void) { return 0; }
81 // CHECK: define dso_local i32 @fmv._Mrcpc2() #[[rcpc2:[0-9]+]] {
82 __attribute__((target_version("rcpc2"))) int fmv(void) { return 0; }
84 // CHECK: define dso_local i32 @fmv._Mrcpc3() #[[rcpc3:[0-9]+]] {
85 __attribute__((target_version("rcpc3"))) int fmv(void) { return 0; }
87 // CHECK: define dso_local i32 @fmv._Mrdm() #[[rdm:[0-9]+]] {
88 __attribute__((target_version("rdm"))) int fmv(void) { return 0; }
90 // CHECK: define dso_local i32 @fmv._Mrng() #[[rng:[0-9]+]] {
91 __attribute__((target_version("rng"))) int fmv(void) { return 0; }
93 // CHECK: define dso_local i32 @fmv._Msb() #[[sb:[0-9]+]] {
94 __attribute__((target_version("sb"))) int fmv(void) { return 0; }
96 // CHECK: define dso_local i32 @fmv._Msha2() #[[sha2:[0-9]+]] {
97 __attribute__((target_version("sha2"))) int fmv(void) { return 0; }
99 // CHECK: define dso_local i32 @fmv._Msha3() #[[sha3:[0-9]+]] {
100 __attribute__((target_version("sha3"))) int fmv(void) { return 0; }
102 // CHECK: define dso_local i32 @fmv._Msimd() #[[default]] {
103 __attribute__((target_version("simd"))) int fmv(void) { return 0; }
105 // CHECK: define dso_local i32 @fmv._Msm4() #[[sm4:[0-9]+]] {
106 __attribute__((target_version("sm4"))) int fmv(void) { return 0; }
108 // CHECK: define dso_local i32 @fmv._Msme() #[[sme:[0-9]+]] {
109 __attribute__((target_version("sme"))) int fmv(void) { return 0; }
111 // CHECK: define dso_local i32 @fmv._Msme-f64f64() #[[sme_f64f64:[0-9]+]] {
112 __attribute__((target_version("sme-f64f64"))) int fmv(void) { return 0; }
114 // CHECK: define dso_local i32 @fmv._Msme-i16i64() #[[sme_i16i64:[0-9]+]] {
115 __attribute__((target_version("sme-i16i64"))) int fmv(void) { return 0; }
117 // CHECK: define dso_local i32 @fmv._Msme2() #[[sme2:[0-9]+]] {
118 __attribute__((target_version("sme2"))) int fmv(void) { return 0; }
120 // CHECK: define dso_local i32 @fmv._Mssbs() #[[ssbs:[0-9]+]] {
121 __attribute__((target_version("ssbs"))) int fmv(void) { return 0; }
123 // CHECK: define dso_local i32 @fmv._Msve() #[[sve:[0-9]+]] {
124 __attribute__((target_version("sve"))) int fmv(void) { return 0; }
126 // CHECK: define dso_local i32 @fmv._Msve2() #[[sve2:[0-9]+]] {
127 __attribute__((target_version("sve2"))) int fmv(void) { return 0; }
129 // CHECK: define dso_local i32 @fmv._Msve2-aes() #[[sve2_aes:[0-9]+]] {
130 __attribute__((target_version("sve2-aes"))) int fmv(void) { return 0; }
132 // CHECK: define dso_local i32 @fmv._Msve2-bitperm() #[[sve2_bitperm:[0-9]+]] {
133 __attribute__((target_version("sve2-bitperm"))) int fmv(void) { return 0; }
135 // CHECK: define dso_local i32 @fmv._Msve2-sha3() #[[sve2_sha3:[0-9]+]] {
136 __attribute__((target_version("sve2-sha3"))) int fmv(void) { return 0; }
138 // CHECK: define dso_local i32 @fmv._Msve2-sm4() #[[sve2_sm4:[0-9]+]] {
139 __attribute__((target_version("sve2-sm4"))) int fmv(void) { return 0; }
141 // CHECK: define dso_local i32 @fmv._Mwfxt() #[[wfxt:[0-9]+]] {
142 __attribute__((target_version("wfxt"))) int fmv(void) { return 0; }
144 // CHECK-NOT: define dso_local i32 @fmv._M{{.*}}
145 __attribute__((target_version("non_existent_extension"))) int fmv(void);
147 __attribute__((target_version("default"))) int fmv(void);
149 int caller() {
150 return fmv();
153 // CHECK: attributes #[[aes]] = { {{.*}} "target-features"="+aes,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
154 // CHECK: attributes #[[bf16]] = { {{.*}} "target-features"="+bf16,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
155 // CHECK: attributes #[[bti]] = { {{.*}} "target-features"="+bti,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
156 // CHECK: attributes #[[crc]] = { {{.*}} "target-features"="+crc,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
157 // CHECK: attributes #[[dit]] = { {{.*}} "target-features"="+dit,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
158 // CHECK: attributes #[[dotprod]] = { {{.*}} "target-features"="+dotprod,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
159 // CHECK: attributes #[[dpb]] = { {{.*}} "target-features"="+ccpp,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
160 // CHECK: attributes #[[dpb2]] = { {{.*}} "target-features"="+ccdp,+ccpp,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
161 // CHECK: attributes #[[f32mm]] = { {{.*}} "target-features"="+f32mm,+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a"
162 // CHECK: attributes #[[f64mm]] = { {{.*}} "target-features"="+f64mm,+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a"
163 // CHECK: attributes #[[fcma]] = { {{.*}} "target-features"="+complxnum,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
164 // CHECK: attributes #[[flagm]] = { {{.*}} "target-features"="+flagm,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
165 // CHECK: attributes #[[flagm2]] = { {{.*}} "target-features"="+altnzcv,+flagm,+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
166 // CHECK: attributes #[[default]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+v8a"
167 // CHECK: attributes #[[fp16]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+v8a"
168 // CHECK: attributes #[[fp16fml]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fp16fml,+fullfp16,+neon,+outline-atomics,+v8a"
169 // CHECK: attributes #[[frintts]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fptoint,+neon,+outline-atomics,+v8a"
170 // CHECK: attributes #[[i8mm]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+i8mm,+neon,+outline-atomics,+v8a"
171 // CHECK: attributes #[[jscvt]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+jsconv,+neon,+outline-atomics,+v8a"
172 // CHECK: attributes #[[ls64]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+ls64,+neon,+outline-atomics,+v8a"
173 // CHECK: attributes #[[lse]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+lse,+neon,+outline-atomics,+v8a"
174 // CHECK: attributes #[[memtag]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+mte,+neon,+outline-atomics,+v8a"
175 // CHECK: attributes #[[mops]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+mops,+neon,+outline-atomics,+v8a"
176 // CHECK: attributes #[[predres]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+predres,+v8a"
177 // CHECK: attributes #[[rcpc]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+rcpc,+v8a"
178 // CHECK: attributes #[[rcpc2]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+rcpc,+rcpc-immo,+v8a"
179 // CHECK: attributes #[[rcpc3]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+rcpc,+rcpc-immo,+rcpc3,+v8a"
180 // CHECK: attributes #[[rdm]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+rdm,+v8a"
181 // CHECK: attributes #[[rng]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+rand,+v8a"
182 // CHECK: attributes #[[sb]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+sb,+v8a"
183 // CHECK: attributes #[[sha2]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+sha2,+v8a"
184 // CHECK: attributes #[[sha3]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+sha2,+sha3,+v8a"
185 // CHECK: attributes #[[sm4]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+sm4,+v8a"
186 // CHECK: attributes #[[sme]] = { {{.*}} "target-features"="+bf16,+fmv,+fp-armv8,+neon,+outline-atomics,+sme,+v8a"
187 // CHECK: attributes #[[sme_f64f64]] = { {{.*}} "target-features"="+bf16,+fmv,+fp-armv8,+neon,+outline-atomics,+sme,+sme-f64f64,+v8a"
188 // CHECK: attributes #[[sme_i16i64]] = { {{.*}} "target-features"="+bf16,+fmv,+fp-armv8,+neon,+outline-atomics,+sme,+sme-i16i64,+v8a"
189 // CHECK: attributes #[[sme2]] = { {{.*}} "target-features"="+bf16,+fmv,+fp-armv8,+neon,+outline-atomics,+sme,+sme2,+v8a"
190 // CHECK: attributes #[[ssbs]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+ssbs,+v8a"
191 // CHECK: attributes #[[sve]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+v8a"
192 // CHECK: attributes #[[sve2]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+v8a"
193 // CHECK: attributes #[[sve2_aes]] = { {{.*}} "target-features"="+aes,+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve-aes,+sve2,+sve2-aes,+v8a"
194 // CHECK: attributes #[[sve2_bitperm]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sve,+sve2,+sve2-bitperm,+v8a"
195 // CHECK: attributes #[[sve2_sha3]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sha2,+sha3,+sve,+sve2,+sve2-sha3,+v8a"
196 // CHECK: attributes #[[sve2_sm4]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+fullfp16,+neon,+outline-atomics,+sm4,+sve,+sve2,+sve2-sm4,+v8a"
197 // CHECK: attributes #[[wfxt]] = { {{.*}} "target-features"="+fmv,+fp-armv8,+neon,+outline-atomics,+v8a,+wfxt"