summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_build.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-12-12 18:10:20 +0100
committerSamuel Pitoiset <[email protected]>2017-12-14 22:24:38 +0100
commitd43e72fd8cb7cde6fa4aa4331539faa34100e68d (patch)
treeb0e800afe3cc4251de2c8e683059f39a8a08b76b /src/amd/common/ac_llvm_build.c
parent88522e2bcd0e65ca619204f0eec96864323b94cb (diff)
radeonsi: make use of ac_build_fdiv()
And move the comment to amd/common. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.c')
-rw-r--r--src/amd/common/ac_llvm_build.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index b2bf1bf7b51..baa921d6559 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -439,6 +439,7 @@ ac_build_fdiv(struct ac_llvm_context *ctx,
{
LLVMValueRef ret = LLVMBuildFDiv(ctx->builder, num, den, "");
+ /* Use v_rcp_f32 instead of precise division. */
if (!LLVMIsConstant(ret))
LLVMSetMetadata(ret, ctx->fpmath_md_kind, ctx->fpmath_md_2p5_ulp);
return ret;