Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Changes required for new merge from upstream:
Browse files Browse the repository at this point in the history
  - Fix warnings related to -Wbitwise-conditional-parentheses

Change-Id: I665f316701b9750d595bd4c674fda94497635b22
  • Loading branch information
kzhuravl committed Oct 22, 2019
1 parent a8dfd60 commit b9c3a27
Show file tree
Hide file tree
Showing 24 changed files with 220 additions and 222 deletions.
2 changes: 1 addition & 1 deletion ockl/src/toas.cl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ __attribute__((const)) __global void *
OCKL_MANGLE_T(to,global)(void *a)
{
__global void *ga = (__global void *)((ulong)a);
return OCKL_MANGLE_T(is_local,addr)(a) | OCKL_MANGLE_T(is_private,addr)(a) ? (__global void *)0UL : ga;
return (OCKL_MANGLE_T(is_local,addr)(a) | OCKL_MANGLE_T(is_private,addr)(a)) ? (__global void *)0UL : ga;
}

__attribute__((const)) __local void *
Expand Down
4 changes: 2 additions & 2 deletions ocml/src/atan2D.cl
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ MATH_MANGLE(atan2)(double y, double x)
if (!FINITE_ONLY_OPT()) {
t = xneg ? threepiby4 : piby4;
t = BUILTIN_COPYSIGN_F64(t, y);
a = BUILTIN_ISINF_F64(x) & BUILTIN_ISINF_F64(y) ? t : a;
a = (BUILTIN_ISINF_F64(x) & BUILTIN_ISINF_F64(y)) ? t : a;

a = BUILTIN_ISNAN_F64(x) | BUILTIN_ISNAN_F64(y) ?
a = (BUILTIN_ISNAN_F64(x) | BUILTIN_ISNAN_F64(y)) ?
AS_DOUBLE(QNANBITPATT_DP64) : a;
}

Expand Down
4 changes: 2 additions & 2 deletions ocml/src/atan2F.cl
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ MATH_MANGLE(atan2)(float y, float x)
if (!FINITE_ONLY_OPT()) {
// x and y are +- Inf
t = x < 0.0f ? threepiby4 : piby4;
a = BUILTIN_ISINF_F32(x) & BUILTIN_ISINF_F32(y) ? t : a;
a = (BUILTIN_ISINF_F32(x) & BUILTIN_ISINF_F32(y)) ? t : a;

// x or y is NaN
a = BUILTIN_ISNAN_F32(x) | BUILTIN_ISNAN_F32(y) ?
a = (BUILTIN_ISNAN_F32(x) | BUILTIN_ISNAN_F32(y)) ?
AS_FLOAT(QNANBITPATT_SP32) : a;
}

Expand Down
4 changes: 2 additions & 2 deletions ocml/src/atan2H.cl
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ MATH_MANGLE(atan2)(half y, half x)
if (!FINITE_ONLY_OPT()) {
// x and y are +- Inf
t = x < 0.0h ? threepiby4 : piby4;
a = BUILTIN_ISINF_F16(x) & BUILTIN_ISINF_F16(y) ? t : a;
a = (BUILTIN_ISINF_F16(x) & BUILTIN_ISINF_F16(y)) ? t : a;

// x or y is NaN
a = BUILTIN_ISNAN_F16(x) | BUILTIN_ISNAN_F16(y) ?
a = (BUILTIN_ISNAN_F16(x) | BUILTIN_ISNAN_F16(y)) ?
AS_HALF((short)QNANBITPATT_HP16) : a;
}

Expand Down
4 changes: 2 additions & 2 deletions ocml/src/atan2piD.cl
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ MATH_MANGLE(atan2pi)(double y, double x)
if (!FINITE_ONLY_OPT()) {
t = xneg ? 0.75 : 0.25;
t = BUILTIN_COPYSIGN_F64(t, y);
a = BUILTIN_ISINF_F64(x) & BUILTIN_ISINF_F64(y) ? t : a;
a = (BUILTIN_ISINF_F64(x) & BUILTIN_ISINF_F64(y)) ? t : a;

a = BUILTIN_ISNAN_F64(x) | BUILTIN_ISNAN_F64(y) ?
a = (BUILTIN_ISNAN_F64(x) | BUILTIN_ISNAN_F64(y)) ?
AS_DOUBLE(QNANBITPATT_DP64) : a;
}

