diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-10-22 22:11:27 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-10-22 22:11:27 +0000 |
commit | 4102eb57bbeecbbf5b5b5122ed1ecd4cd5487878 (patch) | |
tree | 6e5fa21a413cd28b0c0076a1d5b083d800be6365 /test/CodeGen/ARM/memcpy-inline.ll | |
parent | ac72058dd6afcb41ddf8b19c4ec2093999b34282 (diff) | |
download | llvm-4102eb57bbeecbbf5b5b5122ed1ecd4cd5487878.tar.gz llvm-4102eb57bbeecbbf5b5b5122ed1ecd4cd5487878.tar.bz2 llvm-4102eb57bbeecbbf5b5b5122ed1ecd4cd5487878.tar.xz |
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/memcpy-inline.ll')
-rw-r--r-- | test/CodeGen/ARM/memcpy-inline.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/memcpy-inline.ll b/test/CodeGen/ARM/memcpy-inline.ll new file mode 100644 index 0000000000..665d3acd89 --- /dev/null +++ b/test/CodeGen/ARM/memcpy-inline.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep ldmia +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep ldrb +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep ldrh + + %struct.x = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } +@src = external global %struct.x +@dst = external global %struct.x + +define i32 @t() { +entry: + call void @llvm.memcpy.i32( i8* getelementptr (%struct.x* @dst, i32 0, i32 0), i8* getelementptr (%struct.x* @src, i32 0, i32 0), i32 11, i32 8 ) + ret i32 0 +} + +declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) |