================
@@ -12365,13 +12366,17 @@ static bool CheckMultiVersionFunction(Sema &S, 
FunctionDecl *NewFD,
     return false;
   }
 
-  // Target attribute on AArch64 is not used for multiversioning
-  if (NewTA && TI.getTriple().isAArch64())
-    return false;
-
-  // Target attribute on RISCV is not used for multiversioning
-  if (NewTA && TI.getTriple().isRISCV())
+  // Target attribute is not used for multiversioning on AArch64, RISC-V or 
AIX.
+  if (NewTA && (TI.getTriple().isAArch64() || TI.getTriple().isRISCV() ||
+                TI.getTriple().isOSAIX())) {
+    if (Redeclaration) {
----------------
w2yehia wrote:

this breaks the following:
```
__attribute__((target("cpu=pwr10"))) int f(void) { return 1; }
__attribute__((target("cpu=pwr10"))) int f(void);

int g(void) { return f(); }
```

https://github.com/llvm/llvm-project/pull/236782
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to