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

hfinkel at anl.gov hfinkel at anl.gov
Wed May 20 15:58:49 PDT 2015


================
Comment at: lib/Target/X86/X86TargetMachine.cpp:108
@@ -107,2 +107,3 @@
 
+  this->Options.Reciprocals.setDefaults("all", false, 1);
   initAsmInfo();
----------------
spatel wrote:
> 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).
I thought that getRsqrtEstimate, etc. were only called when fast-math is on?

http://reviews.llvm.org/D8982

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






More information about the llvm-commits mailing list