[Bug tree-optimization/101868] Incorrect reordering in -O2 with LTO

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 12 00:21:08 GMT 2021


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Works for me on the trunk:
repro:
.LFB9:
        .cfi_startproc
        subq    $24, %rsp
        testq   %rsi, %rsi
        je      .L14
        movq    (%rsi), %rax
        testq   %rax, %rax
        jne     .L15
.L10:
        addq    $24, %rsp
...
.L14:
        xorl    %edi, %edi
        call    rb_check_type.isra.0
        movq    0, %rax
        jmp     .L10
.L15:
        movq    %rsi, %rdi
        movq    %rax, 8(%rsp)
        call    rb_check_type.isra.0
        movq    8(%rsp), %rax
        jmp     .L10


More information about the Gcc-bugs mailing list