@@ -105,6 +105,7 @@ rtx const_true_rtx;
REAL_VALUE_TYPE dconst0;
REAL_VALUE_TYPE dconst1;
REAL_VALUE_TYPE dconst2;
+REAL_VALUE_TYPE dconstm0;
REAL_VALUE_TYPE dconstm1;
REAL_VALUE_TYPE dconsthalf;
REAL_VALUE_TYPE dconstinf;
@@ -6206,6 +6207,9 @@ init_emit_once (void)
real_from_integer (&dconst1, double_mode, 1, SIGNED);
real_from_integer (&dconst2, double_mode, 2, SIGNED);
+ dconstm0 = dconst0;
+ dconstm0.sign = 1;
+
dconstm1 = dconst1;
dconstm1.sign = 1;
@@ -360,8 +360,6 @@ public:
}
if (!lhs.contains_p (build_zero_cst (lhs.type ())))
{
- REAL_VALUE_TYPE dconstm0 = dconst0;
- dconstm0.sign = 1;
r.set (type, frange_val_min (type), dconstm0);
r.update_nan (true);
return true;
@@ -2263,7 +2263,7 @@ zero_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, int signbit_known)
{
ub = lb = dconst0;
if (signbit_known <= 0)
- lb = real_value_negate (&dconst0);
+ lb = dconstm0;
if (signbit_known < 0)
ub = lb;
}
@@ -2297,7 +2297,7 @@ zero_to_inf_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, int signbit_known)
else if (signbit_known < 0)
{
lb = dconstninf;
- ub = real_value_negate (&dconst0);
+ ub = dconstm0;
}
else
{
@@ -2634,7 +2634,7 @@ private:
if (real_isneg (&lh_lb) == real_isneg (&lh_ub))
cp[1] = dconst0;
else
- cp[1] = real_value_negate (&dconst0);
+ cp[1] = dconstm0;
}
else
cp[1] = cp[0];
@@ -468,6 +468,7 @@ extern void real_ldexp (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int);
extern REAL_VALUE_TYPE dconst0;
extern REAL_VALUE_TYPE dconst1;
extern REAL_VALUE_TYPE dconst2;
+extern REAL_VALUE_TYPE dconstm0;
extern REAL_VALUE_TYPE dconstm1;
extern REAL_VALUE_TYPE dconsthalf;
extern REAL_VALUE_TYPE dconstinf;
@@ -322,9 +322,10 @@ frange::flush_denormals_to_zero ()
// Flush [x, -DENORMAL] to [x, -0.0].
if (real_isdenormal (&m_max, mode) && real_isneg (&m_max))
{
- m_max = dconst0;
if (HONOR_SIGNED_ZEROS (m_type))
- m_max.sign = 1;
+ m_max = dconstm0;
+ else
+ m_max = dconst0;
}
// Flush [+DENORMAL, x] to [+0.0, x].
if (real_isdenormal (&m_min, mode) && !real_isneg (&m_min))
@@ -840,8 +841,6 @@ frange::set_zero (tree type)
{
if (HONOR_SIGNED_ZEROS (type))
{
- REAL_VALUE_TYPE dconstm0 = dconst0;
- dconstm0.sign = 1;
set (type, dconstm0, dconst0);
clear_nan ();
}