summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZFrameLowering.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-19 12:42:31 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-19 12:42:31 +0000
commit80f54784da0bd42fb79176bbf447a31d69287fe3 (patch)
treeb20cb02fd15a201dc7f0d31482e031916ad2ab86 /lib/Target/SystemZ/SystemZFrameLowering.cpp
parent2063637fa7c9ebc880cf858674eb45727d4ea295 (diff)
downloadllvm-80f54784da0bd42fb79176bbf447a31d69287fe3.tar.gz
llvm-80f54784da0bd42fb79176bbf447a31d69287fe3.tar.bz2
llvm-80f54784da0bd42fb79176bbf447a31d69287fe3.tar.xz
[SystemZ] Add support for sibling calls
This first cut is pretty conservative. The final argument register (R6) is call-saved, so we would need to make sure that the R6 argument to a sibling call is the same as the R6 argument to the calling function, which seems worth keeping as a separate patch. Saying that integer truncations are free means that we no longer use the extending instructions LGF and LLGF for spills in int-conv-09.ll and int-conv-10.ll. Instead we treat the registers as 64 bits wide and truncate them to 32-bits where necessary. I think it's unlikely we'd use LGF and LLGF for spills in other situations for the same reason, so I'm removing the tests rather than replacing them. The associated code is generic and applies to many more instructions than just LGF and LLGF, so there is no corresponding code removal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZFrameLowering.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZFrameLowering.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Target/SystemZ/SystemZFrameLowering.cpp b/lib/Target/SystemZ/SystemZFrameLowering.cpp
index a58da90172..ed75e28cf9 100644
--- a/lib/Target/SystemZ/SystemZFrameLowering.cpp
+++ b/lib/Target/SystemZ/SystemZFrameLowering.cpp
@@ -420,8 +420,7 @@ void SystemZFrameLowering::emitEpilogue(MachineFunction &MF,
SystemZMachineFunctionInfo *ZFI = MF.getInfo<SystemZMachineFunctionInfo>();
// Skip the return instruction.
- assert(MBBI->getOpcode() == SystemZ::RET &&
- "Can only insert epilogue into returning blocks");
+ assert(MBBI->isReturn() && "Can only insert epilogue into returning blocks");
uint64_t StackSize = getAllocatedStackSize(MF);
if (ZFI->getLowSavedGPR()) {