Re: [Mesa-dev] [PATCH] nir: Optimize useless comparisons against true/false.

2015-12-08 Thread Matt Turner
On Fri, Dec 4, 2015 at 10:51 AM, Neil Roberts wrote: > Matt Turner writes: > >> # Written in the form (, ) where is an expression >> # and is either an expression or a value. An expression is >> # defined as a tuple of the form (, , , , ) >> @@ -94,6 +97,8 @@ optimizations = [ >> (('ino

Re: [Mesa-dev] [PATCH] nir: Optimize useless comparisons against true/false.

2015-12-04 Thread Neil Roberts
Matt Turner writes: > # Written in the form (, ) where is an expression > # and is either an expression or a value. An expression is > # defined as a tuple of the form (, , , , ) > @@ -94,6 +97,8 @@ optimizations = [ > (('inot', ('ige', a, b)), ('ilt', a, b)), > (('inot', ('ieq', a,

Re: [Mesa-dev] [PATCH] nir: Optimize useless comparisons against true/false.

2015-12-03 Thread Eric Anholt
Matt Turner writes: > --- > I add the true/false variables for clarity since there are some existing > optimizations using ~0 where it actually has nothing to do with true. > > I could take it or leave it. We obviously can't use them for feq and > friends. Maybe itrue/ifalse and ftrue/ffalse? No

Re: [Mesa-dev] [PATCH] nir: Optimize useless comparisons against true/false.

2015-12-02 Thread Matt Turner
On Wed, Dec 2, 2015 at 1:34 PM, Jason Ekstrand wrote: > On Tue, Dec 1, 2015 at 4:16 PM, Matt Turner wrote: >> --- >> I add the true/false variables for clarity since there are some existing >> optimizations using ~0 where it actually has nothing to do with true. >> >> I could take it or leave it.

Re: [Mesa-dev] [PATCH] nir: Optimize useless comparisons against true/false.

2015-12-02 Thread Jason Ekstrand
On Tue, Dec 1, 2015 at 4:16 PM, Matt Turner wrote: > --- > I add the true/false variables for clarity since there are some existing > optimizations using ~0 where it actually has nothing to do with true. > > I could take it or leave it. We obviously can't use them for feq and > friends. Maybe itru

[Mesa-dev] [PATCH] nir: Optimize useless comparisons against true/false.

2015-12-01 Thread Matt Turner
--- I add the true/false variables for clarity since there are some existing optimizations using ~0 where it actually has nothing to do with true. I could take it or leave it. We obviously can't use them for feq and friends. Maybe itrue/ifalse and ftrue/ffalse? src/glsl/nir/nir_opt_algebraic.py