On Tue, 2011-07-12 at 11:50 -0500, William J. Schmidt wrote: > Ilya, thanks for posting this! This patch is useful also on powerpc64. > Applying it solved a performance degradation with bwaves due to loss of > reassociation somewhere between 4.5 and 4.6 (still tracking it down). > When we apply -ftree-reassoc-width=2 to bwaves, the more optimal code > generation returns. > > Bill >
However, it does not fix http://gcc.gnu.org/PR45671, which surprises me as it was marked as a duplicate of this one. Any thoughts on why this isn't sufficient to reassociate the linear chain of adds? Test case: int myfunction (int a, int b, int c, int d, int e, int f, int g, int h) { int ret; ret = a + b + c + d + e + f + g + h; return ret; }