[Bug tree-optimization/112857] Missing optimzation: fold (b + ~a) > 0 to a - b < -1

xxs_chy at outlook dot com gcc-bugzilla@gcc.gnu.org
Tue Dec 5 10:20:45 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112857

--- Comment #4 from XChy <xxs_chy at outlook dot com> ---
(In reply to Andrew Pinski from comment #1)

> For the above, GCC is able to get the best code for g0, g10, g1, and g4
> (though g1 and g4 are still `(b-a) > 0` at the gimple level. While LLVM is
> able to get it for g0, g10 and g4 (g3 is close though with `(b-a) > 0`).

Thanks for generalizing this fold!


More information about the Gcc-bugs mailing list