[Bug middle-end/113651] The GCC optimizer performs poorly on a very simple code snippet.

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Dec 7 07:21:35 GMT 2025


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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I also think there is a missing crc detection now too.

GCC can detect the crc for:
```
    for (int i = 0; i < 32; i++)
    {
        r = (r << 1) ^ (r >> 31 ? M : 0);
    }
```

Which becomes:
  prephitmp_19 = .CRC (r_39, 0, 79764919/*0x04c11db7*/);


But not for the inner loop.


More information about the Gcc-bugs mailing list