[gcc r17-3193] wide-int: Use return 1 instead of return len.

Kael Andrew Franco via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:cee53ed42c753a0c936e005b7dd15f029ca34da7

commit r17-3193-gcee53ed42c753a0c936e005b7dd15f029ca34da7
Author: Kael Andrew Alonzo Franco <[email protected]>
Date:   Mon Aug 10 17:19:05 2026 -0400

    wide-int: Use return 1 instead of return len.
    
    len is known to be 1 so return 1.
    Helps with speeding up C++ optimizers.
    
    Obvious fix so pushed.
    
    gcc/ChangeLog:
    
            * wide-int.cc (canonize): Use return 1 instead of return len.
    
    Signed-off-by: Kael Andrew Franco <[email protected]>

Diff:
---
 gcc/wide-int.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/wide-int.cc b/gcc/wide-int.cc
index c2c424344a24..668b2e4ea7db 100644
--- a/gcc/wide-int.cc
+++ b/gcc/wide-int.cc
@@ -90,7 +90,7 @@ canonize (HOST_WIDE_INT *val, unsigned int len, unsigned int precision)
     len = blocks_needed;
 
   if (len == 1)
-    return len;
+    return 1;
 
   top = val[len - 1];
   if (len * HOST_BITS_PER_WIDE_INT > precision)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.