diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-07-25 09:37:49 -0700 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2024-07-28 19:06:00 +0200 |
commit | e93bb5da972050c78ac3b945c7ee9d548f064ef9 (patch) | |
tree | b97bd2bdf924160ce02c1b9411acdfb812c0fcac /gcc/config | |
parent | 65936041dbffdc735bed4dbf831462ff3922d28f (diff) | |
download | gcc-e93bb5da972050c78ac3b945c7ee9d548f064ef9.zip gcc-e93bb5da972050c78ac3b945c7ee9d548f064ef9.tar.gz gcc-e93bb5da972050c78ac3b945c7ee9d548f064ef9.tar.bz2 |
aarch64: Fix target/optimize option handling with transiting between O1 to O2
The problem here is the aarch64 backend enables -mearly-ra at -O2 and above but
it is not marked as an Optimization in the .opt file so enabling it sometimes
reset the target options when going from -O1 to -O2 for the first time.
Build and tested for aarch64-linux-gnu with no regressions.
PR target/116065
gcc/ChangeLog:
* config/aarch64/aarch64.opt (mearly-ra=): Mark as Optimization rather
than Save.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/sve/target_optimization-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/aarch64/aarch64.opt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt index 2f90f10..6229bcb 100644 --- a/gcc/config/aarch64/aarch64.opt +++ b/gcc/config/aarch64/aarch64.opt @@ -256,7 +256,7 @@ EnumValue Enum(early_ra_scope) String(none) Value(AARCH64_EARLY_RA_NONE) mearly-ra= -Target RejectNegative Joined Enum(early_ra_scope) Var(aarch64_early_ra) Init(AARCH64_EARLY_RA_NONE) Save +Target RejectNegative Joined Enum(early_ra_scope) Var(aarch64_early_ra) Init(AARCH64_EARLY_RA_NONE) Optimization Specify when to enable an early register allocation pass. The possibilities are: all functions, functions that have access to strided multi-register instructions, and no functions. |