i965/fs/nir: Optimize integer multiply by a 16-bit constant.
authorMatt Turner <mattst88@gmail.com>
Sun, 15 Feb 2015 22:03:09 +0000 (14:03 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 24 Feb 2015 22:08:04 +0000 (14:08 -0800)
commitb8582d18e6b0737c4a34777837c10898ed177e30
tree64d14ff55d3cace940c48542b45af744c4ca97e4
parent7a997a386375a98b70ae5e1d880c8d47f236de8d
i965/fs/nir: Optimize integer multiply by a 16-bit constant.

Gen8+ support was just broken, since MUL now consumes 32-bits from both
sources. Fixes 986 piglit tests on my BDW.

total instructions in shared programs: 7753873 -> 7753522 (-0.00%)
instructions in affected programs:     28164 -> 27813 (-1.25%)
helped:                                77
GAINED:                                47

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp