From f89b1f4ba4c7b13458532d916677aea3a66647dd Mon Sep 17 00:00:00 2001 From: James Benton Date: Fri, 18 May 2012 16:01:25 +0100 Subject: [PATCH] gallivm: Fixed overflow in lp_build_clamped_float_to_unsigned_norm. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Tested with lp_test_conv and lp_test_format, reduced errors. Signed-off-by: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c index 8a086631249..f0ef5167351 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c @@ -190,7 +190,7 @@ lp_build_clamped_float_to_unsigned_norm(struct gallivm_state *gallivm, /* * Align the most significant bit to the right. */ - rshifted = LLVMBuildAShr(builder, res, + rshifted = LLVMBuildLShr(builder, res, lp_build_const_int_vec(gallivm, src_type, rshift), ""); -- 2.30.2