llvm.org GIT mirror llvm / dc99a4f
Merging r243485: ------------------------------------------------------------------------ r243485 | vkalintiris | 2015-07-28 14:43:31 -0700 (Tue, 28 Jul 2015) | 12 lines [mips][FastISel] Fix call lowering by bailing out on "fastcc" calls. Summary: Currently, we support only the MIPS O32 ABI calling convention for call lowering. With this change we avoid using the O32 calling convetion for lowering calls marked as using the fast calling convention. Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11515 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243647 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
2 changed file(s) with 25 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
12441244 const Value *Callee = CLI.Callee;
12451245 MCSymbol *Symbol = CLI.Symbol;
12461246
1247 // Do not handle FastCC.
1248 if (CC == CallingConv::Fast)
1249 return false;
1250
12471251 // Allow SelectionDAG isel to handle tail calls.
12481252 if (IsTailCall)
12491253 return false;
14211425
14221426 if (Ret->getNumOperands() > 0) {
14231427 CallingConv::ID CC = F.getCallingConv();
1428
1429 // Do not handle FastCC.
1430 if (CC == CallingConv::Fast)
1431 return false;
1432
14241433 SmallVector Outs;
14251434 GetReturnInfo(F.getReturnType(), F.getAttributes(), Outs, TLI, DL);
14261435
0 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -O0 -relocation-model=pic \
1 ; RUN: -fast-isel=true -mips-fast-isel -fast-isel-verbose 2>&1 | \
2 ; RUN: FileCheck %s
3
4 ; CHECK: FastISel missed call:
5 ; CHECK-SAME: %call = call fastcc i32 @foo(i32 signext %a, i32 signext %b)
6
7 define internal i32 @bar(i32 signext %a, i32 signext %b) {
8 %s = and i32 %a, %b
9 ret i32 %s
10 }
11
12 define i32 @foo(i32 signext %a, i32 signext %b) {
13 %call = call fastcc i32 @foo(i32 signext %a, i32 signext %b)
14 ret i32 %call
15 }