================
@@ -4114,8 +4114,26 @@ void CodeGenModule::emitMultiVersionFunctions() {
     }
 
     llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD);
-    if (auto *IFunc = dyn_cast<llvm::GlobalIFunc>(ResolverConstant))
+    if (auto *IFunc = dyn_cast<llvm::GlobalIFunc>(ResolverConstant)) {
       ResolverConstant = IFunc->getResolver();
+      // In Aarch64, default versions of multiversioned functions are mangled 
to
+      // their 'normal' assembly name. This deviates from other targets which
+      // append a '.default' string. As a result we need to continue appending
+      // .ifunc in Aarch64.
+      // FIXME: Should Aarch64 mangling for 'default' multiversion function and
+      // in turn ifunc function match that of other targets?
----------------
elizabethandrews wrote:

https://gcc.gnu.org/wiki/FunctionMultiVersioning says _"The only exception to 
this is the default version tagged with target attribute string "default". The 
default version retains the original assembler name and is not changed"_ Looks 
like this was intentional for some reason.

It is interesting that GCC changed mangling rules for `target_clones` attribute 
though. The default versions do have a `.default` suffix 

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

Reply via email to