From: Marek Olšák Date: Sun, 3 May 2020 23:30:31 +0000 (-0400) Subject: ac/nir: handle nir_op_[fiu]2[fiu]mp opcodes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d80015eaf4fa34e51eab927d91ef49135a8bd82;p=mesa.git ac/nir: handle nir_op_[fiu]2[fiu]mp opcodes Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 24be5ca866e..d47624a07e1 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -954,6 +954,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) case nir_op_f2f16: case nir_op_f2f32: case nir_op_f2f64: + case nir_op_f2fmp: src[0] = ac_to_float(&ctx->ac, src[0]); if (ac_get_elem_bits(&ctx->ac, LLVMTypeOf(src[0])) < ac_get_elem_bits(&ctx->ac, def_type)) result = LLVMBuildFPExt(ctx->ac.builder, src[0], ac_to_float_type(&ctx->ac, def_type), ""); @@ -962,6 +963,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) break; case nir_op_u2u8: case nir_op_u2u16: + case nir_op_u2ump: case nir_op_u2u32: case nir_op_u2u64: if (ac_get_elem_bits(&ctx->ac, LLVMTypeOf(src[0])) < ac_get_elem_bits(&ctx->ac, def_type)) @@ -971,6 +973,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) break; case nir_op_i2i8: case nir_op_i2i16: + case nir_op_i2imp: case nir_op_i2i32: case nir_op_i2i64: if (ac_get_elem_bits(&ctx->ac, LLVMTypeOf(src[0])) < ac_get_elem_bits(&ctx->ac, def_type))