[Bug tree-optimization/56003] New: SCEV should thread flags ^= 0x80000000 as an addition to discover an IV var.

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 16 13:33:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56003

             Bug #: 56003
           Summary: SCEV should thread flags ^= 0x80000000 as an addition
                    to discover an IV var.
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hubicka@gcc.gnu.org


In the following testcase we fail to work out that the loop is not really
iterating after unswitching otherwise.
void my_waitpid (int flags, int wnohang)
{
  while (1)
    {
      if (flags & 0x80000000)
        {
          if (wnohang)
            break;
          if (debug_threads)
            __builtin_puts ("blocking\n");
          sigsuspend ();
        }
      flags ^= 0x80000000;
    }
}



More information about the Gcc-bugs mailing list