[Mesa-dev] [PATCH 2/2] ac/nir: fix translation of nir_op_frsq for doubles
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Jan 11 09:16:37 UTC 2018
On 01/11/2018 07:06 AM, Timothy Arceri wrote:
> Without this we en up with the llvm error message:
typo: end up
Series is:
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>
> "Both operands to a binary operator are not of the same type!"
> ---
> src/amd/common/ac_nir_to_llvm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 8d759b30fb..f1472677e1 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -1842,7 +1842,8 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
> case nir_op_frsq:
> result = emit_intrin_1f_param(&ctx->ac, "llvm.sqrt",
> ac_to_float_type(&ctx->ac, def_type), src[0]);
> - result = ac_build_fdiv(&ctx->ac, ctx->ac.f32_1, result);
> + result = ac_build_fdiv(&ctx->ac, instr->dest.dest.ssa.bit_size == 32 ? ctx->ac.f32_1 : ctx->ac.f64_1,
> + result);
> break;
> case nir_op_fpow:
> result = emit_intrin_2f_param(&ctx->ac, "llvm.pow",
>
More information about the mesa-dev
mailing list