[PATCH] D19863: [mips][fastisel] ADJCALLSTACKUP has a second immediate operand.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 05:28:24 PDT 2016


dsanders created this revision.
dsanders added a reviewer: sdardis.
dsanders added a subscriber: llvm-commits.
Herald added subscribers: sdardis, dsanders.

It's always zero for SelectionDAG and is never read by the MIPS backend so
do the same for FastISel.

http://reviews.llvm.org/D19863

Files:
  lib/Target/Mips/MipsFastISel.cpp
  test/CodeGen/Mips/Fast-ISel/callabi.ll
  test/CodeGen/Mips/Fast-ISel/memtest1.ll

Index: test/CodeGen/Mips/Fast-ISel/memtest1.ll
===================================================================
--- test/CodeGen/Mips/Fast-ISel/memtest1.ll
+++ test/CodeGen/Mips/Fast-ISel/memtest1.ll
@@ -1,8 +1,8 @@
 ; RUN: llc < %s -march=mipsel -mcpu=mips32 -O0 -relocation-model=pic \
-; RUN:     -fast-isel-abort=1 | FileCheck %s \
+; RUN:     -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s \
 ; RUN:     -check-prefix=ALL -check-prefix=32R1
 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -O0 -relocation-model=pic \
-; RUN:     -fast-isel-abort=1 | FileCheck %s \
+; RUN:     -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s \
 ; RUN:     -check-prefix=ALL -check-prefix=32R2
 
 @str = private unnamed_addr constant [12 x i8] c"hello there\00", align 1
Index: test/CodeGen/Mips/Fast-ISel/callabi.ll
===================================================================
--- test/CodeGen/Mips/Fast-ISel/callabi.ll
+++ test/CodeGen/Mips/Fast-ISel/callabi.ll
@@ -1,8 +1,8 @@
-; RUN: llc -march=mipsel -mcpu=mips32 -O0 \
-; RUN:     -relocation-model=pic -fast-isel-abort=1 < %s | \
+; RUN: llc -march=mipsel -mcpu=mips32 -O0 -relocation-model=pic \
+; RUN:     -fast-isel-abort=1 -verify-machineinstrs < %s | \
 ; RUN:     FileCheck %s -check-prefix=ALL -check-prefix=32R1
-; RUN: llc -march=mipsel -mcpu=mips32r2 -O0 \
-; RUN:     -relocation-model=pic -fast-isel-abort=1 < %s | \
+; RUN: llc -march=mipsel -mcpu=mips32r2 -O0 -relocation-model=pic \
+; RUN:     -fast-isel-abort=1 -verify-machineinstrs < %s | \
 ; RUN:     FileCheck %s -check-prefix=ALL -check-prefix=32R2
 
 declare void @xb(i8)
Index: lib/Target/Mips/MipsFastISel.cpp
===================================================================
--- lib/Target/Mips/MipsFastISel.cpp
+++ lib/Target/Mips/MipsFastISel.cpp
@@ -1208,7 +1208,7 @@
 bool MipsFastISel::finishCall(CallLoweringInfo &CLI, MVT RetVT,
                               unsigned NumBytes) {
   CallingConv::ID CC = CLI.CallConv;
-  emitInst(Mips::ADJCALLSTACKUP).addImm(16);
+  emitInst(Mips::ADJCALLSTACKUP).addImm(16).addImm(0);
   if (RetVT != MVT::isVoid) {
     SmallVector<CCValAssign, 16> RVLocs;
     CCState CCInfo(CC, false, *FuncInfo.MF, RVLocs, *Context);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19863.55976.patch
Type: text/x-patch
Size: 2214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160503/b50e228f/attachment.bin>


More information about the llvm-commits mailing list