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

Kenneth Graunke kenneth at whitecape.org
Fri Sep 9 15:21:14 PDT 2011


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. :)

Assuming you apply my fixup and add the missing progress = true,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list