Skip to content

Commit 72f8955

Browse files
[CodeGen][AArch64] Enable LDAPR under +RCPC
This is a follow-up to D126250 and enables LDAPR if the RCPC extensions are enabled. Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D137590
1 parent b7c0a40 commit 72f8955

File tree

6 files changed

+10
-1927
lines changed

6 files changed

+10
-1927
lines changed

llvm/lib/Target/AArch64/AArch64.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ def FeatureLSE : SubtargetFeature<"lse", "HasLSE", "true",
7070
def FeatureLSE2 : SubtargetFeature<"lse2", "HasLSE2", "true",
7171
"Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules (FEAT_LSE2)">;
7272

73-
def FeatureLDAPR : SubtargetFeature<"ldapr", "HasLDAPR", "true",
74-
"Use LDAPR to lower atomic loads; experimental until we "
75-
"have more testing/a formal correctness proof">;
76-
7773
def FeatureOutlineAtomics : SubtargetFeature<"outline-atomics", "OutlineAtomics", "true",
7874
"Enable out of line atomics to support LSE instructions">;
7975

llvm/lib/Target/AArch64/AArch64InstrAtomics.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ class seq_cst_load<PatFrags base>
4949
let IsAtomicOrderingSequentiallyConsistent = 1;
5050
}
5151

52-
// RCPC extension, currently opt-in under a separate feature.
53-
let Predicates = [HasLDAPR] in {
52+
let Predicates = [HasRCPC] in {
5453
// v8.3 Release Consistent Processor Consistent support, optional in v8.2.
5554
// 8-bit loads
5655
def : Pat<(acquiring_load<atomic_load_8> GPR64sp:$ptr), (LDAPRB GPR64sp:$ptr)>;

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ def HasNEONorSME
177177
"neon or sme">;
178178
def HasRCPC : Predicate<"Subtarget->hasRCPC()">,
179179
AssemblerPredicateWithAll<(all_of FeatureRCPC), "rcpc">;
180-
def HasLDAPR : Predicate<"Subtarget->hasLDAPR()">,
181-
AssemblerPredicateWithAll<(all_of FeatureLDAPR), "ldapr">;
182180
def HasAltNZCV : Predicate<"Subtarget->hasAlternativeNZCV()">,
183181
AssemblerPredicateWithAll<(all_of FeatureAltFPCmp), "altnzcv">;
184182
def HasFRInt3264 : Predicate<"Subtarget->hasFRInt3264()">,

llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2829,7 +2829,7 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
28292829
static constexpr unsigned LDAROpcodes[] = {
28302830
AArch64::LDARB, AArch64::LDARH, AArch64::LDARW, AArch64::LDARX};
28312831
ArrayRef<unsigned> Opcodes =
2832-
STI.hasLDAPR() && Order != AtomicOrdering::SequentiallyConsistent
2832+
STI.hasRCPC() && Order != AtomicOrdering::SequentiallyConsistent
28332833
? LDAPROpcodes
28342834
: LDAROpcodes;
28352835
I.setDesc(TII.get(Opcodes[Log2_32(MemSizeInBytes)]));

0 commit comments

Comments
 (0)