mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
[AArch64] Falkor supports Rounding Double Multiply Add/Subtract instructions.
Falkor only partially implements the ARMv8.1a extensions, so this patch refactors the support for the SQRDML[A|S]H instruction into a separate feature. Differential Revision: https://reviews.llvm.org/D28681 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
064b91fd98
commit
a7959e565a
@ -38,6 +38,9 @@ def FeatureRAS : SubtargetFeature<"ras", "HasRAS", "true",
|
||||
def FeatureLSE : SubtargetFeature<"lse", "HasLSE", "true",
|
||||
"Enable ARMv8.1 Large System Extension (LSE) atomic instructions">;
|
||||
|
||||
def FeatureRDM : SubtargetFeature<"rdm", "HasRDM", "true",
|
||||
"Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions">;
|
||||
|
||||
def FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true",
|
||||
"Enable ARMv8 PMUv3 Performance Monitors extension">;
|
||||
|
||||
@ -114,7 +117,7 @@ def FeatureUseRSqrt : SubtargetFeature<
|
||||
//
|
||||
|
||||
def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
|
||||
"Support ARM v8.1a instructions", [FeatureCRC, FeatureLSE]>;
|
||||
"Support ARM v8.1a instructions", [FeatureCRC, FeatureLSE, FeatureRDM]>;
|
||||
|
||||
def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
|
||||
"Support ARM v8.2a instructions", [HasV8_1aOps, FeatureRAS]>;
|
||||
@ -270,6 +273,7 @@ def ProcFalkor : SubtargetFeature<"falkor", "ARMProcFamily", "Falkor",
|
||||
FeaturePerfMon,
|
||||
FeaturePostRAScheduler,
|
||||
FeaturePredictableSelectIsExpensive,
|
||||
FeatureRDM,
|
||||
FeatureZCZeroing
|
||||
]>;
|
||||
|
||||
|
@ -9060,7 +9060,7 @@ multiclass SIMDLdSt4SingleAliases<string asm> {
|
||||
// AdvSIMD v8.1 Rounding Double Multiply Add/Subtract
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
let Predicates = [HasNEON, HasV8_1a] in {
|
||||
let Predicates = [HasNEON, HasRDM] in {
|
||||
|
||||
class BaseSIMDThreeSameVectorTiedR0<bit Q, bit U, bits<2> size, bits<5> opcode,
|
||||
RegisterOperand regtype, string asm,
|
||||
@ -9221,7 +9221,7 @@ multiclass SIMDIndexedSQRDMLxHSDTied<bit U, bits<4> opc, string asm,
|
||||
let Inst{21} = idx{0};
|
||||
}
|
||||
}
|
||||
} // let Predicates = [HasNeon, HasV8_1a]
|
||||
} // let Predicates = [HasNeon, HasRDM]
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Crypto extensions
|
||||
|
@ -30,6 +30,8 @@ def HasLSE : Predicate<"Subtarget->hasLSE()">,
|
||||
AssemblerPredicate<"FeatureLSE", "lse">;
|
||||
def HasRAS : Predicate<"Subtarget->hasRAS()">,
|
||||
AssemblerPredicate<"FeatureRAS", "ras">;
|
||||
def HasRDM : Predicate<"Subtarget->hasRDM()">,
|
||||
AssemblerPredicate<"FeatureRDM", "rdm">;
|
||||
def HasPerfMon : Predicate<"Subtarget->hasPerfMon()">;
|
||||
def HasFullFP16 : Predicate<"Subtarget->hasFullFP16()">,
|
||||
AssemblerPredicate<"FeatureFullFP16", "fullfp16">;
|
||||
@ -3284,7 +3286,7 @@ defm UQSHL : SIMDThreeScalarBHSD<1, 0b01001, "uqshl", int_aarch64_neon_uqshl>
|
||||
defm UQSUB : SIMDThreeScalarBHSD<1, 0b00101, "uqsub", int_aarch64_neon_uqsub>;
|
||||
defm URSHL : SIMDThreeScalarD< 1, 0b01010, "urshl", int_aarch64_neon_urshl>;
|
||||
defm USHL : SIMDThreeScalarD< 1, 0b01000, "ushl", int_aarch64_neon_ushl>;
|
||||
let Predicates = [HasV8_1a] in {
|
||||
let Predicates = [HasRDM] in {
|
||||
defm SQRDMLAH : SIMDThreeScalarHSTied<1, 0, 0b10000, "sqrdmlah">;
|
||||
defm SQRDMLSH : SIMDThreeScalarHSTied<1, 0, 0b10001, "sqrdmlsh">;
|
||||
def : Pat<(i32 (int_aarch64_neon_sqadd
|
||||
|
@ -61,6 +61,7 @@ protected:
|
||||
bool HasCRC = false;
|
||||
bool HasLSE = false;
|
||||
bool HasRAS = false;
|
||||
bool HasRDM = false;
|
||||
bool HasPerfMon = false;
|
||||
bool HasFullFP16 = false;
|
||||
bool HasSPE = false;
|
||||
@ -183,6 +184,7 @@ public:
|
||||
bool hasCRC() const { return HasCRC; }
|
||||
bool hasLSE() const { return HasLSE; }
|
||||
bool hasRAS() const { return HasRAS; }
|
||||
bool hasRDM() const { return HasRDM; }
|
||||
bool balanceFPOps() const { return BalanceFPOps; }
|
||||
bool predictableSelectIsExpensive() const {
|
||||
return PredictableSelectIsExpensive;
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V8a
|
||||
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+rdm -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a
|
||||
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+v8.1a -aarch64-neon-syntax=generic | FileCheck %s --check-prefix=CHECK-V81a
|
||||
; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-eabi -mattr=+v8.1a -aarch64-neon-syntax=apple | FileCheck %s --check-prefix=CHECK-V81a-apple
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user