nir: Recognize imul(b2i(a), b2i(b)) as a logical AND.
authorMatt Turner <mattst88@gmail.com>
Wed, 6 May 2015 02:50:58 +0000 (19:50 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 7 May 2015 17:51:05 +0000 (10:51 -0700)
commit74697e2844a0850ef6b91fb4d34bfa3f6f4bff32
treebca64de33d03477277d3149b4a0a4f3ea1668b00
parentc636284ee8ee95bb3f3ad31aaf26a9512ec5006c
nir: Recognize imul(b2i(a), b2i(b)) as a logical AND.

Four shaders in Unreal 4's Sun Temple are helped, and gain SIMD16
because we avoid an integer multiplication.

instructions in affected programs:     2353 -> 2245 (-4.59%)
helped:                                4
GAINED:                                4

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
src/glsl/nir/nir_opt_algebraic.py