llvmpipe: (trivial) minimally simplify mask construction
authorRoland Scheidegger <sroland@vmware.com>
Wed, 21 Dec 2016 03:52:16 +0000 (04:52 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 5 Jan 2017 22:59:38 +0000 (23:59 +0100)
commitdb7e786a2552d808e512ba33fbc9b19d8bb37108
treedee13e7ebefbe6e98096a3a58a33c738267be9ef
parenta8eeb089c0e2e171ffaf8cba3cd0e5aea97b388f
llvmpipe: (trivial) minimally simplify mask construction

simd instruction sets usually have comparisons for equal, not unequal.
So use a different comparison against the mask itself - which also means
we don't need a all-zero as well as a all-one (for the pxor) reg.

Also add code to avoid scalar expansion of i1 values which we definitely
shouldn't do. There's problems with this though with llvm select
interaction, so it's disabled (basically using llvm select instead of
intrinsics may still produce atrocious code, even in cases where we
figured it should not, albeit I think this could probably be fixed
with some better selection of optimization passes, but I have zero
idea there really).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_logic.c
src/gallium/drivers/llvmpipe/lp_bld_depth.c
src/gallium/drivers/llvmpipe/lp_state_fs.c