Re: [Mesa-dev] [PATCH] i965/fs: Drop no-op shifts by 0.

2013-10-25 Thread Eric Anholt
Erik Faye-Lund writes: > Why is this tagged as i965/fs, when everything seems to happen in the > glsl-optimizer? > > On Thu, Oct 24, 2013 at 5:53 PM, Eric Anholt wrote: >> I noticed this in a shader in Unigine Heaven that was spilling. While it >> doesn't really reduce register pressure, it sha

Re: [Mesa-dev] [PATCH] i965/fs: Drop no-op shifts by 0.

2013-10-24 Thread Matt Turner
On Thu, Oct 24, 2013 at 11:12 AM, Erik Faye-Lund wrote: > But wait a minute. x shifted by 0 is x, so the latter part looks > correct. But the first conditional seems to assume that 0 sifted by x > is x, but it's really 0, no? Shouldn't both cases return > ir->operands[0]? What am I missing? I thi

Re: [Mesa-dev] [PATCH] i965/fs: Drop no-op shifts by 0.

2013-10-24 Thread Erik Faye-Lund
Why is this tagged as i965/fs, when everything seems to happen in the glsl-optimizer? On Thu, Oct 24, 2013 at 5:53 PM, Eric Anholt wrote: > I noticed this in a shader in Unigine Heaven that was spilling. While it > doesn't really reduce register pressure, it shaves a few instructions > anyway (7

Re: [Mesa-dev] [PATCH] i965/fs: Drop no-op shifts by 0.

2013-10-24 Thread Matt Turner
On Thu, Oct 24, 2013 at 8:53 AM, Eric Anholt wrote: > I noticed this in a shader in Unigine Heaven that was spilling. While it > doesn't really reduce register pressure, it shaves a few instructions > anyway (7955 -> 7882). > --- > src/glsl/opt_algebraic.cpp | 8 > 1 file changed, 8 ins

[Mesa-dev] [PATCH] i965/fs: Drop no-op shifts by 0.

2013-10-24 Thread Eric Anholt
I noticed this in a shader in Unigine Heaven that was spilling. While it doesn't really reduce register pressure, it shaves a few instructions anyway (7955 -> 7882). --- src/glsl/opt_algebraic.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/op