This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/7] Remove dead code from memcpy-sse2-unaligned.S


There are

ENTRY(__memcpy_sse2_unaligned)
   movq  %rsi, %rax
   leaq  (%rdx,%rdx), %rcx
   subq  %rdi, %rax
   subq  %rdx, %rax
   cmpq  %rcx, %rax
   jb L(overlapping)

When branch is taken,

   cmpq  %rsi, %rdi
   jae   .L3

will never be taken.  We can remove the dead code.

	[BZ #19776]
	* sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S (.L3) Removed.
---
 sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S b/sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S
index c450983..7207753 100644
--- a/sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S
+++ b/sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S
@@ -90,8 +90,6 @@ L(loop):
 	jne	L(loop)
 	jmp	L(return)
 L(overlapping):
-	cmpq	%rsi, %rdi
-	jae	.L3
 	testq	%rdx, %rdx
 	.p2align 4,,5
 	je	L(return)
@@ -146,15 +144,6 @@ L(less_16):
 	movzwl	-2(%rsi,%rdx), %eax
 	movw	%ax, -2(%rdi,%rdx)
 	jmp	L(return)
-.L3:
-	leaq	-1(%rdx), %rax
-	.p2align 4,,10
-	.p2align 4
-.L11:
-	movzbl	(%rsi,%rax), %edx
-	movb	%dl, (%rdi,%rax)
-	subq	$1, %rax
-	jmp	.L11
 L(between_9_16):
 	movq	(%rsi), %rax
 	movq	%rax, (%rdi)
-- 
2.5.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]