===================================================================
@@ -23271,8 +23271,8 @@ in 64-bit mode.
@itemx -mno-lra
@opindex mlra
@opindex mno-lra
-Enable Local Register Allocation. This is experimental for SPARC, so by
-default the compiler uses standard reload (i.e. @option{-mno-lra}).
+Enable Local Register Allocation. This is the default for SPARC since GCC 7
+so @option{-mno-lra} needs to be passed to get old Reload.
@item -mcpu=@var{cpu_type}
@opindex mcpu
===================================================================
@@ -1523,6 +1523,10 @@ sparc_option_override (void)
if (TARGET_ARCH32)
target_flags &= ~MASK_STACK_BIAS;
+ /* Use LRA instead of reload, unless otherwise instructed. */
+ if (!(target_flags_explicit & MASK_LRA))
+ target_flags |= MASK_LRA;
+
/* Supply a default value for align_functions. */
if (align_functions == 0
&& (sparc_cpu == PROCESSOR_ULTRASPARC