[PATCH] make reciprocal estimate code generation more flexible by adding command-line options

Sanjay Patel spatel at rotateright.com
Wed May 20 15:56:14 PDT 2015


================
Comment at: lib/Target/X86/X86TargetMachine.cpp:108
@@ -107,2 +107,3 @@
 
+  this->Options.Reciprocals.setDefaults("all", false, 1);
   initAsmInfo();
----------------
hfinkel wrote:
> Why false? Do you want a target feature here?
We had target features to control these, but I think it would be better to behave like gcc unless we have reason to diverge. 

That said, this does not match gcc behavior yet; that would be my next patch. For x86 at least, we would turn the following on by default when using -ffast-math:
sqrt
vec-sqrt
vec-div

I didn't set these defaults in this patch because it would change -ffast-math codegen for all CPUs other than btver2 (which had the recip codegen enabled for all eligible x86 recip types via target features).

http://reviews.llvm.org/D8982

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list