i965/vec4: Let dead code eliminate trim dead channels.
authorMatt Turner <mattst88@gmail.com>
Tue, 11 Mar 2014 20:14:08 +0000 (13:14 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 24 Mar 2014 18:06:26 +0000 (11:06 -0700)
commit9630ba6c6e754b438cf67c7d76ec1c99488df3ba
tree9a2f42ada5bfad10dea963c546ab1f1374e12db1
parentdc0f5099fa3cb564c25eb892fde93cacd29df8f1
i965/vec4: Let dead code eliminate trim dead channels.

That is, modify

   mad dst, a, b, c

to be

   mad dst.xyz, a, b, c

if dst.w is never read.

total instructions in shared programs: 811869 -> 805582 (-0.77%)
instructions in affected programs:     168287 -> 162000 (-3.74%)

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_vec4.cpp