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;