Closed
Description
I don't know if this is exactly your problem, but godbolt's ASM for this example (https://rust.godbolt.org/z/_Wczb9) doesn't have the problem, so it might be.
.LBB6_9:
lea r14, [r13 - 1]
lea r15, [r12 + r14]
lea rdi, [r12 + r13]
mov ebx, 1
mov rsi, r15
mov rdx, rbx
call memcpy@PLT
add r13, rbx
mov rbx, r13
sub rbx, r14
mov rdx, rbp
sub rdx, r13
lea rdi, [r12 + r13]
cmp rdx, rbx
ja .LBB6_10
mov rsi, r15
call memcpy@PLT
mov rax, qword ptr [rsp] # 8-byte Reload
mov qword ptr [rax + 16], rbp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
Note the jump to LBB6_10
, which is a label not in the output.
Turn off name filtering, and you get instead
.LBB6_9:
lea r14, [r13 - 1]
lea r15, [r12 + r14]
lea rdi, [r12 + r13]
mov ebx, 1
.p2align 4, 0x90
.LBB6_10: # =>This Inner Loop Header: Depth=1
mov rsi, r15
mov rdx, rbx
call memcpy@PLT
add r13, rbx
mov rbx, r13
sub rbx, r14
mov rdx, rbp
sub rdx, r13
lea rdi, [r12 + r13]
cmp rdx, rbx
ja .LBB6_10
# %bb.11:
mov rsi, r15
call memcpy@PLT
mov rax, qword ptr [rsp] # 8-byte Reload
mov qword ptr [rax + 16], rbp
add rsp, 8
.cfi_def_cfa_offset 56
pop rbx
.cfi_def_cfa_offset 48
pop r12
.cfi_def_cfa_offset 40
pop r13
.cfi_def_cfa_offset 32
pop r14
.cfi_def_cfa_offset 24
pop r15
.cfi_def_cfa_offset 16
pop rbp
.cfi_def_cfa_offset 8
ret
Which has the LBB6_10
label, as it should.
(Sorry for not reducing the repro.)