llvm.org GIT mirror llvm / 90cfc13
Fix a gross typo: ARMv6+ may or may not support unaligned memory operations. Even if they are suported by the core, they can be disabled (this is just a configuration bit inside some register). Allow unaligned memops on darwin and conservatively disallow them otherwise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94889 91177308-0d34-0410-b5e6-96231b3b80d8 Anton Korobeynikov 10 years ago
2 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
38533853 if (!Subtarget->hasV6Ops())
38543854 // Pre-v6 does not support unaligned mem access.
38553855 return false;
3856 else if (!Subtarget->hasV6Ops()) {
3857 // v6 may or may not support unaligned mem access.
3856 else {
3857 // v6+ may or may not support unaligned mem access depending on the system
3858 // configuration.
3859 // FIXME: This is pretty conservative. Should we provide cmdline option to
3860 // control the behaviour?
38583861 if (!Subtarget->isTargetDarwin())
38593862 return false;
38603863 }
0 ; RUN: llc < %s -march=arm | FileCheck %s -check-prefix=GENERIC
11 ; RUN: llc < %s -mtriple=armv6-apple-darwin | FileCheck %s -check-prefix=DARWIN_V6
2 ; RUN: llc < %s -march=arm -mattr=+v7a | FileCheck %s -check-prefix=V7
2 ; RUN: llc < %s -mtriple=armv6-linux | FileCheck %s -check-prefix=GENERIC
33
44 ; rdar://7113725
55
1919 ; DARWIN_V6: ldr r1
2020 ; DARWIN_V6: str r1
2121
22 ; V7: t:
23 ; V7: ldr r1
24 ; V7: str r1
2522 %__src1.i = bitcast i8* %b to i32* ; [#uses=1]
2623 %__dest2.i = bitcast i8* %a to i32* ; [#uses=1]
2724 %tmp.i = load i32* %__src1.i, align 1 ; [#uses=1]