Expand Down
4 changes: 2 additions & 2 deletions ocml/src/atan2piF.cl
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ MATH_MANGLE(atan2pi)(float y, float x)
if (!FINITE_ONLY_OPT()) {
// x and y are +- Inf
at = x < 0.0f ? 0.75f : 0.25f;
a = BUILTIN_ISINF_F32(x) & BUILTIN_ISINF_F32(y) ? at : a;
a = (BUILTIN_ISINF_F32(x) & BUILTIN_ISINF_F32(y)) ? at : a;

// x or y is NaN
a = BUILTIN_ISNAN_F32(x) | BUILTIN_ISNAN_F32(y) ?
a = (BUILTIN_ISNAN_F32(x) | BUILTIN_ISNAN_F32(y)) ?
AS_FLOAT(QNANBITPATT_SP32) : a;
}

Expand Down
5 changes: 2 additions & 3 deletions ocml/src/atan2piH.cl
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ MATH_MANGLE(atan2pi)(half y, half x)
if (!FINITE_ONLY_OPT()) {
// x and y are +- Inf
at = x < 0.0h ? 0.75h : 0.25h;
a = BUILTIN_ISINF_F16(x) &
BUILTIN_ISINF_F16(y) ?
a = (BUILTIN_ISINF_F16(x) & BUILTIN_ISINF_F16(y)) ?
at : a;

// x or y is NaN
a = BUILTIN_ISNAN_F16(x) | BUILTIN_ISNAN_F16(y) ?
a = (BUILTIN_ISNAN_F16(x) | BUILTIN_ISNAN_F16(y)) ?
AS_HALF((short)QNANBITPATT_HP16) : a;
}

Expand Down
2 changes: 1 addition & 1 deletion ocml/src/erfcinvD.cl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ MATH_MANGLE(erfcinv)(double y)
}

if (!FINITE_ONLY_OPT()) {
ret = (y < 0.0) | (y > 2.0) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = ((y < 0.0) | (y > 2.0)) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = y == 0.0 ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = y == 2.0 ? AS_DOUBLE(NINFBITPATT_DP64) : ret;
}
Expand Down
2 changes: 1 addition & 1 deletion ocml/src/erfcinvF.cl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MATH_MANGLE(erfcinv)(float y)
}

if (!FINITE_ONLY_OPT()) {
ret = (y < 0.0f) | (y > 2.0f) ? AS_FLOAT(QNANBITPATT_SP32) : ret;
ret = ((y < 0.0f) | (y > 2.0f)) ? AS_FLOAT(QNANBITPATT_SP32) : ret;
ret = y == 0.0f ? AS_FLOAT(PINFBITPATT_SP32) : ret;
ret = y == 2.0f ? AS_FLOAT(NINFBITPATT_SP32) : ret;
}
Expand Down
8 changes: 4 additions & 4 deletions ocml/src/hypotD.cl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ MATH_MANGLE(hypot)(double x, double y)
double ret = BUILTIN_FLDEXP_F64(MATH_FAST_SQRT(MATH_MAD(a, a, b*b)), e);

if (!FINITE_ONLY_OPT()) {
ret = BUILTIN_ISNAN_F64(x) |
BUILTIN_ISNAN_F64(y) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = (BUILTIN_ISNAN_F64(x) | BUILTIN_ISNAN_F64(y)) ?
AS_DOUBLE(QNANBITPATT_DP64) : ret;

ret = BUILTIN_ISINF_F64(x) |
BUILTIN_ISINF_F64(y) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (BUILTIN_ISINF_F64(x) | BUILTIN_ISINF_F64(y)) ?
AS_DOUBLE(PINFBITPATT_DP64) : ret;
}

return ret;
Expand Down
2 changes: 1 addition & 1 deletion ocml/src/hypotH.cl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ MATH_MANGLE(hypot)(half x, half y)
half ret = (half)BUILTIN_SQRT_F32(d2);

if (!FINITE_ONLY_OPT()) {
ret = BUILTIN_ISINF_F16(x) | BUILTIN_ISINF_F16(y) ?
ret = (BUILTIN_ISINF_F16(x) | BUILTIN_ISINF_F16(y)) ?
AS_HALF((ushort)PINFBITPATT_HP16) : ret;
}

Expand Down
2 changes: 1 addition & 1 deletion ocml/src/lgamma_rD.cl
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ MATH_MANGLE(lgamma_r_impl)(double x)

