Stop only if there aren't any usable algorithms
commit0f884e6709dac066e558c6a63c50a5149ab408f3
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 2 Dec 2014 14:10:23 +0000 (2 14:10 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 2 Dec 2014 14:10:23 +0000 (2 06:10 -0800)
tree8519c84ca3cfd4e5b3c4e7acd089cd6330aa87ec
parentfb98f8869b20ecc3ee1f6cb473ab6d7b3c34ece7
Stop only if there aren't any usable algorithms

When searching for an usable algorithm with -minline-all-stringops,
decide_alg stops when it sees libcall even if there is a usable
algorithm.  It goes into an infinite loop.  This patch changes
decide_alg to stop searching only if there aren't any usable algorithms.
Testd on Linux/x86-64.

gcc/

PR target/64108
* config/i386/i386.c (decide_alg): Stop only if there aren't
any usable algorithms.

gcc/testsuite/

PR target/64108
* gcc.target/i386/memset-strategy-2.c: New test.

From-SVN: r218272
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/memset-strategy-2.c [new file with mode: 0644]