As per discussion in PR102309.

Ok for trunk?

--

gcc/ChangeLog:

        PR target/102309
        * config/arm/arm.cc (arm_constant_limit): Allways allow at least
        one insn when loading a constant.

Signed-off-by: Torbjörn SVENSSON <[email protected]>
---
 gcc/config/arm/arm.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index 24a57c68778..b75a32ddab9 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -2453,7 +2453,7 @@ enum tls_reloc {
 inline static int
 arm_constant_limit (bool size_p)
 {
-  return size_p ? 1 : current_tune->constant_limit;
+  return size_p ? 1 : MAX (1, current_tune->constant_limit);
 }
 
 /* Emit an insn that's a simple single-set.  Both the operands must be known
-- 
2.43.0

Reply via email to