[PATCH] D11515: [mips][FastISel] Fix call lowering by bailing out on "fastcc" calls.
Vasileios Kalintiris
Vasileios.Kalintiris at imgtec.com
Tue Jul 28 14:44:07 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL243485: [mips][FastISel] Fix call lowering by bailing out on "fastcc" calls. (authored by vkalintiris).
Changed prior to commit:
http://reviews.llvm.org/D11515?vs=30663&id=30859#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11515
Files:
llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
llvm/trunk/test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll
Index: llvm/trunk/test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll
===================================================================
--- llvm/trunk/test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll
+++ llvm/trunk/test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll
@@ -0,0 +1,16 @@
+; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -O0 -relocation-model=pic \
+; RUN: -fast-isel=true -mips-fast-isel -fast-isel-verbose 2>&1 | \
+; RUN: FileCheck %s
+
+; CHECK: FastISel missed call:
+; CHECK-SAME: %call = call fastcc i32 @foo(i32 signext %a, i32 signext %b)
+
+define internal i32 @bar(i32 signext %a, i32 signext %b) {
+ %s = and i32 %a, %b
+ ret i32 %s
+}
+
+define i32 @foo(i32 signext %a, i32 signext %b) {
+ %call = call fastcc i32 @foo(i32 signext %a, i32 signext %b)
+ ret i32 %call
+}
Index: llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
===================================================================
--- llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
+++ llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
@@ -1245,6 +1245,10 @@
const Value *Callee = CLI.Callee;
MCSymbol *Symbol = CLI.Symbol;
+ // Do not handle FastCC.
+ if (CC == CallingConv::Fast)
+ return false;
+
// Allow SelectionDAG isel to handle tail calls.
if (IsTailCall)
return false;
@@ -1422,6 +1426,11 @@
if (Ret->getNumOperands() > 0) {
CallingConv::ID CC = F.getCallingConv();
+
+ // Do not handle FastCC.
+ if (CC == CallingConv::Fast)
+ return false;
+
SmallVector<ISD::OutputArg, 4> Outs;
GetReturnInfo(F.getReturnType(), F.getAttributes(), Outs, TLI, DL);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11515.30859.patch
Type: text/x-patch
Size: 1580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150728/83c5f504/attachment.bin>
More information about the llvm-commits
mailing list