aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysdeps/ieee754/dbl-64/k_rem_pio2.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sysdeps/ieee754/dbl-64/k_rem_pio2.c b/sysdeps/ieee754/dbl-64/k_rem_pio2.c
index 6e2ef5d..f753925 100644
--- a/sysdeps/ieee754/dbl-64/k_rem_pio2.c
+++ b/sysdeps/ieee754/dbl-64/k_rem_pio2.c
@@ -300,6 +300,11 @@ recompute:
iq[jz] = (int32_t) z;
}
+ /* jz is always nonnegative here, because the result is never zero to
+ full precision (this function is not called for zero arguments).
+ Help the compiler to know it. */
+ if (jz < 0) __builtin_unreachable ();
+
/* convert integer "bit" chunk to floating-point value */
fw = __scalbn (one, q0);
for (i = jz; i >= 0; i--)
@@ -330,16 +335,7 @@ recompute:
for (i = jz; i >= 0; i--)
fv = math_narrow_eval (fv + fq[i]);
y[0] = (ih == 0) ? fv : -fv;
- /* GCC mainline (to be GCC 9), as of 2018-05-22 on i686, warns
- that fq[0] may be used uninitialized. This is not possible
- because jz is always nonnegative when the above loop
- initializing fq is executed, because the result is never zero
- to full precision (this function is not called for zero
- arguments). */
- DIAG_PUSH_NEEDS_COMMENT;
- DIAG_IGNORE_NEEDS_COMMENT (9, "-Wmaybe-uninitialized");
fv = math_narrow_eval (fq[0] - fv);
- DIAG_POP_NEEDS_COMMENT;
for (i = 1; i <= jz; i++)
fv = math_narrow_eval (fv + fq[i]);
y[1] = (ih == 0) ? fv : -fv;