https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122435
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot
gnu.org
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
With the patch 'g' is now the expected noop;
_Z1g4SpanIjE:
.LFB0:
.cfi_startproc
movq %rdi, %rax
movq %rsi, %rdx
ret
but 'f' is not simplified completely (with -O2), it needs -O3 (complete
unrolling is missing here - we estimate too much growth (1 insn):
Loop size: 9
Estimated size after unrolling: 16-6
Not unrolling loop 1: size would grow.
I have some older patches that tried to address this but they never got any
feedback.
I'm leaving this PR open for this issue.