Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-06 Thread Marek Olšák
On Fri, Oct 6, 2017 at 4:39 AM, Dave Airlie wrote: > On 6 October 2017 at 12:31, Marek Olšák wrote: >> On Fri, Oct 6, 2017 at 4:10 AM, Connor Abbott wrote: >>> On Thu, Oct 5, 2017 at 10:08 PM, Marek Olšák wrote: On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott wrote: > Why? While it migh

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-06 Thread Roland Scheidegger
Am 06.10.2017 um 11:29 schrieb Alex Smith: > On 6 October 2017 at 03:39, Dave Airlie > wrote: > > On 6 October 2017 at 12:31, Marek Olšák > wrote: > > On Fri, Oct 6, 2017 at 4:10 AM, Connor Abbott > wrote

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-06 Thread Alex Smith
On 6 October 2017 at 03:39, Dave Airlie wrote: > On 6 October 2017 at 12:31, Marek Olšák wrote: > > On Fri, Oct 6, 2017 at 4:10 AM, Connor Abbott > wrote: > >> On Thu, Oct 5, 2017 at 10:08 PM, Marek Olšák wrote: > >>> On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott > wrote: > Why? While it

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-05 Thread Jason Ekstrand
On Thu, Oct 5, 2017 at 7:39 PM, Dave Airlie wrote: > On 6 October 2017 at 12:31, Marek Olšák wrote: > > On Fri, Oct 6, 2017 at 4:10 AM, Connor Abbott > wrote: > >> On Thu, Oct 5, 2017 at 10:08 PM, Marek Olšák wrote: > >>> On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott > wrote: > Why? Whil

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-05 Thread Dave Airlie
On 6 October 2017 at 12:31, Marek Olšák wrote: > On Fri, Oct 6, 2017 at 4:10 AM, Connor Abbott wrote: >> On Thu, Oct 5, 2017 at 10:08 PM, Marek Olšák wrote: >>> On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott wrote: Why? While it might technically be legal, always generating an unfused

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-05 Thread Marek Olšák
On Fri, Oct 6, 2017 at 4:10 AM, Connor Abbott wrote: > On Thu, Oct 5, 2017 at 10:08 PM, Marek Olšák wrote: >> On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott wrote: >>> Why? While it might technically be legal, always generating an unfused >>> mul+add when the user explicitly requested fma() seems

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-05 Thread Connor Abbott
On Thu, Oct 5, 2017 at 10:08 PM, Marek Olšák wrote: > On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott wrote: >> Why? While it might technically be legal, always generating an unfused >> mul+add when the user explicitly requested fma() seems harsh... > > It's slow on some chips. It doesn't need any

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-05 Thread Marek Olšák
On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott wrote: > Why? While it might technically be legal, always generating an unfused > mul+add when the user explicitly requested fma() seems harsh... It's slow on some chips. It doesn't need any other reason. Marek ___

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-05 Thread Connor Abbott
Why? While it might technically be legal, always generating an unfused mul+add when the user explicitly requested fma() seems harsh... On Thu, Oct 5, 2017 at 9:32 PM, Marek Olšák wrote: > FYI, if we switch radeonsi to NIR, we are going to disable fma > completely, exact or not. > > Marek > > On W

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-05 Thread Marek Olšák
FYI, if we switch radeonsi to NIR, we are going to disable fma completely, exact or not. Marek On Wed, Oct 4, 2017 at 10:04 PM, Dave Airlie wrote: > From: Dave Airlie > > As pointed out by Connor we still need to use fma if nir wants > exact (precise) behaviour. > > Signed-off-by: Dave Airlie

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-04 Thread Connor Abbott
Reviewed-by: Connor Abbott On Wed, Oct 4, 2017 at 4:04 PM, Dave Airlie wrote: > From: Dave Airlie > > As pointed out by Connor we still need to use fma if nir wants > exact (precise) behaviour. > > Signed-off-by: Dave Airlie > --- > src/amd/common/ac_nir_to_llvm.c | 2 +- > 1 file changed, 1

[Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-04 Thread Dave Airlie
From: Dave Airlie As pointed out by Connor we still need to use fma if nir wants exact (precise) behaviour. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir