+2018-11-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/88274
+ * tree-vrp.c (ranges_from_anti_range): Fix handling of
+ TYPE_MIN/MAX_VALUE.
+
2018-11-29 Andi Kleen <ak@linux.intel.com>
* config/i386/i386.c (current_fentry_section): Add.
|| !vrp_val_max (type))
return false;
- if (!vrp_val_is_min (ar->min ()))
- *vr0 = value_range (VR_RANGE,
- vrp_val_min (type),
- wide_int_to_tree (type, wi::to_wide (ar->min ()) - 1));
- if (!vrp_val_is_max (ar->max ()))
- *vr1 = value_range (VR_RANGE,
- wide_int_to_tree (type, wi::to_wide (ar->max ()) + 1),
- vrp_val_max (type));
+ if (tree_int_cst_lt (vrp_val_min (type), ar->min ()))
+ vr0->set (VR_RANGE,
+ vrp_val_min (type),
+ wide_int_to_tree (type, wi::to_wide (ar->min ()) - 1));
+ if (tree_int_cst_lt (ar->max (), vrp_val_max (type)))
+ vr1->set (VR_RANGE,
+ wide_int_to_tree (type, wi::to_wide (ar->max ()) + 1),
+ vrp_val_max (type));
if (vr0->undefined_p ())
{
*vr0 = *vr1;