ac/nir: remove emission of nir_op_fdiv
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 5 Feb 2018 20:37:05 +0000 (21:37 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 5 Feb 2018 22:09:34 +0000 (23:09 +0100)
RadeonSI and RADV lower fdiv.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index fb29b6c46f0f8f66d70fc83f84ce1033ed14d4c2..67da79b975d062aa24da82626cef91fb6762c691 100644 (file)
@@ -1744,11 +1744,6 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
                src[1] = ac_to_float(&ctx->ac, src[1]);
                result = LLVMBuildFMul(ctx->ac.builder, src[0], src[1], "");
                break;
-       case nir_op_fdiv:
-               src[0] = ac_to_float(&ctx->ac, src[0]);
-               src[1] = ac_to_float(&ctx->ac, src[1]);
-               result = ac_build_fdiv(&ctx->ac, src[0], src[1]);
-               break;
        case nir_op_frcp:
                src[0] = ac_to_float(&ctx->ac, src[0]);
                result = ac_build_fdiv(&ctx->ac, instr->dest.dest.ssa.bit_size == 32 ? ctx->ac.f32_1 : ctx->ac.f64_1,