[Bug rtl-optimization/125456] RTL Loop Unroll AGU Serialization and Redundant IV Increments

lin1.hu at intel dot com gcc-bugzilla@gcc.gnu.org
Wed Jun 3 07:49:07 GMT 2026


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

--- Comment #4 from Hu Lin <lin1.hu at intel dot com> ---
I tried the two RTL options you mentioned: -fvariable-expansion-in-unroller is
no effect. -fno-split-ivs-in-unroller avoids the regression, but disables the
entire apply_opt_in_copies path.

The output is:
    .L55:
            addq    $4, %rdi
            cmpq    %rdi, %rsi
            je      .L4
    .L2:
            cmpl    %edx, (%rdi)
            je      .L5
            addq    $4, %rdi
    .L53:
            cmpl    %edx, (%rdi)
            je      .L5
            addq    $4, %rdi
    .L35:
            cmpl    %edx, (%rdi)
            je      .L5
            addq    $4, %rdi
    .L34:
            cmpl    %edx, (%rdi)
            je      .L5
            addq    $4, %rdi
    .L33:
            cmpl    %edx, (%rdi)
            je      .L5
            addq    $4, %rdi
    .L32:
            cmpl    %edx, (%rdi)
            je      .L5
            addq    $4, %rdi
    .L31:
            cmpl    %edx, (%rdi)
            je      .L5
            addq    $4, %rdi
    .L30:
            cmpl    %edx, (%rdi)
            jne     .L55

I think the case is worse than mine.


More information about the Gcc-bugs mailing list