Skip to content

Revert "[AArch64] Add support for -ffixed-x30" #88019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions clang/lib/Driver/ToolChains/Arch/AArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,6 @@ void aarch64::getAArch64TargetFeatures(const Driver &D,
if (Args.hasArg(options::OPT_ffixed_x28))
Features.push_back("+reserve-x28");

if (Args.hasArg(options::OPT_ffixed_x30))
Features.push_back("+reserve-x30");

if (Args.hasArg(options::OPT_fcall_saved_x8))
Features.push_back("+call-saved-x8");

Expand Down
4 changes: 0 additions & 4 deletions clang/test/Driver/aarch64-fixed-x-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@
// RUN: FileCheck --check-prefix=CHECK-FIXED-X28 < %t %s
// CHECK-FIXED-X28: "-target-feature" "+reserve-x28"

// RUN: %clang --target=aarch64-none-gnu -ffixed-x30 -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-FIXED-X30 < %t %s
// CHECK-FIXED-X30: "-target-feature" "+reserve-x30"

// Test multiple of reserve-x# options together.
// RUN: %clang --target=aarch64-none-gnu \
// RUN: -ffixed-x1 \
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AArch64/AArch64.td
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def FeatureStrictAlign : SubtargetFeature<"strict-align",
"Disallow all unaligned memory "
"access">;

foreach i = {1-7,9-15,18,20-28,30} in
foreach i = {1-7,9-15,18,20-28} in
def FeatureReserveX#i : SubtargetFeature<"reserve-x"#i, "ReserveXRegister["#i#"]", "true",
"Reserve X"#i#", making it unavailable "
"as a GPR">;
Expand Down
7 changes: 1 addition & 6 deletions llvm/test/CodeGen/AArch64/arm64-platform-reg.ll
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x26 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X26
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x27 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X27
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x28 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X28
; RUN: llc -mtriple=arm64-linux-gnu -mattr=+reserve-x30 -o - %s | FileCheck %s --check-prefixes=CHECK-RESERVE,CHECK-RESERVE-X30

; Test multiple of reserve-x# options together.
; RUN: llc -mtriple=arm64-linux-gnu \
Expand Down Expand Up @@ -73,7 +72,6 @@
; RUN: -mattr=+reserve-x26 \
; RUN: -mattr=+reserve-x27 \
; RUN: -mattr=+reserve-x28 \
; RUN: -mattr=+reserve-x30 \
; RUN: -reserve-regs-for-regalloc=X8,X16,X17,X19 \
; RUN: -o - %s | FileCheck %s \
; RUN: --check-prefix=CHECK-RESERVE \
Expand Down Expand Up @@ -104,8 +102,7 @@
; RUN: --check-prefix=CHECK-RESERVE-X25 \
; RUN: --check-prefix=CHECK-RESERVE-X26 \
; RUN: --check-prefix=CHECK-RESERVE-X27 \
; RUN: --check-prefix=CHECK-RESERVE-X28 \
; RUN: --check-prefix=CHECK-RESERVE-X30
; RUN: --check-prefix=CHECK-RESERVE-X28

; x18 is reserved as a platform register on Darwin but not on other
; systems. Create loads of register pressure and make sure this is respected.
Expand Down Expand Up @@ -152,7 +149,6 @@ define void @keep_live() {
; CHECK-RESERVE-X26-NOT: ldr x26
; CHECK-RESERVE-X27-NOT: ldr x27
; CHECK-RESERVE-X28-NOT: ldr x28
; CHECK-RESERVE-X30-NOT: ldr x30
; CHECK-RESERVE: Spill
; CHECK-RESERVE-NOT: ldr fp
; CHECK-RESERVE-X1-NOT: ldr x1,
Expand Down Expand Up @@ -182,7 +178,6 @@ define void @keep_live() {
; CHECK-RESERVE-X26-NOT: ldr x26
; CHECK-RESERVE-X27-NOT: ldr x27
; CHECK-RESERVE-X28-NOT: ldr x28
; CHECK-RESERVE-X30-NOT: ldr x30
; CHECK-RESERVE: ret
ret void
}