summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/memcpy-inline.ll
diff options
context:
space:
mode:
authorJohn Brawn <john.brawn@arm.com>2017-05-26 13:59:12 +0000
committerJohn Brawn <john.brawn@arm.com>2017-05-26 13:59:12 +0000
commit9009d2905debfc210859e5d20a1fb3ec319a9ce7 (patch)
tree93ad3b86753bdbce6d9657acf75739ae0d92f12d /llvm/test/CodeGen/ARM/memcpy-inline.ll
parentba9d8ba82aab927dd8e132c947cd64efff4e09d1 (diff)
downloadbcm5719-llvm-9009d2905debfc210859e5d20a1fb3ec319a9ce7.tar.gz
bcm5719-llvm-9009d2905debfc210859e5d20a1fb3ec319a9ce7.zip
[ARM] Fix lowering of misaligned memcpy/memset
Currently getOptimalMemOpType returns i32 for large enough sizes without checking for alignment, leading to poor code generation when misaligned accesses aren't permitted as we generate a word store then later split it up into byte stores. This means we inadvertantly go over the MaxStoresPerMemcpy limit and for memset we splat the memset value into a word then immediately split it up again. Fix this by leaving it up to FindOptimalMemOpLowering to figure out which type to use, but also fix a bug there where it wasn't correctly checking if misaligned memory accesses are allowed. Differential Revision: https://reviews.llvm.org/D33442 llvm-svn: 303990
Diffstat (limited to 'llvm/test/CodeGen/ARM/memcpy-inline.ll')
-rw-r--r--llvm/test/CodeGen/ARM/memcpy-inline.ll5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/ARM/memcpy-inline.ll b/llvm/test/CodeGen/ARM/memcpy-inline.ll
index 436e49b9f39..b447497b270 100644
--- a/llvm/test/CodeGen/ARM/memcpy-inline.ll
+++ b/llvm/test/CodeGen/ARM/memcpy-inline.ll
@@ -95,10 +95,7 @@ entry:
; CHECK: movt [[REG7:r[0-9]+]], #22866
; CHECK: str [[REG7]]
; CHECK-T1-LABEL: t5:
-; CHECK-T1: movs [[TREG3:r[0-9]]],
-; CHECK-T1: strb [[TREG3]],
-; CHECK-T1: movs [[TREG4:r[0-9]]],
-; CHECK-T1: strb [[TREG4]],
+; CHECK-T1: bl _memcpy
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str5, i64 0, i64 0), i64 7, i32 1, i1 false)
ret void
}
OpenPOWER on IntegriCloud