summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-03-26 16:30:54 +0000
committerHans Wennborg <hans@hanshq.net>2014-03-26 16:30:54 +0000
commitb82f8a28e8768d1acdb565adbda9ac8b241471a9 (patch)
tree532aed4e28b01ee989a9c2dc948c5861d88136cb /test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll
parent7363d2223e09fd78094fba652223785f0d63c196 (diff)
downloadllvm-b82f8a28e8768d1acdb565adbda9ac8b241471a9.tar.gz
llvm-b82f8a28e8768d1acdb565adbda9ac8b241471a9.tar.bz2
llvm-b82f8a28e8768d1acdb565adbda9ac8b241471a9.tar.xz
Revert "X86 memcpy lowering: use "rep movs" even when esi is used as base pointer" (r204174)
> For functions where esi is used as base pointer, we would previously fall ba > from lowering memcpy with "rep movs" because that clobbers esi. > > With this patch, we just store esi in another physical register, and restore > it afterwards. This adds a little bit of register preassure, but the more > efficient memcpy should be worth it. > > Differential Revision: http://llvm-reviews.chandlerc.com/D2968 This didn't work. I was ending up with code like this: lea edi,[esi+38h] mov ecx,0Fh mov edx,esi mov esi,ebx rep movs dword ptr es:[edi],dword ptr [esi] lea ecx,[esi+74h] <-- Ooops, we're now using esi before restoring it from edx. add ebx,3Ch mov esi,edx I guess if we want to do this we need stronger glue or something, or doing the expansion much later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll')
-rw-r--r--test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll b/test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll
index f64ccb8468..b55571bcba 100644
--- a/test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll
+++ b/test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll
@@ -13,7 +13,5 @@ define void @test1(%struct.foo* nocapture %x, i32 %y, i8* %z) nounwind {
; CHECK-LABEL: test1:
; CHECK: movl %esp, %esi
-; CHECK: movl %esi, %edx
-; CHECK: rep;movsl
-; CHECK: movl %edx, %esi
+; CHECK-NOT: rep;movsl
}