[Bug target/69619] [6 Regression] compilation doesn't terminate during CCMP expansion
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 4 18:24:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69619
--- Comment #6 from wilco at gcc dot gnu.org ---
Author: wilco
Date: Thu Feb 4 18:23:35 2016
New Revision: 233145
URL: https://gcc.gnu.org/viewcvs?rev=233145&root=gcc&view=rev
Log:
This patch fixes an exponential issue in ccmp.c. When deciding which ccmp
expansion to use, the tree nodes gs0 and gs1 are fully expanded twice. If
they contain more CCMP opportunities, their subtrees are also expanded twice.
When the trees are complex the expansion takes exponential time and memory.
As a workaround in GCC6 compute the cost of the first expansion early, and
only try the alternative expansion if the cost is low enough. This rarely
affects real code, eg. SPECINT2006 has identical codesize.
2016-02-04 Wilco Dijkstra <wdijkstr@arm.com>
gcc/
PR target/69619
* ccmp.c (expand_ccmp_expr_1): Avoid evaluating gs0/gs1
twice when complex.
gcc/testsuite/
PR target/69619
* gcc.dg/pr69619.c: Add new test.
Added:
trunk/gcc/testsuite/gcc.dg/pr69619.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ccmp.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list