================
@@ -1,1145 +0,0 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py 
UTC_ARGS: --function-signature --check-attributes --check-globals 
--include-generated-funcs --global-value-regex ".*"
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -o - %s | 
FileCheck %s
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature -fmv 
-emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK-NOFMV
-
-int __attribute__((target_version("rng+flagm+fp16fml"))) fmv(void) { return 1; 
}
-int __attribute__((target_version("flagm2+sme-i16i64"))) fmv(void) { return 2; 
}
-int __attribute__((target_version("lse+sha2"))) fmv(void) { return 3; }
-int __attribute__((target_version("dotprod+wfxt"))) fmv(void) { return 4; }
-int __attribute__((target_version("fp16fml+memtag"))) fmv(void) { return 5; }
-int __attribute__((target_version("fp+aes"))) fmv(void) { return 6; }
-int __attribute__((target_version("crc+wfxt"))) fmv(void) { return 7; }
-int __attribute__((target_version("bti"))) fmv(void) { return 8; }
-int __attribute__((target_version("sme2"))) fmv(void) { return 9; }
-int __attribute__((target_version("default"))) fmv(void) { return 0; }
-int __attribute__((target_version("wfxt+simd"))) fmv_one(void) { return 1; }
-int __attribute__((target_version("dpb"))) fmv_one(void) { return 2; }
-int __attribute__((target_version("default"))) fmv_one(void) { return 0; }
-int __attribute__((target_version("fp"))) fmv_two(void) { return 1; }
-int __attribute__((target_version("simd"))) fmv_two(void) { return 2; }
-int __attribute__((target_version("fp16+simd"))) fmv_two(void) { return 4; }
-int __attribute__((target_version("default"))) fmv_two(void) { return 0; }
-int foo() {
-  return fmv()+fmv_one()+fmv_two();
-}
-
-inline int __attribute__((target_version("sha2+aes+f64mm"))) fmv_inline(void) 
{ return 1; }
-inline int __attribute__((target_version("fp16+fcma+rdma+sme+ fp16 "))) 
fmv_inline(void) { return 2; }
-inline int __attribute__((target_version("sha3+i8mm+f32mm"))) fmv_inline(void) 
{ return 12; }
-inline int __attribute__((target_version("dit+bf16"))) fmv_inline(void) { 
return 8; }
-inline int __attribute__((target_version("dpb+rcpc2 "))) fmv_inline(void) { 
return 6; }
-inline int __attribute__((target_version(" dpb2 + jscvt"))) fmv_inline(void) { 
return 7; }
-inline int __attribute__((target_version("rcpc+frintts"))) fmv_inline(void) { 
return 3; }
-inline int __attribute__((target_version("sve+bf16"))) fmv_inline(void) { 
return 4; }
-inline int __attribute__((target_version("sve2-aes+sve2-sha3"))) 
fmv_inline(void) { return 5; }
-inline int __attribute__((target_version("sve2+sve2-aes+sve2-bitperm"))) 
fmv_inline(void) { return 9; }
-inline int __attribute__((target_version("sve2-sm4+memtag"))) fmv_inline(void) 
{ return 10; }
-inline int __attribute__((target_version("memtag+rcpc3+mops"))) 
fmv_inline(void) { return 11; }
-inline int __attribute__((target_version("aes+dotprod"))) fmv_inline(void) { 
return 13; }
-inline int __attribute__((target_version("simd+fp16fml"))) fmv_inline(void) { 
return 14; }
-inline int __attribute__((target_version("fp+sm4"))) fmv_inline(void) { return 
15; }
-inline int __attribute__((target_version("lse+rdm"))) fmv_inline(void) { 
return 16; }
-inline int __attribute__((target_version("default"))) fmv_inline(void) { 
return 3; }
-
-__attribute__((target_version("wfxt"))) int fmv_e(void);
-int fmv_e(void) { return 20; }
-
-static __attribute__((target_version("sb"))) inline int fmv_d(void);
-static __attribute__((target_version("default"))) inline int fmv_d(void);
-
-int __attribute__((target_version("default"))) fmv_default(void) { return 111; 
}
-int fmv_default(void);
-
-void fmv_c(void);
-void __attribute__((target_version("ssbs"))) fmv_c(void){};
-void __attribute__((target_version("default"))) fmv_c(void){};
-
-int goo() {
-  fmv_inline();
-  fmv_e();
-  fmv_d();
-  fmv_c();
-  return fmv_default();
-}
-static inline int __attribute__((target_version("sb"))) fmv_d(void) { return 
0; }
-static inline int __attribute__((target_version(" default "))) fmv_d(void) { 
return 1; }
-
-static void func(void) {}
-inline __attribute__((target_version("default"))) void recb(void) { func(); }
-inline __attribute__((target_version("default"))) void reca(void) { recb(); }
-void recur(void) { reca(); }
-
-int __attribute__((target_version("default"))) main(void) {
-  recur();
-  return goo();
-}
-
-typedef int (*Fptr)();
-void f(Fptr);
-int hoo(void) {
-  f(fmv);
-  Fptr fp1 = &fmv;
-  Fptr fp2 = fmv;
-  return fp1() + fp2();
-}
-
-// This should generate one target version but no resolver.
-__attribute__((target_version("default"))) int 
unused_with_forward_default_decl(void);
-__attribute__((target_version("mops"))) int 
unused_with_forward_default_decl(void) { return 0; }
-
-// This should also generate one target version but no resolver.
-extern int unused_with_implicit_extern_forward_default_decl(void);
-__attribute__((target_version("dotprod")))
-int unused_with_implicit_extern_forward_default_decl(void) { return 0; }
-
-// This should also generate one target version but no resolver.
-__attribute__((target_version("aes"))) int unused_with_default_decl(void) { 
return 0; }
-__attribute__((target_version("default"))) int unused_with_default_decl(void);
-
-// This should generate two target versions and the resolver.
-__attribute__((target_version("sve"))) int unused_with_default_def(void) { 
return 0; }
-__attribute__((target_version("default"))) int unused_with_default_def(void) { 
return 1; }
-
-// This should also generate two target versions and the resolver.
-__attribute__((target_version("fp16"))) int 
unused_with_implicit_default_def(void) { return 0; }
-int unused_with_implicit_default_def(void) { return 1; }
-
-// This should also generate two target versions and the resolver.
-int unused_with_implicit_forward_default_def(void) { return 0; }
-__attribute__((target_version("lse"))) int 
unused_with_implicit_forward_default_def(void) { return 1; }
-
-// This should generate a target version despite the default not being 
declared.
-__attribute__((target_version("rdm"))) int unused_without_default(void) { 
return 0; }
-
-// These shouldn't generate anything.
-int unused_version_declarations(void);
-__attribute__((target_version("jscvt"))) int unused_version_declarations(void);
-__attribute__((target_version("rdma"))) int unused_version_declarations(void);
-
-// These should generate the default (mangled) version and the resolver.
-int default_def_with_version_decls(void) { return 0; }
-__attribute__((target_version("jscvt"))) int 
default_def_with_version_decls(void);
-__attribute__((target_version("rdma"))) int 
default_def_with_version_decls(void);
-
-// The following is guarded because in NOFMV we get errors for calling 
undeclared functions.
-#ifdef __HAVE_FUNCTION_MULTI_VERSIONING
-// This should generate a default declaration, two target versions but no 
resolver.
-__attribute__((target_version("jscvt"))) int 
used_def_without_default_decl(void) { return 1; }
-__attribute__((target_version("rdma"))) int 
used_def_without_default_decl(void) { return 2; }
-
-// This should generate a default declaration but no resolver.
-__attribute__((target_version("jscvt"))) int 
used_decl_without_default_decl(void);
-__attribute__((target_version("rdma"))) int 
used_decl_without_default_decl(void);
-
-int caller(void) { return used_def_without_default_decl() + 
used_decl_without_default_decl(); }
-#endif
----------------
labrinea wrote:

I have added those tests. We have coverage for these in 
clang/test/CodeGen/AArch64/fmv-resolver-emission.c

https://github.com/llvm/llvm-project/pull/132273
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to