gallivm: Fixed overflow in lp_build_clamped_float_to_unsigned_norm.

Tested with lp_test_conv and lp_test_format, reduced errors.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
James Benton 2012-05-18 16:01:25 +01:00 committed by José Fonseca
parent c286278481
commit f89b1f4ba4
1 changed files with 1 additions and 1 deletions

View File

@ -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),
"");