gallivm: Always use floating-point operators for floating-point types
authornobled <nobled@dreamwidth.org>
Sun, 8 Aug 2010 19:44:54 +0000 (19:44 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 9 Aug 2010 16:31:18 +0000 (17:31 +0100)
commitfc9a49b638c26801951c33a570178bbb2b67ec60
tree3f9a08b0d0b4d33f4a45a99cad17ea62bb135f18
parent65b9747a54490dd56cd5cee4c2c1b9f51d35f133
gallivm: Always use floating-point operators for floating-point types

This fixes the assert added in LLVM 2.8:
assert(getType()->isIntOrIntVectorTy() &&
       "Tried to create an integer operation on a non-integer type!")

But it also fixes some subtle bugs, since we should've been doing this
since LLVM 2.6 anyway.

Includes a modified patch from steckdenis@yahoo.fr for the
FNeg instructions in emit_fetch(); thanks for pointing those out.

http://bugs.freedesktop.org/29404
http://bugs.freedesktop.org/29407

Signed-off-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_arit.c
src/gallium/auxiliary/gallivm/lp_bld_conv.c
src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
src/gallium/auxiliary/gallivm/lp_bld_quad.c
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c