summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-10-03 16:21:47 +0200
committerSamuel Pitoiset <[email protected]>2019-10-03 18:15:17 +0200
commitd861401554b52b2c2fc6721c69bdfe1697ee608f (patch)
tree5a1aee72e518a725465a4486641afb39e8ff540f /src
parent5ebe1a17e98692880cff84e941d2683705c83f80 (diff)
ac/nir: remove unused code for nir_op_{fmod,frem}
RADV and RadeonSI both lower these two NIR instructions. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index ea7bf91b79b..bb99c736f78 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -548,20 +548,6 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
case nir_op_umod:
result = LLVMBuildURem(ctx->ac.builder, src[0], src[1], "");
break;
- case nir_op_fmod:
- 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]);
- result = emit_intrin_1f_param(&ctx->ac, "llvm.floor",
- ac_to_float_type(&ctx->ac, def_type), result);
- result = LLVMBuildFMul(ctx->ac.builder, src[1] , result, "");
- result = LLVMBuildFSub(ctx->ac.builder, src[0], result, "");
- break;
- case nir_op_frem:
- src[0] = ac_to_float(&ctx->ac, src[0]);
- src[1] = ac_to_float(&ctx->ac, src[1]);
- result = LLVMBuildFRem(ctx->ac.builder, src[0], src[1], "");
- break;
case nir_op_irem:
result = LLVMBuildSRem(ctx->ac.builder, src[0], src[1], "");
break;