On 03/29/2017 04:05 AM, Richard Biener wrote:
After quite some pondering over this and other related bugs I propose
the following for GCC 7 which tames down PRE a bit (back to levels
of GCC 6). Technically it's the wrong place to fix this, we do
have measures in place during elimination but they are not in effect
at -O2. For GCC 8 I'd like to be more aggressive there but that
would require to enable predictive commoning at -O2 (with some
limits to its unrolling) to not lose optimization opportunities.
The other option is to ignore this issue and postpone the solution
to GCC 8.
Bootstrapped / tested on x86_64-unknown-linux-gnu.
Any preference?
Thanks,
Richard.
2017-03-29 Richard Biener <rguent...@suse.de>
PR tree-optimization/77498
* tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
to non-constants over backedges.
* gfortran.dg/pr77498.f: New testcase.
I've got a slight preference for this patch.
If you had a good start on the real fix then I'd lean more towards
postponing.
jeff