re PR target/69888 (ICE: SIGSEGV in decide_alg (i386.c:26169) due to infinite (?...
authorJakub Jelinek <jakub@gcc.gnu.org>
Mon, 22 Feb 2016 21:34:49 +0000 (22:34 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 22 Feb 2016 21:34:49 +0000 (22:34 +0100)
PR target/69888
* config/i386/i386.c (decide_alg): Ensure we don't recurse with
identical arguments.  Formatting and spelling fixes.

* gcc.target/i386/pr69888.c: New test.

From-SVN: r233615

gcc/config/i386/i386.c

index 5c034f2..29c73f6 100644 (file)
@@ -26153,7 +26153,7 @@ decide_alg (HOST_WIDE_INT count, HOST_WIDE_INT expected_size,
          || !alg_usable_p (algs->unknown_size, memset, have_as)))
     {
       enum stringop_alg alg;
-      HOST_WIDE_INT new_expected_size = max > 0 ? max / 2 : 2048;
+      HOST_WIDE_INT new_expected_size = (max > 0 ? max : 4096) / 2;
 
       /* If there aren't any usable algorithms or if recursing with the
         same arguments as before, then recursing on smaller sizes or