Re: [Mesa-dev] [PATCH v2 1/2] nv50/ir: optimize signed integer modulo by pow-of-2

2017-11-12 Thread Tobias Klausmann
On 11/12/17 4:16 PM, Ilia Mirkin wrote: On Sun, Nov 12, 2017 at 9:09 AM, Tobias Klausmann wrote: On 11/12/17 3:53 AM, Ilia Mirkin wrote: It's common to use signed int modulo in GLSL. As it happens, the GLSL specs allow the result to be undefined, but that seems fairly surprising. It's not tha

Re: [Mesa-dev] [PATCH v2 1/2] nv50/ir: optimize signed integer modulo by pow-of-2

2017-11-12 Thread Ilia Mirkin
On Sun, Nov 12, 2017 at 9:09 AM, Tobias Klausmann wrote: > > On 11/12/17 3:53 AM, Ilia Mirkin wrote: >> >> It's common to use signed int modulo in GLSL. As it happens, the GLSL >> specs allow the result to be undefined, but that seems fairly >> surprising. It's not that much more effort to get it

Re: [Mesa-dev] [PATCH v2 1/2] nv50/ir: optimize signed integer modulo by pow-of-2

2017-11-12 Thread Tobias Klausmann
On 11/12/17 3:53 AM, Ilia Mirkin wrote: It's common to use signed int modulo in GLSL. As it happens, the GLSL specs allow the result to be undefined, but that seems fairly surprising. It's not that much more effort to get it right, at least for positive modulo operators. Signed-off-by: Ilia Mir

[Mesa-dev] [PATCH v2 1/2] nv50/ir: optimize signed integer modulo by pow-of-2

2017-11-11 Thread Ilia Mirkin
It's common to use signed int modulo in GLSL. As it happens, the GLSL specs allow the result to be undefined, but that seems fairly surprising. It's not that much more effort to get it right, at least for positive modulo operators. Signed-off-by: Ilia Mirkin --- v1 -> v2: - fix SHLADD folding