[Bug tree-optimization/115896] Failure to optimize shift+compare involving constants to and+compare
gabravier at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 16 18:09:51 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115896
--- Comment #4 from Gabriel Ravier <gabravier at gmail dot com> ---
I'll add that the case of `(a << cst0) == cst1` (which LLVM handles but not
GCC) seems relatively frequent in real code, e.g. after a few minutes I've
found it in:
-
https://github.com/TASEmulators/BizHawk/blob/9a5a75e5bba87191c64e711049f3504f7ed53bdf/waterbox/ares64/ares/ares/n64/cpu/disassembler.cpp#L358
-
https://github.com/ares-emulator/ares/blob/36f821f5ac81398d0cdce402ad3c238a08d07adc/thirdparty/sljit/sljit_src/sljitNativeS390X.c#L873
-
https://github.com/xqemu/xqemu/blob/e1236e1b62da66a2c8c3e5a2edf5cffda49cc65d/target/unicore32/translate.c#L743
-
https://github.com/open64-compiler/open64/blob/7e934651214049860141269bbadb457056745d51/osprey/libu/ffio/cdcread.c#L266
-
https://github.com/open64-compiler/open64/blob/7e934651214049860141269bbadb457056745d51/osprey/libu/ffio/cdcread.c#L278
-
https://github.com/mozilla/gecko-dev/blob/a95ca2357da6bccc6c5b12f662dd8a4e5bcbf892/js/src/jit/MIR.cpp#L1199
-
https://github.com/mamedev/mame/blob/66f0f7c6ef45f2d41c723f14351d9934731ee631/src/devices/cpu/tms34010/34010gfx.hxx#L211
More information about the Gcc-bugs
mailing list