int s = 0;
if (x >= 0.0) {
ret = x == 1.0 | x == 2.0 ? 0.0 : ret;
ret = (x == 1.0 | x == 2.0) ? 0.0 : ret;
s = x == 0.0 ? 0 : 1;
} else if (hax < 0x43300000) { // x > -0x1.0p+52
double t = MATH_MANGLE(sinpi)(x);
Expand Down
2 changes: 1 addition & 1 deletion ocml/src/lgamma_rF.cl
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ MATH_MANGLE(lgamma_r_impl)(float x)

int s = 0;
if (x >= 0.0f) {
ret = (x == 1.0f) | (x == 2.0f) ? 0.0f : ret;
ret = ((x == 1.0f) | (x == 2.0f)) ? 0.0f : ret;
s = x == 0.0f ? 0 : 1;
} else if (uax < 0x4b000000) { // x > -0x1.0p+23
float t = MATH_MANGLE(sinpi)(x);
Expand Down
2 changes: 1 addition & 1 deletion ocml/src/nextafterD.cl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ MATH_MANGLE(nextafter)(double x, double y)
r = BUILTIN_ISNAN_F64(x) ? ix : r;
r = BUILTIN_ISNAN_F64(y) ? iy : r;
}
r = (ax|ay) == 0L | ix == iy ? iy : r;
r = ((ax|ay) == 0L | ix == iy) ? iy : r;
return AS_DOUBLE(r);
}

2 changes: 1 addition & 1 deletion ocml/src/nextafterF.cl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ MATH_MANGLE(nextafter)(float x, float y)
r = ax > PINFBITPATT_SP32 ? ix : r;
r = ay > PINFBITPATT_SP32 ? iy : r;
}
r = (ax | ay) == 0 | ix == iy ? iy : r;
r = ((ax | ay) == 0 | ix == iy) ? iy : r;
return AS_FLOAT(r);
}

2 changes: 1 addition & 1 deletion ocml/src/nextafterH.cl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MATH_MANGLE(nextafter)(half x, half y)
r = ax > (short)PINFBITPATT_HP16 ? ix : r;
r = ay > (short)PINFBITPATT_HP16 ? iy : r;
}
r = (ax | ay) == (short)0 | ix == iy ? iy : r;
r = ((ax | ay) == (short)0 | ix == iy) ? iy : r;
return AS_HALF(r);
}

122 changes: 61 additions & 61 deletions ocml/src/powD_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MATH_MANGLE(pow)(double x, double y)
}
#endif

double ret = BUILTIN_COPYSIGN_F64(expylnx, (inty == 1) & (x < 0.0) ? -0.0 : 0.0);
double ret = BUILTIN_COPYSIGN_F64(expylnx, ((inty == 1) & (x < 0.0)) ? -0.0 : 0.0);

// Now all the edge cases
#if defined COMPILING_POWR
Expand All @@ -68,27 +68,27 @@ MATH_MANGLE(pow)(double x, double y)
bool y_pos = BUILTIN_CLASS_F64(y, CLASS_PZER|CLASS_PSUB|CLASS_PNOR|CLASS_PINF);

if (!FINITE_ONLY_OPT()) {
ret = ax_lt_1 & y_eq_ninf ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_lt_1 & y_eq_pinf ? 0.0 : ret;
ret = ax_eq_1 & ay_lt_inf ? 1.0 : ret;
ret = ax_eq_1 & ay_eq_pinf ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = ax_gt_1 & y_eq_ninf ? 0.0 : ret;
ret = ax_gt_1 & y_eq_pinf ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_lt_pinf & ay_eq_0 ? 1.0 : ret;
ret = ax_eq_pinf & !y_pos ? 0.0 : ret;
ret = ax_eq_pinf & y_pos ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_pinf & y_eq_pinf ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_pinf & ay_eq_0 ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = ax_eq_0 & !y_pos ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_0 & y_pos ? 0.0 : ret;
ret = ax_eq_0 & ay_eq_0 ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = ax_ne_0 & !x_pos ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = (ax_lt_1 & y_eq_ninf) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_lt_1 & y_eq_pinf) ? 0.0 : ret;
ret = (ax_eq_1 & ay_lt_inf) ? 1.0 : ret;
ret = (ax_eq_1 & ay_eq_pinf) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = (ax_gt_1 & y_eq_ninf) ? 0.0 : ret;
ret = (ax_gt_1 & y_eq_pinf) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_lt_pinf & ay_eq_0) ? 1.0 : ret;
ret = (ax_eq_pinf & !y_pos) ? 0.0 : ret;
ret = (ax_eq_pinf & y_pos) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_pinf & y_eq_pinf) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_pinf & ay_eq_0) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = (ax_eq_0 & !y_pos) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_0 & y_pos) ? 0.0 : ret;
ret = (ax_eq_0 & ay_eq_0) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = (ax_ne_0 & !x_pos) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = ax_eq_nan ? x : ret;
ret = ay_eq_nan ? y : ret;
} else {
ret = ax_eq_1 ? 1.0 : ret;
ret = ay_eq_0 ? 1.0 : ret;
ret = ax_eq_0 & y_pos ? 0.0 : ret;
ret = ax_eq_1 ? 1.0 : ret;
ret = ay_eq_0 ? 1.0 : ret;
ret = (ax_eq_0 & y_pos) ? 0.0 : ret;
}
#elif defined COMPILING_POWN
bool ax_eq_0 = ax == 0.0;
Expand All @@ -102,22 +102,22 @@ MATH_MANGLE(pow)(double x, double y)

