[Mesa-dev] [PATCH 01/10] i965/vs: Add support for simple algebraic optimizations.

Eric Anholt eric at anholt.net
Fri Sep 9 17:08:53 PDT 2011


On Fri, 09 Sep 2011 15:21:14 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 09/08/2011 11:32 PM, Eric Anholt wrote:
> > + * Does algebraic optimizations (0 * a = 0, 1 * a = a, a + 0 = a).
> 
> I was going to ask "what about commutativity?"...after all, 0 * a but a
> + 0 seems kind of arbitrary...but then I implemented it and tried it on
> shader-db:
> 
> Total instructions: 39967 -> 39967
> 0/137 programs affected (0.0%)
> 
> So, apparently not worth it. :)

Immediates can only appear as the last operand of an instruction.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110909/1b5c4759/attachment.pgp>


More information about the mesa-dev mailing list