https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64108
--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> --- Author: hjl Date: Fri Dec 5 11:52:44 2014 New Revision: 218419 URL: https://gcc.gnu.org/viewcvs?rev=218419&root=gcc&view=rev Log: 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/ Backport from mainline PR target/64108 * config/i386/i386.c (decide_alg): Stop only if there aren't any usable algorithms. gcc/testsuite/ Backport from mainline PR target/64108 * gcc.target/i386/memset-strategy-2.c: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/memset-strategy-2.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/config/i386/i386.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog