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

            Bug ID: 119196
           Summary: Missed folding of vector comparisons
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rearnsha at gcc dot gnu.org
  Target Milestone: ---

c-c++-common/vector-compare-3.c contains the code:
void
g (T *x, T const *y, T *z, T *t)
{
  *z = *x < *y | *x == *y;
  *t = *x < *y & *x > *y;
}

If T is a scalar value this is simplified to 

{
  *z = *x <= *y;
  *t = 0;
}

But we miss the equivalent when T is a vector type.

Reply via email to