https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802
Bug ID: 94802 Summary: Failure to recognize identities with __builtin_clz 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: --- bool f(int a, int b) { return __builtin_clz(a - b); } This is equivalent to `return a >= b`. This transformation is done by LLVM, but not by GCC. Comparison here : https://godbolt.org/z/jvahPh