diff options
author | Samuel Pitoiset <[email protected]> | 2019-04-10 17:16:48 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-04-12 17:30:54 +0200 |
commit | cf88bfa75a1b1c80f6ac3bcd9ae40fa5348e6619 (patch) | |
tree | 55c9e4be8195b2faa9897631b67ee9f5f5162c47 /src | |
parent | 15dd81913f2d50b327006f0777994e839259c98c (diff) |
ac/nir: make use of ac_build_umin() where possible
This changes the predicate from LessThan to Equal.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index f074a12c31b..5995e001330 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -757,7 +757,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) result = emit_minmax_int(&ctx->ac, LLVMIntUGT, src[0], src[1]); break; case nir_op_umin: - result = emit_minmax_int(&ctx->ac, LLVMIntULT, src[0], src[1]); + result = ac_build_umin(&ctx->ac, src[0], src[1]); break; case nir_op_isign: result = ac_build_isign(&ctx->ac, src[0], @@ -1105,8 +1105,8 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) ac_to_float_type(&ctx->ac, def_type), result, src[2]); break; case nir_op_umin3: - result = emit_minmax_int(&ctx->ac, LLVMIntULT, src[0], src[1]); - result = emit_minmax_int(&ctx->ac, LLVMIntULT, result, src[2]); + result = ac_build_umin(&ctx->ac, src[0], src[1]); + result = ac_build_umin(&ctx->ac, result, src[2]); break; case nir_op_imin3: result = ac_build_imin(&ctx->ac, src[0], src[1]); @@ -1142,9 +1142,9 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) break; } case nir_op_umed3: { - LLVMValueRef tmp1 = emit_minmax_int(&ctx->ac, LLVMIntULT, src[0], src[1]); + LLVMValueRef tmp1 = ac_build_umin(&ctx->ac, src[0], src[1]); LLVMValueRef tmp2 = emit_minmax_int(&ctx->ac, LLVMIntUGT, src[0], src[1]); - tmp2 = emit_minmax_int(&ctx->ac, LLVMIntULT, tmp2, src[2]); + tmp2 = ac_build_umin(&ctx->ac, tmp2, src[2]); result = emit_minmax_int(&ctx->ac, LLVMIntUGT, tmp1, tmp2); break; } |