ir_to_mesa: Emit a MAD(b, -a, b) for !a && b
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 2 Aug 2011 19:17:20 +0000 (12:17 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 16 Aug 2011 21:09:44 +0000 (14:09 -0700)
commitff2cfb8989cd79218dfe2cd8c3de20f1ca7418e6
tree0add0901354dbf873b5ce400688bae7a51f809d4
parentba01df11c4d09c65514a8522cb319e29034ab5a8
ir_to_mesa: Emit a MAD(b, -a, b) for !a && b

!a && b occurs frequently when nexted if-statements have been
flattened.  It should also be possible use a MAD for (a && b) || c,
though that would require a MAD_SAT.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/program/ir_to_mesa.cpp