Right now we're ignoring the fpmath attribute since there's no
backend support for a feature like this and to do so would require
checking the validity of the strings and doing general subtarget
feature parsing of valid and invalid features with the target
attribute feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239582
91177308-0d34-0410-b5e6-
96231b3b80d8
else if (Feature.startswith("tune="))
// We don't support cpu tuning this way currently.
;
+ else if (Feature.startswith("fpmath="))
+ // TODO: Support the fpmath option this way. It will require checking
+ // overall feature validity for the function with the rest of the
+ // attributes on the function.
+ ;
else if (Feature.startswith("mno-"))
Features.push_back("-" + Feature.split("-").second.str());
else
int __attribute__((target("avx,sse4.2,arch=ivybridge"))) foo(int a) { return 4; }
int __attribute__((target("tune=sandybridge"))) walrus(int a) { return 4; }
+int __attribute__((target("fpmath=387"))) koala(int a) { return 4; }
int __attribute__((target("mno-sse2"))) echidna(int a) { return 4; }
// CHECK: foo{{.*}} #1
// We ignore the tune attribute so walrus should be identical to baz and bar.
// CHECK: walrus{{.*}} #0
+// We're currently ignoring the fpmath attribute so koala should be identical to baz and bar.
+// CHECK: koala{{.*}} #0
// CHECK: echidna{{.*}} #2
// CHECK: bar{{.*}} #0
// CHECK: #0 = {{.*}}"target-cpu"="x86-64" "target-features"="+sse,+sse2"