[llvm-bugs] [Bug 47091] New: Failure to properly optimize successive > 0 identities to unsigned comparisons
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 10 06:06:50 PDT 2020
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: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200810/6693e089/attachment.html>
More information about the llvm-bugs
mailing list