[Openmp-commits] [openmp] [Clang] Support target attr specifying CPU (PR #68678)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Oct 12 09:45:46 PDT 2023


================
@@ -76,10 +80,14 @@ int __attribute__((target("fpmath=387"))) walrus(void) { return 4; }
 int __attribute__((target("float128,arch=hiss"))) meow(void) {  return 4; }
 // no warning, same as saying 'nothing'.
 int __attribute__((target("arch="))) turtle(void) { return 4; }
+// no warning, same as saying 'nothing'.
+int __attribute__((target("cpu="))) equus(void) { return 4; }
 //expected-warning at +1 {{unknown CPU 'hiss' in the 'target' attribute string; 'target' attribute ignored}}
 int __attribute__((target("arch=hiss,arch=woof"))) pine_tree(void) { return 4; }
 //expected-warning at +1 {{duplicate 'arch=' in the 'target' attribute string; 'target' attribute ignored}}
 int __attribute__((target("arch=pwr9,arch=pwr10"))) oak_tree(void) { return 4; }
+//expected-warning at +1 {{duplicate 'cpu=' in the 'target' attribute string; 'target' attribute ignored}}
----------------
DanielKristofKiss wrote:

just realised this error message is not the clearest for the developers, maybe we could hint arch, cpu are same thing here. maybe a different patch.

https://github.com/llvm/llvm-project/pull/68678


More information about the Openmp-commits mailing list