https://bugs.llvm.org/show_bug.cgi?id=47091

            Bug ID: 47091
           Summary: Failure to properly optimize successive > 0 identities
                    to unsigned comparisons
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

void bar(int, int);

void foo(int a, int b)
{
    if (a >= 0 && b >= 0 && a < 32 && b < 128)
        bar(a, b);
}

The if's condition can be optimized to `(unsigned)a < 32 && (unsigned)b < 128`.
This transformation is done by GCC, but not by LLVM.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to