Only have codegen turn fdiv by a constant into fmul by the reciprocal
authorDuncan Sands <baldrick@free.fr>
Sun, 8 Apr 2012 18:08:12 +0000 (18:08 +0000)
committerDuncan Sands <baldrick@free.fr>
Sun, 8 Apr 2012 18:08:12 +0000 (18:08 +0000)
commit3ef3fcfc0414b96d626b706c6151596684b7d134
treed3be66c997afe87dfd18329a2c371ba40fde5bb6
parentf873dde50264ffab16f3d12eaec8be91edfcc131
Only have codegen turn fdiv by a constant into fmul by the reciprocal
when -ffast-math, i.e. don't just always do it if the reciprocal can
be formed exactly.  There is already an IR level transform that does
that, and it does it more carefully.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154296 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/fdiv.ll