diff options
-rw-r--r-- | lib/Target/ARM/ARMFastISel.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 7d56745d1b..e84989c10b 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; |