OSDN Git Service

gallivm: fix signed small float to float conversion
authorRoland Scheidegger <sroland@vmware.com>
Tue, 2 Apr 2013 11:20:24 +0000 (13:20 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 2 Apr 2013 11:21:07 +0000 (13:21 +0200)
Introduced by 5f41e08cf39d585d600aa506cdcd2f5380c60ddd,
just a silly typo.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=62921.

src/gallium/auxiliary/gallivm/lp_bld_format_float.c

index 352068a..f899d6d 100644 (file)
@@ -266,7 +266,7 @@ lp_build_smallfloat_to_float(struct gallivm_state *gallivm,
       LLVMValueRef signmask = lp_build_const_int_vec(gallivm, i32_type, 0x80000000);
       shift = lp_build_const_int_vec(gallivm, i32_type, 8 - exponent_bits);
       sign = lp_build_shl(&i32_bld, src, shift);
-      sign = lp_build_and(&i32_bld, signmask, src);
+      sign = lp_build_and(&i32_bld, signmask, sign);
       res = lp_build_or(&i32_bld, res, sign);
    }