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

--- Comment #3 from Gabriel Ravier <gabravier at gmail dot com> ---
A place where this does seem to give faster results in real code is code where
multiple conditions like this are placed in a row, in e.g. the code at
https://github.com/openbsd/xenocara/blob/0c50e27b4c04e035f08a7c09a95e25bf7e4cf7c3/lib/mesa/src/intel/compiler/brw_eu_compact.c#L1612-L1616
(from OpenBSD's Xenocara X server).

LLVM is able to transform a condition like `(((int)imm >> 11) == 0 || ((int)imm
>> 11) == -1)` (from the above-mentioned OpenBSD code) to `(imm + 2048) <
4096`, whereas GCC isn't.

Reply via email to