Re: [Mesa-dev] [PATCH 11/12] nir: Add partial redundancy elimination for compares

2018-07-02 Thread Ian Romanick
On 06/28/2018 05:19 PM, Caio Marcelo de Oliveira Filho wrote: > Hi, > > On Wed, Jun 27, 2018 at 09:46:24PM -0700, Ian Romanick wrote: >> From: Ian Romanick >> >> This pass attempts to dectect code sequences like >> >> if (x < y) { >> z = y - z; > > Typo "z = x - y". > > >> Current

Re: [Mesa-dev] [PATCH 11/12] nir: Add partial redundancy elimination for compares

2018-06-28 Thread Caio Marcelo de Oliveira Filho
Hi, On Wed, Jun 27, 2018 at 09:46:24PM -0700, Ian Romanick wrote: > From: Ian Romanick > > This pass attempts to dectect code sequences like > > if (x < y) { > z = y - z; Typo "z = x - y". > Currently only floating point compares and adds are supported. Adding > support for int

[Mesa-dev] [PATCH 11/12] nir: Add partial redundancy elimination for compares

2018-06-27 Thread Ian Romanick
From: Ian Romanick This pass attempts to dectect code sequences like if (x < y) { z = y - z; ... } and replace them with sequences like t = x - y; if (t < 0) { z = t; ... } On architectures where the subtract can generate the flags used by t