Skip to content

Commit 4ffec2e

Browse files
committed
Removed GlobalISel; added comments
1 parent 14425ed commit 4ffec2e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,16 +1115,12 @@ let RecomputePerFunction = 1 in {
11151115
def SLSBLRMitigation : Predicate<[{ MF->getSubtarget<AArch64Subtarget>().hardenSlsBlr() }]>;
11161116
def NoSLSBLRMitigation : Predicate<[{ !MF->getSubtarget<AArch64Subtarget>().hardenSlsBlr() }]>;
11171117

1118-
defvar GISelLegalizedCheck = "(!MF->getProperties().hasProperty(MachineFunctionProperties::Property::FailedISel) && MF->getProperties().hasProperty(MachineFunctionProperties::Property::Legalized))";
1119-
// Toggles patterns which are not used by SelectionDAG to reduce its
1120-
// match table/so as not to interfere with it.
1121-
def OnlyGISel : Predicate<GISelLegalizedCheck>;
11221118
// Toggles patterns which aren't beneficial in GlobalISel when we aren't
11231119
// optimizing. This allows us to selectively use patterns without impacting
11241120
// SelectionDAG's behaviour.
11251121
// FIXME: One day there will probably be a nicer way to check for this, but
11261122
// today is not that day.
1127-
def OptimizedGISelOrOtherSelector : Predicate<!strconcat("!MF->getFunction().hasOptNone() || !", GISelLegalizedCheck)>;
1123+
def OptimizedGISelOrOtherSelector : Predicate<"!MF->getFunction().hasOptNone() || MF->getProperties().hasProperty(MachineFunctionProperties::Property::FailedISel) || !MF->getProperties().hasProperty(MachineFunctionProperties::Property::Legalized)">;
11281124
}
11291125

11301126
include "AArch64InstrFormats.td"
@@ -4041,11 +4037,10 @@ multiclass LoadInsertPatterns<SDPatternOperator LoadOp, ValueType VT, ValueType
40414037
ROXLoadInst, ro, Addr, UnscaledAddr, AddrImm, SubReg>;
40424038
}
40434039

4044-
let Predicates = [OnlyGISel] in {
4040+
// Accept i8 scalar argument in GlobalISel.
40454041
defm : LoadInsertPatterns<load, v16i8, v8i8, nxv16i8, i8,
40464042
LDRBui, LDURBi, LDRBroW, LDRBroX,
40474043
ro8, am_indexed8, am_unscaled8, uimm12s1, bsub>;
4048-
}
40494044
defm : LoadInsertPatterns<extloadi8, v16i8, v8i8, nxv16i8, i32,
40504045
LDRBui, LDURBi, LDRBroW, LDRBroX,
40514046
ro8, am_indexed8, am_unscaled8, uimm12s1, bsub>;
@@ -7340,9 +7335,8 @@ defm : Neon_INS_elt_pattern<v8bf16, v4bf16, nxv8bf16, bf16, VectorIndexH, INSvi1
73407335
defm : Neon_INS_elt_pattern<v4f32, v2f32, nxv4f32, f32, VectorIndexS, INSvi32lane, DUPi32, ssub>;
73417336
defm : Neon_INS_elt_pattern<v2f64, v1f64, nxv2f64, f64, VectorIndexD, INSvi64lane, DUPi64, dsub>;
73427337

7343-
let Predicates = [OnlyGISel] in {
7338+
// Accept i8 scalar argument in GlobalISel.
73447339
defm : Neon_INS_elt_pattern<v16i8, v8i8, nxv16i8, i8, VectorIndexB, INSvi8lane, DUPi8, bsub>;
7345-
}
73467340
defm : Neon_INS_elt_pattern<v16i8, v8i8, nxv16i8, i32, VectorIndexB, INSvi8lane, DUPi8, bsub>;
73477341
defm : Neon_INS_elt_pattern<v8i16, v4i16, nxv8i16, i32, VectorIndexH, INSvi16lane, DUPi16, hsub>;
73487342
defm : Neon_INS_elt_pattern<v4i32, v2i32, nxv4i32, i32, VectorIndexS, INSvi32lane, DUPi32, ssub>;
@@ -8765,9 +8759,8 @@ class Ld1Lane128Pat<SDPatternOperator scalar_load, Operand VecIndex,
87658759
(STy (scalar_load GPR64sp:$Rn)), (i64 VecIndex:$idx)),
87668760
(LD1 VecListOne128:$Rd, VecIndex:$idx, GPR64sp:$Rn)>;
87678761

8768-
let Predicates = [OnlyGISel] in {
8762+
// Accept i8 scalar argument in GlobalISel.
87698763
def : Ld1Lane128Pat<load, VectorIndexB, v16i8, i8, LD1i8>;
8770-
}
87718764
def : Ld1Lane128Pat<extloadi8, VectorIndexB, v16i8, i32, LD1i8>;
87728765
def : Ld1Lane128Pat<extloadi16, VectorIndexH, v8i16, i32, LD1i16>;
87738766
def : Ld1Lane128Pat<load, VectorIndexS, v4i32, i32, LD1i32>;
@@ -8841,9 +8834,8 @@ class Ld1Lane64Pat<SDPatternOperator scalar_load, Operand VecIndex,
88418834
VecIndex:$idx, GPR64sp:$Rn),
88428835
dsub)>;
88438836

8844-
let Predicates = [OnlyGISel] in {
8837+
// Accept i8 scalar argument in GlobalISel.
88458838
def : Ld1Lane64Pat<load, VectorIndexB, v8i8, i8, LD1i8>;
8846-
}
88478839
def : Ld1Lane64Pat<extloadi8, VectorIndexB, v8i8, i32, LD1i8>;
88488840
def : Ld1Lane64Pat<extloadi16, VectorIndexH, v4i16, i32, LD1i16>;
88498841
def : Ld1Lane64Pat<load, VectorIndexS, v2i32, i32, LD1i32>;

0 commit comments

Comments
 (0)