[Bug tree-optimization/96094] New: Failure to optimize bool division

gabravier at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jul 7 14:00:04 GMT 2020


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.


More information about the Gcc-bugs mailing list