summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-01-30 14:08:12 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-01-30 14:08:12 +0000
commit25df248382fb4cca50f2a28aeee760c0787da617 (patch)
tree5c2a2895e6c1ab2924dcc961b31970c7eb111e62 /llvm/lib/Target/ARM/ARMISelLowering.cpp
parenta87bdb793ec3f2f14fc2ca441851c0387bbeec35 (diff)
downloadbcm5719-llvm-25df248382fb4cca50f2a28aeee760c0787da617.tar.gz
bcm5719-llvm-25df248382fb4cca50f2a28aeee760c0787da617.zip
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. llvm-svn: 94889
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 59c198cb1e3..3e42be3132f 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -3854,8 +3854,11 @@ bool ARMTargetLowering::allowsUnalignedMemoryAccesses(EVT VT) const {
if (!Subtarget->hasV6Ops())
// Pre-v6 does not support unaligned mem access.
return false;
- else if (!Subtarget->hasV6Ops()) {
- // v6 may or may not support unaligned mem access.
+ else {
+ // v6+ may or may not support unaligned mem access depending on the system
+ // configuration.
+ // FIXME: This is pretty conservative. Should we provide cmdline option to
+ // control the behaviour?
if (!Subtarget->isTargetDarwin())
return false;
}
OpenPOWER on IntegriCloud