diff options
author | James Molloy <james.molloy@arm.com> | 2014-05-16 14:24:22 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2014-05-16 14:24:22 +0000 |
commit | b32cee560d91bb2ec4325ad348ee322a42a3a3cf (patch) | |
tree | 9f76cd48a66c8315b07a5a30a7ebe8798b4d42e3 /test/CodeGen/Thumb | |
parent | 74c8558965cc021a3e320dc778e1edc497bd2491 (diff) | |
download | llvm-b32cee560d91bb2ec4325ad348ee322a42a3a3cf.tar.gz llvm-b32cee560d91bb2ec4325ad348ee322a42a3a3cf.tar.bz2 llvm-b32cee560d91bb2ec4325ad348ee322a42a3a3cf.tar.xz |
Re-enable inline memcpy expansion for Thumb1.
Patch by Moritz Roth!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb')
-rw-r--r-- | test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll b/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll new file mode 100644 index 0000000000..06cfd9bbef --- /dev/null +++ b/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll @@ -0,0 +1,37 @@ +; RUN: llc -mtriple=thumbv6m-eabi %s -o - | FileCheck %s + +@d = external global [64 x i32] +@s = external global [64 x i32] + +; Function Attrs: nounwind +define void @t1() #0 { +entry: +; CHECK: ldr [[REG0:r[0-9]]], +; CHECK: ldm [[REG0]]!, +; CHECK: ldr [[REG1:r[0-9]]], +; CHECK: stm [[REG1]]!, +; CHECK: subs [[REG0]], #32 +; CHECK-NEXT: ldrb +; CHECK: subs [[REG1]], #32 +; CHECK-NEXT: strb + tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([64 x i32]* @s to i8*), i8* bitcast ([64 x i32]* @d to i8*), i32 33, i32 4, i1 false) + ret void +} + +; Function Attrs: nounwind +define void @t2() #0 { +entry: +; CHECK: ldr [[REG0:r[0-9]]], +; CHECK: ldm [[REG0]]!, +; CHECK: ldr [[REG1:r[0-9]]], +; CHECK: stm [[REG1]]!, +; CHECK: ldrh +; CHECK: ldrb +; CHECK: strb +; CHECK: strh + tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([64 x i32]* @s to i8*), i8* bitcast ([64 x i32]* @d to i8*), i32 15, i32 4, i1 false) + ret void +} + +; Function Attrs: nounwind +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) #1 |