llvm.org GIT mirror llvm / c857894
Remove -use-divmod-libcall. Let targets opt in when they are available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129884 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 9 years ago
5 changed file(s) with 5 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
156156 /// wth earlier copy coalescing.
157157 extern bool StrongPHIElim;
158158
159 /// HasDivModLibcall - This flag indicates whether the target compiler
160 /// runtime library has integer divmod libcalls.
161 extern bool HasDivModLibcall;
162
163159 /// getTrapFunctionName - If this returns a non-empty string, this means isel
164160 /// should lower Intrinsic::trap to a call to the specified function name
165161 /// instead of an ISD::TRAP node.
397397 setLibcallCallingConv(RTLIB::UDIV_I32, CallingConv::ARM_AAPCS);
398398 }
399399
400 if (HasDivModLibcall) {
400 // Use divmod iOS compiler-rt calls.
401 if (Subtarget->getTargetTriple().getOS() == Triple::IOS) {
401402 setLibcallName(RTLIB::SDIVREM_I32, "__divmodsi4");
402403 setLibcallName(RTLIB::UDIVREM_I32, "__udivmodsi4");
403404 }
200200 bool hasFP16() const { return HasFP16; }
201201 bool hasD16() const { return HasD16; }
202202
203 const Triple &getTargetTriple() const { return TargetTriple; }
204
203205 bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
204206 bool isTargetELF() const { return !isTargetDarwin(); }
205207
205205 cl::desc("Use strong PHI elimination."),
206206 cl::location(StrongPHIElim),
207207 cl::init(false));
208 static cl::opt
209 UseDivMod("use-divmod-libcall",
210 cl::desc("Use __{u}divmod libcalls for div / rem pairs"),
211 cl::location(HasDivModLibcall),
212 cl::init(false));
213208 static cl::opt
214209 TrapFuncName("trap-func", cl::Hidden,
215210 cl::desc("Emit a call to trap function rather than a trap instruction"),
None ; RUN: llc < %s -mtriple=arm-apple-darwin -use-divmod-libcall | FileCheck %s
0 ; RUN: llc < %s -mtriple=arm-apple-ios | FileCheck %s
11
22 define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
33 entry: