From dbf3dc75888623e9d4bb7cc5e9c30caa9b24ffe7 Mon Sep 17 00:00:00 2001 From: Bu Le Date: Thu, 12 Mar 2020 22:39:12 +0000 Subject: aarch64: Add --params to control the number of recip steps [PR94154] -mlow-precision-div hard-coded the number of iterations to 2 for double and 1 for float. This patch adds a --param to control the number. 2020-03-13 Bu Le gcc/ PR target/94154 * config/aarch64/aarch64.opt (-param=aarch64-float-recp-precision=) (-param=aarch64-double-recp-precision=): New options. * doc/invoke.texi: Document them. * config/aarch64/aarch64.c (aarch64_emit_approx_div): Use them instead of hard-coding the choice of 1 for float and 2 for double. --- gcc/doc/invoke.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index af28015..96a9516 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -13179,6 +13179,17 @@ Also use the cost model to choose between SVE and Advanced SIMD vectorization. Using unpacked vectors includes storing smaller elements in larger containers and accessing elements with extending loads and truncating stores. + +@item aarch64-float-recp-precision +The number of Newton iterations for calculating the reciprocal for float type. +The precision of division is proportional to this param when division +approximation is enabled. The default value is 1. + +@item aarch64-double-recp-precision +The number of Newton iterations for calculating the reciprocal for double type. +The precision of division is propotional to this param when division +approximation is enabled. The default value is 2. + @end table @end table -- cgit v1.1