[Bug tree-optimization/95731] New: Faiilure to optimize a >= 0 && b >= 0 to (a | b) >= 0
gabravier at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 17 21:58:23 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95731
Bug ID: 95731
Summary: Faiilure to optimize a >= 0 && b >= 0 to (a | b) >= 0
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(int a, int b)
{
return a >= 0 && b >= 0;
}
This can be optimized to `return (a | b) >= 0;`. LLVM does this transformation,
but GCC does not.
More information about the Gcc-bugs
mailing list