[Mesa-dev] [PATCH] nir: fix alarming comment
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu May 31 10:57:04 UTC 2018
On Thu, May 31, 2018 at 11:57 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> safe -> precision safe
I'd argue this would be the wrong fix. I would consider issues with
infinity and NaN not to be precision issues, so saying precision safe
only muddles the water.
> ---
> src/compiler/nir/nir_opt_algebraic.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
> index 21b9acecbe2..aeb280ffb97 100644
> --- a/src/compiler/nir/nir_opt_algebraic.py
> +++ b/src/compiler/nir/nir_opt_algebraic.py
> @@ -704,8 +704,8 @@ before_ffma_optimizations = [
> # they help code generation but do not necessarily produce code that is
> # more easily optimizable.
> late_optimizations = [
> - # Most of these optimizations aren't quite safe when you get infinity or
> - # Nan involved but the first one should be fine.
> + # Most of these optimizations aren't quite precision safe when you get
> + # infinity or Nan involved but the first one should be fine.
> (('flt', ('fadd', a, b), 0.0), ('flt', a, ('fneg', b))),
> (('flt', ('fneg', ('fadd', a, b)), 0.0), ('flt', ('fneg', a), b)),
> (('~fge', ('fadd', a, b), 0.0), ('fge', a, ('fneg', b))),
> --
> 2.17.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list