Skip to content

Commit f48cb9c

Browse files
committed
Rename HasNEONorSME to HasNEONAndIsStreamingSafe
1 parent 4a33a6f commit f48cb9c

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,11 @@ def HasSMEF16F16orSMEF8F16
234234
AssemblerPredicateWithAll<(any_of FeatureSMEF16F16, FeatureSMEF8F16),
235235
"sme-f16f16 or sme-f8f16">;
236236

237-
// A subset of NEON instructions are legal in Streaming SVE execution mode.
238-
def HasNEONorSME : Predicate<"Subtarget->hasNEON()">,
239-
AssemblerPredicateWithAll<(any_of FeatureNEON), "neon">;
237+
// A subset of NEON instructions are legal in Streaming SVE execution mode,
238+
// so don't need the additional check for 'isStreamingAvailable'.
239+
def HasNEONAndIsStreamingSafe
240+
: Predicate<"Subtarget->hasNEON()">,
241+
AssemblerPredicateWithAll<(any_of FeatureNEON), "neon">;
240242
def HasRCPC : Predicate<"Subtarget->hasRCPC()">,
241243
AssemblerPredicateWithAll<(all_of FeatureRCPC), "rcpc">;
242244
def HasAltNZCV : Predicate<"Subtarget->hasAlternativeNZCV()">,
@@ -1345,7 +1347,7 @@ def : Pat<(v2f32 (int_aarch64_neon_bfdot
13451347
VectorIndexS:$idx)>;
13461348
}
13471349

