diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-03-08 04:04:21 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-03-08 04:04:21 +0000 |
| commit | c009757761544be569ad7112dfa61a9e7b81d339 (patch) | |
| tree | ea000c7dab1e49b67930c91c85b7c5829a85f652 /llvm/test/Transforms/ScalarRepl/vector_memcpy.ll | |
| parent | ec415efb4451acc3b94fd62d8fa7268ef6ddd52a (diff) | |
| download | bcm5719-llvm-c009757761544be569ad7112dfa61a9e7b81d339.tar.gz bcm5719-llvm-c009757761544be569ad7112dfa61a9e7b81d339.zip | |
Enhance SROA to "promote to scalar" allocas which are
memcpy/memmove'd into or out of. This fixes a serious
perf issue that Nate ran into.
llvm-svn: 66366
Diffstat (limited to 'llvm/test/Transforms/ScalarRepl/vector_memcpy.ll')
| -rw-r--r-- | llvm/test/Transforms/ScalarRepl/vector_memcpy.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ScalarRepl/vector_memcpy.ll b/llvm/test/Transforms/ScalarRepl/vector_memcpy.ll new file mode 100644 index 00000000000..dc947b0d715 --- /dev/null +++ b/llvm/test/Transforms/ScalarRepl/vector_memcpy.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep {ret <16 x float> %A} +define <16 x float> @foo(<16 x float> %A) nounwind { + %tmp = alloca <16 x float>, align 16 + %tmp2 = alloca <16 x float>, align 16 + store <16 x float> %A, <16 x float>* %tmp + %s = bitcast <16 x float>* %tmp to i8* + %s2 = bitcast <16 x float>* %tmp2 to i8* + call void @llvm.memcpy.i64(i8* %s2, i8* %s, i64 64, i32 16) + + %R = load <16 x float>* %tmp2 + ret <16 x float> %R +} + +declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind + |

