diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-06-17 02:02:03 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-06-17 02:02:03 +0000 |
| commit | 5712c77c89f6941e15398d96317d16302de51a30 (patch) | |
| tree | a87bf036e60cd3595bb65638a3f76aba13e3825c /llvm/lib/Target/ARM/ARMISelLowering.cpp | |
| parent | ba451e80dc13ceaf2c0cd47b6174e3b9c2fcc7d5 (diff) | |
| download | bcm5719-llvm-5712c77c89f6941e15398d96317d16302de51a30.tar.gz bcm5719-llvm-5712c77c89f6941e15398d96317d16302de51a30.zip | |
Thumb1 and any pre-v6 ARM target should use the libcall expansion of
ISD::MEMBARRIER. v7 and v7 ARM mode continue to use the custom lowering.
llvm-svn: 106204
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index d684c057b29..2d963fa9703 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -405,7 +405,12 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM) // doesn't yet know how to not do that for SjLj. setExceptionSelectorRegister(ARM::R0); setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); - setOperationAction(ISD::MEMBARRIER, MVT::Other, Custom); + // Handle atomics directly for ARMv[67] (except for Thumb1), otherwise + // use the default expansion. + TargetLowering::LegalizeAction AtomicAction = + (Subtarget->hasV7Ops() || + (Subtarget->hasV6Ops() && !Subtarget->isThumb1Only())) ? Custom : Expand; + setOperationAction(ISD::MEMBARRIER, MVT::Other, AtomicAction); // If the subtarget does not have extract instructions, sign_extend_inreg // needs to be expanded. Extract is available in ARM mode on v6 and up, |

