aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-09-27 06:08:12 +0000
committerEric Christopher <echristo@apple.com>2010-09-27 06:08:12 +0000
commitb59abc868b75fdd4310c93603cb71089a7587a92 (patch)
tree292a35740f3f6930e88416889420f72ab4945b12
parent7802e5e2d2d62b32697a6953746e60e2202700d3 (diff)
downloadexternal_llvm-b59abc868b75fdd4310c93603cb71089a7587a92.zip
external_llvm-b59abc868b75fdd4310c93603cb71089a7587a92.tar.gz
external_llvm-b59abc868b75fdd4310c93603cb71089a7587a92.tar.bz2
Insert missing coherency in comment. Add a quick check for hardware
divide support also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114813 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMFastISel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp
index 7d56745..e84989c 100644
--- a/lib/Target/ARM/ARMFastISel.cpp
+++ b/lib/Target/ARM/ARMFastISel.cpp
@@ -1144,9 +1144,13 @@ bool ARMFastISel::SelectSDiv(const Instruction *I) {
const Type *Ty = I->getType();
if (!isTypeLegal(Ty, VT))
return false;
-
- // If we have integer div support we should have gotten already, emit a
- // libcall.
+
+ // If we have integer div support we should have selected this automagically.
+ // In case we have a real miss go ahead and return false and we'll pick
+ // it up later.
+ if (Subtarget->hasDivide()) return false;
+
+ // Otherwise emit a libcall.
RTLIB::Libcall LC = RTLIB::UNKNOWN_LIBCALL;
if (VT == MVT::i16)
LC = RTLIB::SDIV_I16;