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

--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
test_demovector(checkedvector&):
        pushq   %rbx
        movq    %rdi, %rbx
        pushq   $4
        popq    %rsi
        call    checkedvector::operator[](unsigned long)
        movq    %rbx, %rdi
        movq    $5, (%rax)
        pushq   $6
        popq    %rsi
        call    checkedvector::operator[](unsigned long)
        movq    %rbx, %rdi
        movq    $5, (%rax)
        pushq   $10
        popq    %rsi
        call    checkedvector::operator[](unsigned long)
        movq    %rbx, %rdi
        movq    $5, (%rax)
        pushq   $5
        popq    %rsi
        call    checkedvector::operator[](unsigned long)
        movq    $5, (%rax)
        popq    %rbx
        ret
test_demovector_forceinline(checkedvector&):
        movq    (%rdi), %rax
        movq    8(%rdi), %rdx
        subq    %rax, %rdx
        cmpq    $32, %rdx
        ja      .L7
.L8:
        ud2
.L7:
        movq    $5, 32(%rax)
        cmpq    $48, %rdx
        jbe     .L8
        movq    $5, 48(%rax)
        cmpq    $80, %rdx
        jbe     .L8
        movq    $5, 80(%rax)
        movq    $5, 40(%rax)
        ret

see? first one has more instructions than the 2nd one.

Reply via email to