1348-
let Predicates = [HasNEONorSME, HasBF16] in {
1350+
let Predicates = [HasNEONAndIsStreamingSafe, HasBF16] in {
13491351
def BFCVT : BF16ToSinglePrecision<"bfcvt">;
13501352
// Round FP32 to BF16.
13511353
def : Pat<(bf16 (any_fpround (f32 FPR32:$Rn))), (BFCVT $Rn)>;
@@ -5784,9 +5786,9 @@ defm FACGT : SIMDThreeScalarFPCmp<1, 1, 0b101, "facgt",
57845786
defm FCMEQ : SIMDThreeScalarFPCmp<0, 0, 0b100, "fcmeq", AArch64fcmeq>;
57855787
defm FCMGE : SIMDThreeScalarFPCmp<1, 0, 0b100, "fcmge", AArch64fcmge>;
57865788
defm FCMGT : SIMDThreeScalarFPCmp<1, 1, 0b100, "fcmgt", AArch64fcmgt>;
5787-
defm FMULX : SIMDFPThreeScalar<0, 0, 0b011, "fmulx", int_aarch64_neon_fmulx, HasNEONorSME>;
5788-
defm FRECPS : SIMDFPThreeScalar<0, 0, 0b111, "frecps", int_aarch64_neon_frecps, HasNEONorSME>;
5789-
defm FRSQRTS : SIMDFPThreeScalar<0, 1, 0b111, "frsqrts", int_aarch64_neon_frsqrts, HasNEONorSME>;
5789+
defm FMULX : SIMDFPThreeScalar<0, 0, 0b011, "fmulx", int_aarch64_neon_fmulx, HasNEONAndIsStreamingSafe>;
5790+
defm FRECPS : SIMDFPThreeScalar<0, 0, 0b111, "frecps", int_aarch64_neon_frecps, HasNEONAndIsStreamingSafe>;
5791+
defm FRSQRTS : SIMDFPThreeScalar<0, 1, 0b111, "frsqrts", int_aarch64_neon_frsqrts, HasNEONAndIsStreamingSafe>;
57905792
defm SQADD : SIMDThreeScalarBHSD<0, 0b00001, "sqadd", int_aarch64_neon_sqadd>;
57915793
defm SQDMULH : SIMDThreeScalarHS< 0, 0b10110, "sqdmulh", int_aarch64_neon_sqdmulh>;
57925794
defm SQRDMULH : SIMDThreeScalarHS< 1, 0b10110, "sqrdmulh", int_aarch64_neon_sqrdmulh>;
@@ -5815,7 +5817,7 @@ let Predicates = [HasRDM] in {
58155817

58165818
defm : FMULScalarFromIndexedLane0Patterns<"FMULX", "16", "32", "64",
58175819
int_aarch64_neon_fmulx,
5818-
[HasNEONorSME]>;
5820+
[HasNEONAndIsStreamingSafe]>;
58195821

58205822
let Predicates = [HasNEON] in {
58215823
def : InstAlias<"cmls $dst, $src1, $src2",
@@ -5889,9 +5891,9 @@ defm FCVTPU : SIMDFPTwoScalar< 1, 1, 0b11010, "fcvtpu">;
58895891
def FCVTXNv1i64 : SIMDInexactCvtTwoScalar<0b10110, "fcvtxn">;
58905892
defm FCVTZS : SIMDFPTwoScalar< 0, 1, 0b11011, "fcvtzs">;
58915893
defm FCVTZU : SIMDFPTwoScalar< 1, 1, 0b11011, "fcvtzu">;
5892-
defm FRECPE : SIMDFPTwoScalar< 0, 1, 0b11101, "frecpe", HasNEONorSME>;
5893-
defm FRECPX : SIMDFPTwoScalar< 0, 1, 0b11111, "frecpx", HasNEONorSME>;
5894-
defm FRSQRTE : SIMDFPTwoScalar< 1, 1, 0b11101, "frsqrte", HasNEONorSME>;
5894+
defm FRECPE : SIMDFPTwoScalar< 0, 1, 0b11101, "frecpe", HasNEONAndIsStreamingSafe>;
5895+
defm FRECPX : SIMDFPTwoScalar< 0, 1, 0b11111, "frecpx", HasNEONAndIsStreamingSafe>;
5896+
defm FRSQRTE : SIMDFPTwoScalar< 1, 1, 0b11101, "frsqrte", HasNEONAndIsStreamingSafe>;
58955897
defm NEG : SIMDTwoScalarD< 1, 0b01011, "neg",
58965898
UnOpFrag<(sub immAllZerosV, node:$LHS)> >;
58975899
defm SCVTF : SIMDFPTwoScalarCVT< 0, 0, 0b11101, "scvtf", AArch64sitof>;
@@ -5910,7 +5912,7 @@ def : Pat<(v1i64 (AArch64vashr (v1i64 V64:$Rn), (i32 63))),
59105912
(CMLTv1i64rz V64:$Rn)>;
59115913

59125914
// Round FP64 to BF16.
5913-
let Predicates = [HasNEONorSME, HasBF16] in
5915+
let Predicates = [HasNEONAndIsStreamingSafe, HasBF16] in
59145916
def : Pat<(bf16 (any_fpround (f64 FPR64:$Rn))),
59155917
(BFCVT (FCVTXNv1i64 $Rn))>;
59165918

@@ -6011,7 +6013,7 @@ def : Pat<(v2f64 (AArch64frsqrts (v2f64 FPR128:$Rn), (v2f64 FPR128:$Rm))),
60116013
// Some float -> int -> float conversion patterns for which we want to keep the
60126014
// int values in FP registers using the corresponding NEON instructions to
60136015
// avoid more costly int <-> fp register transfers.
6014-
let Predicates = [HasNEONorSME] in {
6016+
let Predicates = [HasNEONAndIsStreamingSafe] in {
60156017
def : Pat<(f64 (any_sint_to_fp (i64 (any_fp_to_sint f64:$Rn)))),
60166018
(SCVTFv1i64 (i64 (FCVTZSv1i64 f64:$Rn)))>;
60176019
def : Pat<(f32 (any_sint_to_fp (i32 (any_fp_to_sint f32:$Rn)))),

0 commit comments

Comments
 (0)