Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed an unintialize mask problem in erfcinv #26

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions include/rvvlm_erfcinvD.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ void F_VER1(API) {
VFLOAT vx, vx_sign, vy, vy_special;
VBOOL special_args;

VFLOAT dummy;

SET_ROUNDTONEAREST;
// stripmining over input arguments
for (; _inarg_n > 0; _inarg_n -= vlen) {
Expand All @@ -85,8 +83,6 @@ void F_VER1(API) {
// Handle Inf and NaN
EXCEPTION_HANDLING_ERFCINV(vx, special_args, vy_special, vlen);

dummy = VFMV_VF(3.1415926535, vlen);

vx_sign = __riscv_vfrsub(vx, fp_posOne, vlen);
VFLOAT two_minus_x = __riscv_vfadd(vx_sign, fp_posOne, vlen);
VBOOL x_gt_1 = __riscv_vmflt(vx_sign, fp_posZero, vlen);
Expand All @@ -97,6 +93,7 @@ void F_VER1(API) {
VFLOAT w_hi, w_lo, w_hi_left, w_lo_left, y_hi, y_lo;
VINT T, T_left, T_tiny;
VBOOL x_is_tiny;
x_is_tiny = __riscv_vmxor(x_is_tiny, x_is_tiny, vlen);

if (__riscv_vcpop(x_in_left, vlen) > 0) {
VFLOAT x_left = VFMV_VF(0x1.0p-3, vlen);
Expand All @@ -112,8 +109,6 @@ void F_VER1(API) {
VFLOAT w_hi_dummy, w_lo_dummy;
SQRTX_4_TRANSFORM(y_hi, y_lo, w_hi_dummy, w_lo_dummy, T_tiny, 0x1.0p65,
0x1.0p-65, vlen);
dummy = __riscv_vfmul(__riscv_vfcvt_f(T_tiny, vlen), 0x1.0p-2, vlen);
dummy = __riscv_vfsub(dummy, __riscv_vfcvt_f(T_left, vlen), vlen);
}
}
w_hi = VFMV_VF(fp_posOne, vlen);
Expand Down Expand Up @@ -220,8 +215,6 @@ void F_VER1(API) {
vy = __riscv_vfsgnj(vy, vx_sign, vlen);
vy = __riscv_vmerge(vy, vy_special, special_args, vlen);

// vy = dummy;

// copy vy into y and increment addr pointers
VFSTORE_OUTARG1(vy, vlen);

Expand Down
Loading