if (!FINITE_ONLY_OPT()) {
double xinf = BUILTIN_COPYSIGN_F64(AS_DOUBLE(PINFBITPATT_DP64), x);
ret = ax_eq_0 & !y_pos & (inty == 1) ? xinf : ret;
ret = ax_eq_0 & !y_pos & (inty == 2) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_0 & y_pos & (inty == 2) ? 0.0 : ret;
ret = (ax_eq_0 & !y_pos & (inty == 1)) ? xinf : ret;
ret = (ax_eq_0 & !y_pos & (inty == 2)) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_0 & y_pos & (inty == 2)) ? 0.0 : ret;
double xzero = BUILTIN_COPYSIGN_F64(0.0, x);
ret = ax_eq_0 & y_pos & (inty == 1) ? xzero : ret;
ret = x_eq_ninf & !y_pos & (inty == 1) ? -0.0 : ret;
ret = x_eq_ninf & !y_pos & (inty != 1) ? 0.0 : ret;
ret = x_eq_ninf & y_pos & (inty == 1) ? AS_DOUBLE(NINFBITPATT_DP64) : ret;
ret = x_eq_ninf & y_pos & (inty != 1) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = x_eq_pinf & !y_pos ? 0.0 : ret;
ret = x_eq_pinf & y_pos ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_0 & y_pos & (inty == 1)) ? xzero : ret;
ret = (x_eq_ninf & !y_pos & (inty == 1)) ? -0.0 : ret;
ret = (x_eq_ninf & !y_pos & (inty != 1)) ? 0.0 : ret;
ret = (x_eq_ninf & y_pos & (inty == 1)) ? AS_DOUBLE(NINFBITPATT_DP64) : ret;
ret = (x_eq_ninf & y_pos & (inty != 1)) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (x_eq_pinf & !y_pos) ? 0.0 : ret;
ret = (x_eq_pinf & y_pos) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_nan ? x : ret;
} else {
double xzero = BUILTIN_COPYSIGN_F64(0.0, x);
ret = ax_eq_0 & y_pos & (inty == 1) ? xzero : ret;
ret = ax_eq_0 & y_pos & (inty == 2) ? 0.0 : ret;
ret = (ax_eq_0 & y_pos & (inty == 1)) ? xzero : ret;
ret = (ax_eq_0 & y_pos & (inty == 2)) ? 0.0 : ret;
}
ret = ny == 0 ? 1.0 : ret;
#elif defined COMPILING_ROOTN
Expand All @@ -131,23 +131,23 @@ MATH_MANGLE(pow)(double x, double y)
bool y_pos = ny >= 0;

if (!FINITE_ONLY_OPT()) {
ret = !x_pos & (inty == 2) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = (!x_pos & (inty == 2)) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
double xinf = BUILTIN_COPYSIGN_F64(AS_DOUBLE(PINFBITPATT_DP64), x);
ret = ax_eq_0 & !y_pos & (inty == 1) ? xinf : ret;
ret = ax_eq_0 & !y_pos & (inty == 2) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_0 & y_pos & (inty == 2) ? 0.0 : ret;
ret = (ax_eq_0 & !y_pos & (inty == 1)) ? xinf : ret;
ret = (ax_eq_0 & !y_pos & (inty == 2)) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_0 & y_pos & (inty == 2)) ? 0.0 : ret;
double xzero = BUILTIN_COPYSIGN_F64(0.0, x);
ret = ax_eq_0 & y_pos & (inty == 1) ? xzero : ret;
ret = x_eq_ninf & y_pos & (inty == 1) ? AS_DOUBLE(NINFBITPATT_DP64) : ret;
ret = x_eq_ninf & !y_pos & (inty == 1) ? -0.0 : ret;
ret = x_eq_pinf & !y_pos ? 0.0 : ret;
ret = x_eq_pinf & y_pos ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_0 & y_pos & (inty == 1)) ? xzero : ret;
ret = (x_eq_ninf & y_pos & (inty == 1)) ? AS_DOUBLE(NINFBITPATT_DP64) : ret;
ret = (x_eq_ninf & !y_pos & (inty == 1)) ? -0.0 : ret;
ret = (x_eq_pinf & !y_pos) ? 0.0 : ret;
ret = (x_eq_pinf & y_pos) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_nan ? x : ret;
ret = ny == 0 ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
} else {
double xzero = BUILTIN_COPYSIGN_F64(0.0, x);
ret = ax_eq_0 & y_pos & (inty == 1) ? xzero : ret;
ret = ax_eq_0 & y_pos & (inty == 2) ? 0.0 : ret;
ret = (ax_eq_0 & y_pos & (inty == 1)) ? xzero : ret;
ret = (ax_eq_0 & y_pos & (inty == 2)) ? 0.0 : ret;
}
#else
bool ax_eq_0 = ax == 0.0;
Expand All @@ -170,31 +170,31 @@ MATH_MANGLE(pow)(double x, double y)
bool y_pos = BUILTIN_CLASS_F64(y, CLASS_PZER|CLASS_PSUB|CLASS_PNOR|CLASS_PINF);

