summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-09-29 21:43:49 +0000
committerBob Wilson <bob.wilson@apple.com>2012-09-29 21:43:49 +0000
commiteb1641d54a7eda7717304bc4d55d059208d8ebed (patch)
tree91e463fd0509b2545b7bde7aac893736e625a5e6 /lib/Target/ARM/ARMISelLowering.cpp
parent154418cdd82b3d8dcf23efd65f5647833e43bc45 (diff)
downloadllvm-eb1641d54a7eda7717304bc4d55d059208d8ebed.tar.gz
llvm-eb1641d54a7eda7717304bc4d55d059208d8ebed.tar.bz2
llvm-eb1641d54a7eda7717304bc4d55d059208d8ebed.tar.xz
Add LLVM support for Swift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index f8455a4b0e..8ff48216d9 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -635,9 +635,9 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
if (!Subtarget->hasV6Ops())
setOperationAction(ISD::BSWAP, MVT::i32, Expand);
- // These are expanded into libcalls.
- if (!Subtarget->hasDivide() || !Subtarget->isThumb2()) {
- // v7M has a hardware divider
+ if (!(Subtarget->hasDivide() && Subtarget->isThumb2()) &&
+ !(Subtarget->hasDivideInARMMode() && !Subtarget->isThumb())) {
+ // These are expanded into libcalls if the cpu doesn't have HW divider.
setOperationAction(ISD::SDIV, MVT::i32, Expand);
setOperationAction(ISD::UDIV, MVT::i32, Expand);
}