gallivm: bring back optimized but incorrect float to smallfloat optimizations
authorRoland Scheidegger <sroland@vmware.com>
Tue, 2 Apr 2013 15:47:30 +0000 (17:47 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 2 Apr 2013 16:24:31 +0000 (18:24 +0200)
commit450950c57ac53d80a1c57f8ef5eb365db300fec2
tree08f8bc028697c8fcb5e8224db9ae7fc90b288374
parent3febc4a1cdcfc3151195300e3f4ab10e8d46bedf
gallivm: bring back optimized but incorrect float to smallfloat optimizations

Conceptually the same as previously done in float_to_half.
Should cut down number of instructions from 14 to 10 or so, but
will promote some NaNs to Infs, so it's disabled.
It gets a bit tricky though handling all the cases correctly...
Passes basic tests either way (though there are no tests testing special
cases, but some manual tests injecting them seemed promising).

v2: style and comment fixes suggested by Jose

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_format_float.c