]> granicus.if.org Git - llvm/commit
[DAGCombiner] Improve division estimation of floating points.
authorQiu Chaofan <qiucofan@cn.ibm.com>
Thu, 12 Sep 2019 07:51:24 +0000 (07:51 +0000)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Thu, 12 Sep 2019 07:51:24 +0000 (07:51 +0000)
commit0c4c55c8ffa8c2bf3f449ad5cf399c08831453fd
tree3297ed37e2feb9e42571c50d05e8757558fbc23d
parentadb7e101c87fdda1a74523dd064725fb62f54220
[DAGCombiner] Improve division estimation of floating points.

Current implementation of estimating divisions loses precision since it
estimates reciprocal first and does multiplication.  This patch is to re-order
arithmetic operations in the last iteration in DAGCombiner to improve the
accuracy.

Reviewed By: Sanjay Patel, Jinsong Ji

Differential Revision: https://reviews.llvm.org/D66050

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371713 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AMDGPU/fdiv.ll
test/CodeGen/AMDGPU/rsq.ll
test/CodeGen/PowerPC/qpx-recipest.ll
test/CodeGen/PowerPC/recipest.ll
test/CodeGen/X86/recip-fastmath.ll
test/CodeGen/X86/recip-fastmath2.ll