diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-04-25 00:26:43 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-04-25 00:26:43 +0000 |
commit | 38d3c521695ae2dd1331789915055a50974f01f0 (patch) | |
tree | 71c4f16a49651bc2a6f734e3374c1ec03829fa5c /test | |
parent | 8e3b951f79ecdd63729804b66dcde2660c00c4f9 (diff) | |
download | external_llvm-38d3c521695ae2dd1331789915055a50974f01f0.zip external_llvm-38d3c521695ae2dd1331789915055a50974f01f0.tar.gz external_llvm-38d3c521695ae2dd1331789915055a50974f01f0.tar.bz2 |
Fix bug in x86 memcpy / memset lowering. If there are trailing bytes not handled by rep instructions, a new memcpy / memset is introduced for them. However, since source / destination addresses are already adjusted, their offsets should be zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/2008-04-24-MemCpyBug.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-04-24-MemCpyBug.ll b/test/CodeGen/X86/2008-04-24-MemCpyBug.ll new file mode 100644 index 0000000..09fdc70 --- /dev/null +++ b/test/CodeGen/X86/2008-04-24-MemCpyBug.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | llc -march=x86 | not grep 120 +; Don't accidentally add the offset twice for trailing bytes. + + %struct.S63 = type { [63 x i8] } +@g1s63 = external global %struct.S63 ; <%struct.S63*> [#uses=1] + +declare void @test63(%struct.S63* byval align 4 ) nounwind + +define void @testit63_entry_2E_ce() nounwind { + tail call void @test63( %struct.S63* byval align 4 @g1s63 ) nounwind + ret void +} |