summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-11-09 17:29:38 +0000
committerChad Rosier <mcrosier@apple.com>2012-11-09 17:29:38 +0000
commitd054eda44114df411a2749e7b6b85d27509a0af1 (patch)
tree8744edd554eca7b5cdd98a3a285432ae748fea26 /lib/Target/ARM/ARMISelLowering.cpp
parentb754687fd7391213f455ffa52d1bcfbe11052bc0 (diff)
downloadllvm-d054eda44114df411a2749e7b6b85d27509a0af1.tar.gz
llvm-d054eda44114df411a2749e7b6b85d27509a0af1.tar.bz2
llvm-d054eda44114df411a2749e7b6b85d27509a0af1.tar.xz
Add support for -mstrict-align compiler option for ARM targets.
rdar://12340498 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167620 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index 3b9558bc2a..65cc49e1c3 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -9119,7 +9119,8 @@ bool ARMTargetLowering::isDesirableToTransformToIntegerOp(unsigned Opc,
bool ARMTargetLowering::allowsUnalignedMemoryAccesses(EVT VT) const {
// The AllowsUnaliged flag models the SCTLR.A setting in ARM cpus
- bool AllowsUnaligned = Subtarget->allowsUnalignedMem();
+ bool AllowsUnaligned = Subtarget->allowsUnalignedMem() &&
+ !getTargetMachine().Options.StrictAlign;
switch (VT.getSimpleVT().SimpleTy) {
default: