Skip to content

Commit 7ad481e

Browse files
Revert "[AArch64] Add support for -ffixed-x30" (#88019)
This reverts commit e770153. This wasn't reviewed, and the functionality in question was intentionally rejected the last time it was discussed in https://reviews.llvm.org/D56305 .
1 parent ff9b63f commit 7ad481e

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

clang/lib/Driver/ToolChains/Arch/AArch64.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,6 @@ void aarch64::getAArch64TargetFeatures(const Driver &D,
402402
if (Args.hasArg(options::OPT_ffixed_x28))
403403
Features.push_back("+reserve-x28");
404404

405-
if (Args.hasArg(options::OPT_ffixed_x30))
406-
Features.push_back("+reserve-x30");
407-
408405
if (Args.hasArg(options::OPT_fcall_saved_x8))
409406
Features.push_back("+call-saved-x8");
410407

clang/test/Driver/aarch64-fixed-x-register.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@
9494
// RUN: FileCheck --check-prefix=CHECK-FIXED-X28 < %t %s
9595
// CHECK-FIXED-X28: "-target-feature" "+reserve-x28"
9696

97-
// RUN: %clang --target=aarch64-none-gnu -ffixed-x30 -### %s 2> %t
98-
// RUN: FileCheck --check-prefix=CHECK-FIXED-X30 < %t %s
99-
// CHECK-FIXED-X30: "-target-feature" "+reserve-x30"
100-
10197
// Test multiple of reserve-x# options together.
10298
// RUN: %clang --target=aarch64-none-gnu \
10399
// RUN: -ffixed-x1 \

llvm/lib/Target/AArch64/AArch64.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def FeatureStrictAlign : SubtargetFeature<"strict-align",
212212
"Disallow all unaligned memory "
213213
"access">;
214214

215-
foreach i = {1-7,9-15,18,20-28,30} in
215+
foreach i = {1-7,9-15,18,20-28} in
216216
def FeatureReserveX#i : SubtargetFeature<"reserve-x"#i, "ReserveXRegister["#i#"]", "true",
217217
"Reserve X"#i#", making it unavailable "
218218
"as a GPR">;

llvm/test/CodeGen/AArch64/arm64-platform-reg.ll

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x26 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X26
3535
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x27 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X27
3636
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x28 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X28
37-
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x30 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X30
3837

3938
; Test multiple of reserve-x# options together.
4039
; RUN: llc -mtriple=arm64-linux-gnu \
@@ -73,7 +72,6 @@
7372
; RUN: -mattr=+reserve-x26 \
7473
; RUN: -mattr=+reserve-x27 \
7574
; RUN: -mattr=+reserve-x28 \
76-
; RUN: -mattr=+reserve-x30 \
7775
; RUN: -reserve-regs-for-regalloc=X8,X16,X17,X19 \
7876
; RUN: -o - %s | FileCheck %s \
7977
; RUN: --check-prefix=CHECK-RESERVE \
@@ -104,8 +102,7 @@
104102
; RUN: --check-prefix=CHECK-RESERVE-X25 \
105103
; RUN: --check-prefix=CHECK-RESERVE-X26 \
106104
; RUN: --check-prefix=CHECK-RESERVE-X27 \
107-
; RUN: --check-prefix=CHECK-RESERVE-X28 \
108-
; RUN: --check-prefix=CHECK-RESERVE-X30
105+
; RUN: --check-prefix=CHECK-RESERVE-X28
109106

110107
; x18 is reserved as a platform register on Darwin but not on other
111108
; systems. Create loads of register pressure and make sure this is respected.
@@ -152,7 +149,6 @@ define void @keep_live() {
152149
; CHECK-RESERVE-X26-NOT: ldr x26
153150
; CHECK-RESERVE-X27-NOT: ldr x27
154151
; CHECK-RESERVE-X28-NOT: ldr x28
155-
; CHECK-RESERVE-X30-NOT: ldr x30
156152
; CHECK-RESERVE: Spill
157153
; CHECK-RESERVE-NOT: ldr fp
158154
; CHECK-RESERVE-X1-NOT: ldr x1,
@@ -182,7 +178,6 @@ define void @keep_live() {
182178
; CHECK-RESERVE-X26-NOT: ldr x26
183179
; CHECK-RESERVE-X27-NOT: ldr x27
184180
; CHECK-RESERVE-X28-NOT: ldr x28
185-
; CHECK-RESERVE-X30-NOT: ldr x30
186181
; CHECK-RESERVE: ret
187182
ret void
188183
}

0 commit comments

Comments
 (0)