https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57430
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|rtl-optimization |tree-optimization
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So on the trunk, it looks like the inlined version has only one mov while the
out of line one has two.
inlined:
.L19:
cmpq %rax, %rsi
je .L18
.L17:
movq %rax, %rdx
movq 24(%rax), %rax
testq %rax, %rax
jne .L19
out of line:
.L7:
movq %rdx, %rax
.L4:
cmpq %rax, %rsi
je .L3
movq 24(%rax), %rdx
movq %rax, %rcx
testq %rdx, %rdx
jne .L7
Note this is 64bit x86.
inlined:
<bb 10> [local count: 376074471]:
if (first_24 != curr_34)
goto <bb 11>; [94.50%]
else
goto <bb 12>; [5.50%]
<bb 11> [local count: 397962402]:
# curr_55 = PHI <curr_34(10), head.0_9(9)>
curr_34 = curr_55->next;
if (curr_34 != 0B)
goto <bb 10>; [94.50%]
else
goto <bb 13>; [5.50%]
out of line:
<bb 3> [local count: 1014686024]:
# curr_24 = PHI <curr_15(4), _1(2)>
# prev_25 = PHI <curr_24(4), 0B(2)>
if (elt_12(D) != curr_24)
goto <bb 4>; [94.50%]
else
goto <bb 5>; [5.50%]
<bb 4> [local count: 958878294]:
curr_15 = curr_24->next;
if (curr_15 != 0B)
goto <bb 3>; [93.84%]
else
goto <bb 8>; [6.16%]