Re: [Mesa-dev] [PATCH 8/9 v2] nir: Add partial redundancy elimination for compares

2018-09-04 Thread Ian Romanick
On 09/03/2018 03:17 AM, andrey simiklit wrote: > Hi, > > I guess it is just a small mistake in description that: > 'z' was before: >    z = y - x; > and became after: >    z = x - y; > > I think you inadvertently misspelled in the description and you mean: > > > This pass attempts to dectec

Re: [Mesa-dev] [PATCH 8/9 v2] nir: Add partial redundancy elimination for compares

2018-09-03 Thread andrey simiklit
Hi, I guess it is just a small mistake in description that: 'z' was before: z = y - x; and became after: z = x - y; I think you inadvertently misspelled in the description and you mean: > > This pass attempts to dectect code sequences like > > if (x < y) { > z = y - x; >

[Mesa-dev] [PATCH 8/9 v2] nir: Add partial redundancy elimination for compares

2018-08-29 Thread Ian Romanick
From: Ian Romanick This pass attempts to dectect code sequences like if (x < y) { z = y - x; ... } 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