gallivm: make sure we return the correct type when approximating log's

This commit is contained in:
Zack Rusin 2010-04-22 13:00:48 -04:00
parent 8bee4c7718
commit 63aa9b505a

View file

@ -1502,8 +1502,10 @@ lp_build_log2_approx(struct lp_build_context *bld,
res = LLVMBuildAdd(bld->builder, logmant, logexp, "");
}
if(p_exp)
if(p_exp) {
exp = LLVMConstBitCast(exp, vec_type);
*p_exp = exp;
}
if(p_floor_log2)
*p_floor_log2 = logexp;