Re: [Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-22 Thread Jason Ekstrand
On Feb 12, 2015 1:28 AM, "Kenneth Graunke" wrote: > > On Wednesday, February 11, 2015 04:14:20 PM Ian Romanick wrote: > > On 02/11/2015 04:05 PM, Matt Turner wrote: > > > On Wed, Feb 11, 2015 at 3:51 PM, Ian Romanick wrote: > > >> On 02/11/2015 02:54 PM, Matt Turner wrote: > > >>> We propagate ne

Re: [Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-22 Thread Ben Widawsky
On Wed, Feb 11, 2015 at 04:05:57PM -0800, Matt Turner wrote: > On Wed, Feb 11, 2015 at 3:51 PM, Ian Romanick wrote: > > On 02/11/2015 02:54 PM, Matt Turner wrote: > >> We propagate negations to the right-most leaves of the multiplication > >> expression trees: > >> > >> - mul(neg(x), neg(y)) -> m

Re: [Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-12 Thread Kenneth Graunke
On Wednesday, February 11, 2015 04:14:20 PM Ian Romanick wrote: > On 02/11/2015 04:05 PM, Matt Turner wrote: > > On Wed, Feb 11, 2015 at 3:51 PM, Ian Romanick wrote: > >> On 02/11/2015 02:54 PM, Matt Turner wrote: > >>> We propagate negations to the right-most leaves of the multiplication > >>> ex

Re: [Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-11 Thread Ian Romanick
On 02/11/2015 04:05 PM, Matt Turner wrote: > On Wed, Feb 11, 2015 at 3:51 PM, Ian Romanick wrote: >> On 02/11/2015 02:54 PM, Matt Turner wrote: >>> We propagate negations to the right-most leaves of the multiplication >>> expression trees: >>> >>> - mul(neg(x), neg(y)) -> mul(x, y) >>> - mul(neg

Re: [Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-11 Thread Matt Turner
On Wed, Feb 11, 2015 at 3:51 PM, Ian Romanick wrote: > On 02/11/2015 02:54 PM, Matt Turner wrote: >> We propagate negations to the right-most leaves of the multiplication >> expression trees: >> >> - mul(neg(x), neg(y)) -> mul(x, y) >> - mul(neg(x), y) -> neg(mul(x, y)) >> - mul(x, neg(y)) -> n

Re: [Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-11 Thread Ian Romanick
On 02/11/2015 02:54 PM, Matt Turner wrote: > We propagate negations to the right-most leaves of the multiplication > expression trees: > > - mul(neg(x), neg(y)) -> mul(x, y) > - mul(neg(x), y) -> neg(mul(x, y)) > - mul(x, neg(y)) -> neg(mul(x, y)) > > total instructions in shared programs: 594

[Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-11 Thread Matt Turner
We propagate negations to the right-most leaves of the multiplication expression trees: - mul(neg(x), neg(y)) -> mul(x, y) - mul(neg(x), y) -> neg(mul(x, y)) - mul(x, neg(y)) -> neg(mul(x, y)) total instructions in shared programs: 5943123 -> 5937229 (-0.10%) instructions in affected programs: