Re: [Mesa-dev] [PATCH 2/2] ac/nir: fix translation of nir_op_b2i for doubles

2018-01-18 Thread Marek Olšák
On Fri, Jan 12, 2018 at 4:42 PM, Bas Nieuwenhuizen wrote: > Maybe just zero-extend the 32-bit value? (or truncate for 16-bit?) I > don't know what generates better machinecode. It depends on what result type you want. ZExt and Trunc are essentially typecasts that change the bit size. LLVM passes

Re: [Mesa-dev] [PATCH 2/2] ac/nir: fix translation of nir_op_b2i for doubles

2018-01-12 Thread Bas Nieuwenhuizen
Maybe just zero-extend the 32-bit value? (or truncate for 16-bit?) I don't know what generates better machinecode. On Fri, Jan 12, 2018 at 2:34 AM, Timothy Arceri wrote: > --- > > Open to suggestions for better ways to do this. > > src/amd/common/ac_nir_to_llvm.c | 13 ++--- > 1 file ch

[Mesa-dev] [PATCH 2/2] ac/nir: fix translation of nir_op_b2i for doubles

2018-01-11 Thread Timothy Arceri
--- Open to suggestions for better ways to do this. src/amd/common/ac_nir_to_llvm.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index b0a8a94a2d..f013b4b387 100644 --- a/src/amd/common/ac_ni