result = ac_build_imax(&ctx->ac, src[0], src[1]);
break;
case nir_op_imin:
- result = emit_minmax_int(&ctx->ac, LLVMIntSLT, src[0], src[1]);
+ result = ac_build_imin(&ctx->ac, src[0], src[1]);
break;
case nir_op_umax:
result = emit_minmax_int(&ctx->ac, LLVMIntUGT, src[0], src[1]);
result = emit_minmax_int(&ctx->ac, LLVMIntULT, result, src[2]);
break;
case nir_op_imin3:
- result = emit_minmax_int(&ctx->ac, LLVMIntSLT, src[0], src[1]);
- result = emit_minmax_int(&ctx->ac, LLVMIntSLT, result, src[2]);
+ result = ac_build_imin(&ctx->ac, src[0], src[1]);
+ result = ac_build_imin(&ctx->ac, result, src[2]);
break;
case nir_op_fmax3:
result = emit_intrin_2f_param(&ctx->ac, "llvm.maxnum",
break;
}
case nir_op_imed3: {
- LLVMValueRef tmp1 = emit_minmax_int(&ctx->ac, LLVMIntSLT, src[0], src[1]);
+ LLVMValueRef tmp1 = ac_build_imin(&ctx->ac, src[0], src[1]);
LLVMValueRef tmp2 = ac_build_imax(&ctx->ac, src[0], src[1]);
- tmp2 = emit_minmax_int(&ctx->ac, LLVMIntSLT, tmp2, src[2]);
+ tmp2 = ac_build_imin(&ctx->ac, tmp2, src[2]);
result = ac_build_imax(&ctx->ac, tmp1, tmp2);
break;
}