https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64108
--- Comment #2 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> --- Author: hjl Date: Tue Dec 2 14:10:23 2014 New Revision: 218272 URL: https://gcc.gnu.org/viewcvs?rev=218272&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/ 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. Added: trunk/gcc/testsuite/gcc.target/i386/memset-strategy-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/testsuite/ChangeLog