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

            Bug ID: 101808
           Summary: comparison0 < comparison1 should be transformed into
                    comparison0` & comparison1; likewise for <=
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:

bool f(int ai, int bi)
{
    bool a = ai, b = bi;
    return a<b;
}
bool g(int ai, int bi)
{
    bool a = ai, b = bi;
  return !a & b;
}

bool fe(int ai, int bi)
{
    bool a = ai, b = bi;
    return a<=b;
}
bool ge(int ai, int bi)
{
    bool a = ai, b = bi;
  return !a | b;
}
---- CUT----
f and g should produce the same code fe and ge should too.

So for aarch64, we should get cmp followed by a ccmp for all 4 functions.

Reply via email to