[x86] set default reciprocal (division and square root) codegen to match GCC
authorSanjay Patel <spatel@rotateright.com>
Mon, 22 Jun 2015 18:29:44 +0000 (18:29 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 22 Jun 2015 18:29:44 +0000 (18:29 +0000)
commit73aa02eb0979ae1d0643aee03c5d0c4b1926408f
tree528481bb6263b50f9d8c066d97e1baf2524fbb51
parent060e38ab9f38f8531477352a7641576406425a34
[x86] set default reciprocal (division and square root) codegen to match GCC

D8982 ( checked in at http://reviews.llvm.org/rL239001 ) added command-line
options to allow reciprocal estimate instructions to be used in place of
divisions and square roots.

This patch changes the default settings for x86 targets to allow that recip
codegen (except for scalar division because that breaks too much code) when
using -ffast-math or its equivalent.

This matches GCC behavior for this kind of codegen.

Differential Revision: http://reviews.llvm.org/D10396

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240310 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/recip-fastmath.ll
test/CodeGen/X86/sqrt-fastmath.ll