[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)
commit09b2c890af21a187591bf4caa2531569593116e0
tree500f8762846b42cd723ae2b479da5428071013c0
parent06812bf3d199a6c73a7b10d2ede02ecf02b045be
[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

llvm-svn: 240310
llvm/lib/Target/X86/X86TargetMachine.cpp
llvm/test/CodeGen/X86/recip-fastmath.ll
llvm/test/CodeGen/X86/sqrt-fastmath.ll