ccmp.c
9.28 KB
-
This patch fixes an exponential issue in ccmp.c. · e0b059b1
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. From-SVN: r233145
Wilco Dijkstra committed