[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)
Tomas Matheson via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 8 07:33:45 PDT 2024
================
@@ -59,15 +59,22 @@ int bar() {
return m.goo(1) + foo(1) + foo();
}
+// Example to demonstrate that at the point of use we haven't yet seen the default.
+// At that point a declaration for the unmangled symbol is emitted, which is later
+// replaced by the ifunc symbol (once we have seen the default definition).
+__attribute__((target_version("aes"))) void fmv(void) {}
+void caller(void) { fmv(); }
+__attribute__((target_version("default"))) void fmv(void) {}
----------------
tmatheson-arm wrote:
I think we want to test the observable behaviour, not whatever is happening internally. The test doesn't actually check the internals anyway, besides that it doesn't crash. i.e. I would expect the comment to be something like:
> Test that an ifunc is generated and used when `default` is defined after the first use of the function
If we want to check the other case you mentioned, and `update_cc_test_checks.py` can't generate a test for it automatically, it should still be tested but it will have to be manually written.
https://github.com/llvm/llvm-project/pull/97761
More information about the cfe-commits
mailing list