https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102309

--- Comment #4 from Torbjorn SVENSSON <azoff at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #3)
> The code that reads that variable is:
> 
> arm_constant_limit (bool size_p)
> {
>   return size_p ? 1 : current_tune->constant_limit;
> }
> 
> I really don't think it makes sense for the tuning tables to have a lower
> value than 1.  Perhaps the code above should set that as the minimum value:
> 
> arm_constant_limit (bool size_p)
> {
>   return size_p ? 1 : MAX (1, current_tune->constant_limit);
> }

I've built a toolchain with this change (I used r16-8253-geb50d28a9353e9 as a
base) and run the tests for:

thumb/arch=armv7ve+neon/tune=cortex-a7/float-abi=hard/fpu=auto
thumb/arch=armv7ve+nofp/tune=cortex-a7/float-abi=soft/fpu=auto
thumb/arch=armv6s-m/tune=cortex-m0/float-abi=soft/fpu=auto
thumb/arch=armv8-m.main+dsp+fp/tune=cortex-m33/float-abi=hard/fpu=auto
thumb/arch=armv8-m.main+dsp+nofp/tune=cortex-m33/float-abi=soft/fpu=auto
thumb/arch=armv7-m/tune=cortex-m3/float-abi=soft/fpu=auto
thumb/arch=armv7e-m+fp/tune=cortex-m4/float-abi=hard/fpu=auto
thumb/arch=armv7e-m+nofp/tune=cortex-m4/float-abi=soft/fpu=auto
thumb/arch=armv8.1-m.main+mve.fp+fp.dp/tune=cortex-m55/float-abi=hard/fpu=auto
thumb/arch=armv8.1-m.main+mve+nofp/tune=cortex-m55/float-abi=soft/fpu=auto
thumb/arch=armv7e-m+fp.dp/tune=cortex-m7/float-abi=hard/fpu=auto
thumb/arch=armv7e-m+nofp/tune=cortex-m7/float-abi=soft/fpu=auto
thumb/arch=armv8.1-m.main+mve.fp+pacbti+fp.dp/tune=cortex-m85/float-abi=hard/fpu=auto
thumb/arch=armv8.1-m.main+mve+pacbti+nofp/tune=cortex-m85/float-abi=soft/fpu=auto

and the only change I see are that
gcc.target/arm/thumb2-replicated-constant[234].c are no longer reporting
failure. There are no other test that are changed in my logs.

@Richard, will you create the patch or do you want me send one for review?

As these are failures going all the way back to gcc-10 from my records, I also
think it should be fixed in at least gcc-15 on top of trunk.

Reply via email to