mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[PowerPC] Add clang options to control MMA support
This patch adds frontend and backend options to enable and disable the PowerPC MMA operations added in ISA 3.1. Instructions using these options will be added in subsequent patches. Differential Revision: https://reviews.llvm.org/D81442
This commit is contained in:
parent
7a35eee5d4
commit
5f9d8eb8f8
@ -238,6 +238,10 @@ def FeaturePairedVectorMemops:
|
||||
SubtargetFeature<"paired-vector-memops", "PairedVectorMemops", "true",
|
||||
"32Byte load and store instructions",
|
||||
[FeatureISA3_0]>;
|
||||
def FeatureMMA : SubtargetFeature<"mma", "HasMMA", "true",
|
||||
"Enable MMA instructions",
|
||||
[FeatureP8Vector, FeatureP9Altivec,
|
||||
FeaturePairedVectorMemops]>;
|
||||
|
||||
def FeaturePredictableSelectIsExpensive :
|
||||
SubtargetFeature<"predictable-select-expensive",
|
||||
@ -343,7 +347,8 @@ def ProcessorFeatures {
|
||||
// still exist with the exception of those we know are Power9 specific.
|
||||
list<SubtargetFeature> P10AdditionalFeatures =
|
||||
[DirectivePwr10, FeatureISA3_1, FeaturePrefixInstrs,
|
||||
FeaturePCRelativeMemops, FeatureP10Vector, FeaturePairedVectorMemops];
|
||||
FeaturePCRelativeMemops, FeatureP10Vector, FeatureMMA,
|
||||
FeaturePairedVectorMemops];
|
||||
list<SubtargetFeature> P10SpecificFeatures = [];
|
||||
list<SubtargetFeature> P10InheritableFeatures =
|
||||
!listconcat(P9InheritableFeatures, P10AdditionalFeatures);
|
||||
|
@ -504,6 +504,7 @@ multiclass 8LS_DForm_R_SI34_XT6_RA5_p<bits<5> opcode, dag OOL, dag IOL,
|
||||
def PrefixInstrs : Predicate<"Subtarget->hasPrefixInstrs()">;
|
||||
def IsISA3_1 : Predicate<"Subtarget->isISA3_1()">;
|
||||
def PairedVectorMemops : Predicate<"PPCSubTarget->pairedVectorMemops()">;
|
||||
def MMA : Predicate<"PPCSubTarget->hasMMA()">;
|
||||
|
||||
let Predicates = [PrefixInstrs] in {
|
||||
let Interpretation64Bit = 1, isCodeGenOnly = 1 in {
|
||||
|
@ -41,9 +41,9 @@ def P9Model : SchedMachineModel {
|
||||
let CompleteModel = 1;
|
||||
|
||||
// Do not support SPE (Signal Processing Engine), prefixed instructions on
|
||||
// Power 9, paired vector mem ops, PC relative mem ops, or instructions
|
||||
// Power 9, paired vector mem ops, MMA, PC relative mem ops, or instructions
|
||||
// introduced in ISA 3.1.
|
||||
let UnsupportedFeatures = [HasSPE, PrefixInstrs, PairedVectorMemops,
|
||||
let UnsupportedFeatures = [HasSPE, PrefixInstrs, PairedVectorMemops, MMA,
|
||||
PCRelativeMemops, IsISA3_1];
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,7 @@ void PPCSubtarget::initializeEnvironment() {
|
||||
HasP8Crypto = false;
|
||||
HasP9Vector = false;
|
||||
HasP9Altivec = false;
|
||||
HasMMA = false;
|
||||
HasP10Vector = false;
|
||||
HasPrefixInstrs = false;
|
||||
HasPCRelativeMemops = false;
|
||||
|
@ -107,6 +107,7 @@ protected:
|
||||
bool HasP10Vector;
|
||||
bool HasPrefixInstrs;
|
||||
bool HasPCRelativeMemops;
|
||||
bool HasMMA;
|
||||
bool HasFCPSGN;
|
||||
bool HasFSQRT;
|
||||
bool HasFRE, HasFRES, HasFRSQRTE, HasFRSQRTES;
|
||||
@ -260,6 +261,7 @@ public:
|
||||
bool hasP10Vector() const { return HasP10Vector; }
|
||||
bool hasPrefixInstrs() const { return HasPrefixInstrs; }
|
||||
bool hasPCRelativeMemops() const { return HasPCRelativeMemops; }
|
||||
bool hasMMA() const { return HasMMA; }
|
||||
bool pairedVectorMemops() const { return PairedVectorMemops; }
|
||||
bool hasMFOCRF() const { return HasMFOCRF; }
|
||||
bool hasISEL() const { return HasISEL; }
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: llc -mattr=pcrelative-memops,prefix-instrs,paired-vector-memops \
|
||||
; RUN: llc -mattr=pcrelative-memops,prefix-instrs,paired-vector-memops,mma \
|
||||
; RUN: -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
|
||||
; RUN: -ppc-asm-full-reg-names %s -o - 2>&1 | FileCheck %s
|
||||
; RUN: llc -mattr=pcrelative-memops,prefix-instrs,paired-vector-memops \
|
||||
; RUN: llc -mattr=pcrelative-memops,prefix-instrs,paired-vector-memops,mma \
|
||||
; RUN: -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \
|
||||
; RUN: -ppc-asm-full-reg-names %s -o - 2>&1 | FileCheck %s
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user