[llvm] 28ae196 - Revert "[AIX] Return the correct set of callee saved regs"

David Tenty via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 10:07:23 PDT 2020


Author: David Tenty
Date: 2020-04-20T13:06:37-04:00
New Revision: 28ae1969dc9de081d2dc097b88b335751f9c4d9d

URL: https://github.com/llvm/llvm-project/commit/28ae1969dc9de081d2dc097b88b335751f9c4d9d
DIFF: https://github.com/llvm/llvm-project/commit/28ae1969dc9de081d2dc097b88b335751f9c4d9d.diff

LOG: Revert "[AIX] Return the correct set of callee saved regs"

This reverts commit 6c881bf1fec2288907cd87a7895c863243bba7c5.

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp

Removed: 
    llvm/test/CodeGen/PowerPC/aix-calleesavedregs.ll


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
index 3a1d124a0d9d..ae1aa66acc3a 100644
--- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -142,8 +142,6 @@ const MCPhysReg*
 PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
   const PPCSubtarget &Subtarget = MF->getSubtarget<PPCSubtarget>();
   if (MF->getFunction().getCallingConv() == CallingConv::AnyReg) {
-    if (!TM.isPPC64() && Subtarget.isAIXABI())
-      report_fatal_error("AnyReg unimplemented on 32-bit AIX.");
     if (Subtarget.hasVSX())
       return CSR_64_AllRegs_VSX_SaveList;
     if (Subtarget.hasAltivec())
@@ -151,11 +149,8 @@ PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
     return CSR_64_AllRegs_SaveList;
   }
 
-  if (TM.isPPC64() && MF->getInfo<PPCFunctionInfo>()->isSplitCSR()) {
-    if (Subtarget.isAIXABI())
-      report_fatal_error("SplitCSR unimplemented on AIX.");
+  if (TM.isPPC64() && MF->getInfo<PPCFunctionInfo>()->isSplitCSR())
     return CSR_SRV464_TLS_PE_SaveList;
-  }
 
   // On PPC64, we might need to save r2 (but only if it is not reserved).
   // We do not need to treat R2 as callee-saved when using PC-Relative calls
@@ -169,8 +164,6 @@ PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
 
   // Cold calling convention CSRs.
   if (MF->getFunction().getCallingConv() == CallingConv::Cold) {
-    if (Subtarget.isAIXABI())
-      report_fatal_error("Cold calling unimplemented on AIX.");
     if (TM.isPPC64()) {
       if (Subtarget.hasAltivec())
         return SaveR2 ? CSR_SVR64_ColdCC_R2_Altivec_SaveList
@@ -193,8 +186,6 @@ PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
     return SaveR2 ? CSR_PPC64_R2_SaveList : CSR_PPC64_SaveList;
   }
   // 32-bit targets.
-  if (Subtarget.isAIXABI())
-    return CSR_AIX32_SaveList;
   if (Subtarget.hasAltivec())
     return CSR_SVR432_Altivec_SaveList;
   else if (Subtarget.hasSPE())

diff  --git a/llvm/test/CodeGen/PowerPC/aix-calleesavedregs.ll b/llvm/test/CodeGen/PowerPC/aix-calleesavedregs.ll
deleted file mode 100644
index e0826b503129..000000000000
--- a/llvm/test/CodeGen/PowerPC/aix-calleesavedregs.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \
-; RUN:  -mtriple powerpc-ibm-aix-xcoff -O0 < %s | \
-; RUN: FileCheck --check-prefixes=CHECK %s
-
-define void @usethirteen() {
-    call void asm "nop", "~{r13}"()
-    ret void
-}
-
-; CHECK: stw 13, -4(1)
-; CHECK: lwz 13, -4(1)


        


More information about the llvm-commits mailing list