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

            Bug ID: 96094
           Summary: Failure to optimize bool division
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

bool f(bool a, bool b)
{
    return a / b;
}

This can be optimized to `return a;`. LLVM does this transformation, but GCC
does not.

Reply via email to