From: Dave Airlie Date: Mon, 30 Jan 2017 18:50:30 +0000 (+1000) Subject: radv/ac: handle nir irem opcode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ecc3fa3ba3967624f67abe8d8188102a08c20d7c;p=mesa.git radv/ac: handle nir irem opcode. This fixes: dEQP-VK.spirv_assembly.instruction.compute.opsrem.* Reviewed-by: Andres Rodriguez Cc: "17.0" --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index b90148ee8aa..bfe6a2e725d 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -1273,6 +1273,9 @@ static void visit_alu(struct nir_to_llvm_context *ctx, nir_alu_instr *instr) src[1] = to_float(ctx, src[1]); result = LLVMBuildFRem(ctx->builder, src[0], src[1], ""); break; + case nir_op_irem: + result = LLVMBuildSRem(ctx->builder, src[0], src[1], ""); + break; case nir_op_idiv: result = LLVMBuildSDiv(ctx->builder, src[0], src[1], ""); break;