summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/memcpy.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-02-05 02:37:36 +0000
committerChris Lattner <sabre@nondot.org>2012-02-05 02:37:36 +0000
commit521a2556930ccab2144c5fba51cf0184e6ecb971 (patch)
tree3fbd6b19dd0b5513694566bc68bda11ad13ddfb8 /test/CodeGen/X86/memcpy.ll
parent18c7f80b3e83ab584bd8572695a3cde8bafd9d3c (diff)
downloadllvm-521a2556930ccab2144c5fba51cf0184e6ecb971.tar.gz
llvm-521a2556930ccab2144c5fba51cf0184e6ecb971.tar.bz2
llvm-521a2556930ccab2144c5fba51cf0184e6ecb971.tar.xz
Add a test for the miscompilation my recent ConstantDataArray patches introduced, to make sure
we don't regress on it in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/memcpy.ll')
-rw-r--r--test/CodeGen/X86/memcpy.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/X86/memcpy.ll b/test/CodeGen/X86/memcpy.ll
index f43b0bf509..86c6862a53 100644
--- a/test/CodeGen/X86/memcpy.ll
+++ b/test/CodeGen/X86/memcpy.ll
@@ -79,3 +79,16 @@ entry:
; LINUX movq
}
+
+@.str = private unnamed_addr constant [30 x i8] c"\00aaaaaaaaaaaaaaaaaaaaaaaaaaaa\00", align 1
+
+define void @test5(i8* nocapture %C) nounwind uwtable ssp {
+entry:
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([30 x i8]* @.str, i64 0, i64 0), i64 16, i32 1, i1 false)
+ ret void
+
+; DARWIN: movabsq $7016996765293437281
+; DARWIN: movabsq $7016996765293437184
+}
+
+