https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126219

            Bug ID: 126219
           Summary: get_range in tree-ssa-strlen.cc uses get_legacy_range
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog, internal-improvement
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

```
  if (!rvals->range_of_expr (vr, val, stmt))
    return NULL_TREE;

  tree vrmin, vrmax;
  value_range_kind rng = get_legacy_range (vr, vrmin, vrmax);
  if (rng == VR_RANGE)
    {
      /* Only handle straight ranges.  */
      minmax[0] = wi::to_wide (vrmin);
      minmax[1] = wi::to_wide (vrmax);
      return val;
    }
```

This could/should be lower_bound/upper_bound.
Though offrng really should just be a irange.

Reply via email to