forked from OSchip/llvm-project
[PowerPC] Allow spilling GPR to VSR on AIX
This patch enables spilling GPR to VSRs instead of stack under AIX ABI. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D97367
This commit is contained in:
parent
543b901e58
commit
72d4a41ba6
|
@ -452,7 +452,7 @@ PPCRegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC,
|
||||||
// For Power9 we allow the user to enable GPR to vector spills.
|
// For Power9 we allow the user to enable GPR to vector spills.
|
||||||
// FIXME: Currently limited to spilling GP8RC. A follow on patch will add
|
// FIXME: Currently limited to spilling GP8RC. A follow on patch will add
|
||||||
// support to spill GPRC.
|
// support to spill GPRC.
|
||||||
if (TM.isELFv2ABI()) {
|
if (TM.isELFv2ABI() || Subtarget.isAIXABI()) {
|
||||||
if (Subtarget.hasP9Vector() && EnableGPRToVecSpills &&
|
if (Subtarget.hasP9Vector() && EnableGPRToVecSpills &&
|
||||||
RC == &PPC::G8RCRegClass) {
|
RC == &PPC::G8RCRegClass) {
|
||||||
InflateGP8RC++;
|
InflateGP8RC++;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu -ppc-enable-gpr-to-vsr-spills < %s | FileCheck %s
|
; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu -ppc-enable-gpr-to-vsr-spills < %s | FileCheck %s
|
||||||
|
; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64-ibm-aix-xcoff -ppc-enable-gpr-to-vsr-spills -vec-extabi < %s | FileCheck %s
|
||||||
|
|
||||||
define signext i32 @foo(i32 signext %a, i32 signext %b) {
|
define signext i32 @foo(i32 signext %a, i32 signext %b) {
|
||||||
entry:
|
entry:
|
||||||
%cmp = icmp slt i32 %a, %b
|
%cmp = icmp slt i32 %a, %b
|
||||||
|
|
Loading…
Reference in New Issue