diff options
| author | Dan Gohman <gohman@apple.com> | 2007-08-27 16:26:13 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2007-08-27 16:26:13 +0000 |
| commit | 8dc0b931515d45366f7044f5a3b7aeb27975bae4 (patch) | |
| tree | cdda2ed8e0c68087a6f92461c25d7f32428bf3da /llvm/test/CodeGen/X86/memmove-0.ll | |
| parent | 71eaf62e5f0b99fb4b25963dc5cdcdd2c222e771 (diff) | |
| download | bcm5719-llvm-8dc0b931515d45366f7044f5a3b7aeb27975bae4.tar.gz bcm5719-llvm-8dc0b931515d45366f7044f5a3b7aeb27975bae4.zip | |
If the source and destination pointers in an llvm.memmove are known
to not alias each other, it can be translated as an llvm.memcpy.
llvm-svn: 41489
Diffstat (limited to 'llvm/test/CodeGen/X86/memmove-0.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/memmove-0.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/memmove-0.ll b/llvm/test/CodeGen/X86/memmove-0.ll new file mode 100644 index 00000000000..4632aaae72f --- /dev/null +++ b/llvm/test/CodeGen/X86/memmove-0.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep {call memcpy} + +declare void @llvm.memmove.i64(i8* %d, i8* %s, i64 %l, i32 %a) + +define void @foo(i8* noalias %d, i8* noalias %s, i64 %l) +{ + call void @llvm.memmove.i64(i8* %d, i8* %s, i64 %l, i32 1) + ret void +} |

