This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)
- From: "oleg at smolsky dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Mar 2012 02:59:11 +0000
- Subject: [Bug target/50182] Performance degradation from gcc 4.1 (x86_64)
- Auto-submitted: auto-generated
- References: <bug-50182-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182
--- Comment #36 from oleg at smolsky dot net 2012-03-03 02:59:11 UTC ---
Here is the code emitted by g++ 4.6.3 for smaller_test.cpp (attached to
the bug)
unsigned int test_constant<> proc near
mov r9d, cs:iterations
xor r8d, r8d
xor eax, eax
test r9d, r9d
jle short locret_400552
db 66h, 66h, 66h
nop
db 66h, 66h
nop
loc_400528:
xor ecx, ecx
xor edx, edx
test esi, esi
jle short loc_40054E
loc_400530:
add edx, 0Ah
add dl, [rdi+rcx]
add rcx, 1
cmp esi, ecx
jg short loc_400530
movsx edx, dl
loc_400541:
add r8d, 1
add eax, edx
cmp r8d, r9d
jnz short loc_400528
rep retn
loc_40054E:
xor edx, edx
jmp short loc_400541
locret_400552:
rep retn