https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124898
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-04-16
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
really?
Estimating sizes for loop 2
BB: 8, after_exit: 0
size: 2 if (i_7 != 8)
Exit condition will be eliminated in peeled copies.
Exit condition will be eliminated in last copy.
Constant conditional.
BB: 7, after_exit: 1
size: 1 i_20 = i_7 + 1;
Induction variable computation will be folded away.
BB: 5, after_exit: 1
size: 1 _4 = crc_9 << 1;
size: 1 crc_19 = _4 ^ 79764919;
BB: 6, after_exit: 1
size: 1 crc_18 = crc_9 << 1;
BB: 4, after_exit: 1
size: 0 crc.1_3 = (signed int) crc_9;
size: 2 if (crc.1_3 < 0)
size: 8-3, last_iteration: 2-2
Loop size: 8
Estimated size after unrolling: 40-14
OK, reasonable to some extent. But we could tune down early unrolling
max-completely-peeled-insns, or even weight dynamic branches higher.
There's also max-peel-branches.
I don't think CRC detection should move earlier, not before first FRE
after IPA.