/// wth earlier copy coalescing.
extern bool StrongPHIElim;
+ /// HasDivModLibcall - This flag indicates whether the target compiler
+ /// runtime library has integer divmod libcalls.
+ extern bool HasDivModLibcall;
+
} // End llvm namespace
#endif
cl::desc("Enable / disable ARM interworking (for debugging only)"),
cl::init(true));
-static cl::opt<bool>
-UseDivMod("arm-divmod-libcall", cl::Hidden,
- cl::desc("Use __{u}divmod libcalls for div / rem pairs"),
- cl::init(false));
-
void ARMTargetLowering::addTypeForNEON(EVT VT, EVT PromotedLdStVT,
EVT PromotedBitwiseVT) {
if (VT != PromotedLdStVT) {
setLibcallCallingConv(RTLIB::UDIV_I32, CallingConv::ARM_AAPCS);
}
- if (UseDivMod) {
+ if (HasDivModLibcall) {
setLibcallName(RTLIB::SDIVREM_I32, "__divmodsi4");
setLibcallName(RTLIB::UDIVREM_I32, "__udivmodsi4");
}
bool RealignStack;
bool DisableJumpTables;
bool StrongPHIElim;
+ bool HasDivModLibcall;
bool AsmVerbosityDefault(false);
}
cl::desc("Use strong PHI elimination."),
cl::location(StrongPHIElim),
cl::init(false));
+static cl::opt<bool, true>
+UseDivMod("use-divmod-libcall",
+ cl::desc("Use __{u}divmod libcalls for div / rem pairs"),
+ cl::location(HasDivModLibcall),
+ cl::init(false));
static cl::opt<bool>
DataSections("fdata-sections",
cl::desc("Emit data into separate sections"),
-; RUN: llc < %s -mtriple=arm-apple-darwin -arm-divmod-libcall | FileCheck %s
+; RUN: llc < %s -mtriple=arm-apple-darwin -use-divmod-libcall | FileCheck %s
define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
entry: