summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2017-04-21 09:20:55 +0000
committerClement Courbet <courbet@google.com>2017-04-21 09:20:55 +0000
commitd5f6182bec48b40198742cb814816a396f8b831c (patch)
tree21c5349397d89efe5add82252836476345ade3c6 /llvm/test
parent203fc17797e2c56cd6715536bb6347864196a855 (diff)
downloadbcm5719-llvm-d5f6182bec48b40198742cb814816a396f8b831c.tar.gz
bcm5719-llvm-d5f6182bec48b40198742cb814816a396f8b831c.zip
use repmovsb when optimizing forminsize
llvm-svn: 300960
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/memcpy-struct-by-value.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/memcpy-struct-by-value.ll b/llvm/test/CodeGen/X86/memcpy-struct-by-value.ll
index bf889161023..3c01adbb83f 100644
--- a/llvm/test/CodeGen/X86/memcpy-struct-by-value.ll
+++ b/llvm/test/CodeGen/X86/memcpy-struct-by-value.ll
@@ -17,3 +17,29 @@ define void @test1(%struct.large* nocapture %x) nounwind {
; FAST: rep;movsb
; HASWELL: rep;movsb
}
+
+define void @test2(%struct.large* nocapture %x) nounwind minsize {
+ call void @foo(%struct.large* align 8 byval %x)
+ ret void
+
+; ALL-LABEL: test2:
+; NOFAST: rep;movsq
+; GENERIC: rep;movsq
+; FAST: rep;movsb
+; HASWELL: rep;movsb
+}
+
+%struct.large_oddsize = type { [4095 x i8] }
+
+declare void @foo_oddsize(%struct.large_oddsize* align 8 byval) nounwind
+
+define void @test3(%struct.large_oddsize* nocapture %x) nounwind minsize {
+ call void @foo_oddsize(%struct.large_oddsize* align 8 byval %x)
+ ret void
+
+; ALL-LABEL: test3:
+; NOFAST: rep;movsb
+; GENERIC: rep;movsb
+; FAST: rep;movsb
+; HASWELL: rep;movsb
+}
OpenPOWER on IntegriCloud