diff options
author | Evandro Menezes <e.menezes@samsung.com> | 2016-11-10 23:31:06 +0000 |
---|---|---|
committer | Evandro Menezes <e.menezes@samsung.com> | 2016-11-10 23:31:06 +0000 |
commit | 21f9ce1a0d8776e4aeeae4d9b4762a58dd4d2421 (patch) | |
tree | f3532c55de6bddff7960c82390993f148894863d /llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | |
parent | 16d52a2a723e0a365c79152c7438a60134346d1d (diff) | |
download | bcm5719-llvm-21f9ce1a0d8776e4aeeae4d9b4762a58dd4d2421.tar.gz bcm5719-llvm-21f9ce1a0d8776e4aeeae4d9b4762a58dd4d2421.zip |
[DAG Combiner] Fix the native computation of the Newton series for reciprocals
The generic infrastructure to compute the Newton series for reciprocal and
reciprocal square root was conceived to allow a target to compute the series
itself. However, the original code did not properly consider this condition
if returned by a target. This patch addresses the issues to allow a target
to compute the series on its own.
Differential revision: https://reviews.llvm.org/D22975
llvm-svn: 286523
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp index 5a871489acd..a4a5de126df 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp @@ -2978,10 +2978,11 @@ const char* AMDGPUTargetLowering::getTargetNodeName(unsigned Opcode) const { return nullptr; } -SDValue AMDGPUTargetLowering::getRsqrtEstimate(SDValue Operand, - SelectionDAG &DAG, int Enabled, - int &RefinementSteps, - bool &UseOneConstNR) const { +SDValue AMDGPUTargetLowering::getSqrtEstimate(SDValue Operand, + SelectionDAG &DAG, int Enabled, + int &RefinementSteps, + bool &UseOneConstNR, + bool Reciprocal) const { EVT VT = Operand.getValueType(); if (VT == MVT::f32) { |