if (!FINITE_ONLY_OPT()) {
ret = !x_pos & (inty == 0) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = ax_lt_1 & y_eq_ninf ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_gt_1 & y_eq_ninf ? 0.0 : ret;
ret = ax_lt_1 & y_eq_pinf ? 0.0 : ret;
ret = ax_gt_1 & y_eq_pinf ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (!x_pos & (inty == 0)) ? AS_DOUBLE(QNANBITPATT_DP64) : ret;
ret = (ax_lt_1 & y_eq_ninf) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_gt_1 & y_eq_ninf) ? 0.0 : ret;
ret = (ax_lt_1 & y_eq_pinf) ? 0.0 : ret;
ret = (ax_gt_1 & y_eq_pinf) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
double xinf = BUILTIN_COPYSIGN_F64(AS_DOUBLE(PINFBITPATT_DP64), x);
ret = ax_eq_0 & !y_pos & (inty == 1) ? xinf : ret;
ret = ax_eq_0 & !y_pos & (inty != 1) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_0 & !y_pos & (inty == 1)) ? xinf : ret;
ret = (ax_eq_0 & !y_pos & (inty != 1)) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
double xzero = BUILTIN_COPYSIGN_F64(0.0, x);
ret = ax_eq_0 & y_pos & (inty == 1) ? xzero : ret;
ret = ax_eq_0 & y_pos & (inty != 1) ? 0.0 : ret;
ret = ax_eq_0 & y_eq_ninf ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (x == -1.0) & ay_eq_pinf ? 1.0 : ret;
ret = x_eq_ninf & !y_pos & (inty == 1) ? -0.0 : ret;
ret = x_eq_ninf & !y_pos & (inty != 1) ? 0.0 : ret;
ret = x_eq_ninf & y_pos & (inty == 1) ? AS_DOUBLE(NINFBITPATT_DP64) : ret;
ret = x_eq_ninf & y_pos & (inty != 1) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = x_eq_pinf & !y_pos ? 0.0 : ret;
ret = x_eq_pinf & y_pos ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (ax_eq_0 & y_pos & (inty == 1)) ? xzero : ret;
ret = (ax_eq_0 & y_pos & (inty != 1)) ? 0.0 : ret;
ret = (ax_eq_0 & y_eq_ninf) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ((x == -1.0) & ay_eq_pinf) ? 1.0 : ret;
ret = (x_eq_ninf & !y_pos & (inty == 1)) ? -0.0 : ret;
ret = (x_eq_ninf & !y_pos & (inty != 1)) ? 0.0 : ret;
ret = (x_eq_ninf & y_pos & (inty == 1)) ? AS_DOUBLE(NINFBITPATT_DP64) : ret;
ret = (x_eq_ninf & y_pos & (inty != 1)) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = (x_eq_pinf & !y_pos) ? 0.0 : ret;
ret = (x_eq_pinf & y_pos) ? AS_DOUBLE(PINFBITPATT_DP64) : ret;
ret = ax_eq_nan ? x : ret;
ret = ay_eq_nan ? y : ret;
} else {
double xzero = BUILTIN_COPYSIGN_F64(0.0, x);
ret = ax_eq_0 & y_pos & (inty == 1) ? xzero : ret;
ret = ax_eq_0 & y_pos & (inty != 1) ? 0.0 : ret;
ret = (ax_eq_0 & y_pos & (inty == 1)) ? xzero : ret;
ret = (ax_eq_0 & y_pos & (inty != 1)) ? 0.0 : ret;
}
ret = ay_eq_0 ? 1.0 : ret;
ret = x == 1.0 ? 1.0 : ret;
Expand Down
Loading

0 comments on commit b9c3a27

Please sign in to comment.