- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
return instruction emitted twice with branch target inbetween
function
unsigned int fact( unsigned int n) { return n < 1 ? 1 : n*fact(n-1); }
produces
fact:
.LFB0:
.cfi_startproc
testl %edi, %edi
movl $1, %eax
je .L4
.p2align 4,,10
.p2align 3
.L3:
imull %edi, %eax
subl $1, %edi
jne .L3
rep ret # <-- this instruction can be removed
.L4:
rep ret
.cfi_endproc
.LFE0:
.size fact, .-fact
.section .text.unlikely