https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94899
Bug ID: 94899
Summary: Failure to optimize out add before compare
Product: gcc
Version: 10.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: ---
int f(int x, int y)
{
return x + 0x80000000 < y + 0x80000000;
}
This can be optimized to `return x < y`. LLVM does this transformation, but GCC
does not.
