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 | 1f2dd35898a17025a7410a9c4ef4fe1bf45a4e31 (patch) | |
tree | a97da09d3605f173e85a070d7eab9c3160a78d77 /llvm/test/CodeGen/ARM/memcpy-inline.ll | |
parent | 6eafb030f018c392b1b49ddd109bf31bf18035fc (diff) | |
download | bcm5719-llvm-1f2dd35898a17025a7410a9c4ef4fe1bf45a4e31.tar.gz bcm5719-llvm-1f2dd35898a17025a7410a9c4ef4fe1bf45a4e31.zip |
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
llvm-svn: 43234
Diffstat (limited to 'llvm/test/CodeGen/ARM/memcpy-inline.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/memcpy-inline.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/memcpy-inline.ll b/llvm/test/CodeGen/ARM/memcpy-inline.ll new file mode 100644 index 00000000000..665d3acd89d --- /dev/null +++ b/llvm/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) |