[PATCH] wide-int: Use return 1 instead of return len.

Kael Andrew Alonzo Franco <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
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]>
---
 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 c2c424344a2..668b2e4ea7d 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)
-- 
2.55.0
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.