https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87147
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Thu Aug 30 12:37:10 2018 New Revision: 263980 URL: https://gcc.gnu.org/viewcvs?rev=263980&root=gcc&view=rev Log: 2018-08-30 Richard Biener <rguent...@suse.de> PR tree-optimization/87147 * tree-ssa-sccvn.c (SSA_VISITED): New function. (visit_phi): When the degenerate result is from the backedge and we didn't visit its definition yet drop to VARYING. (do_rpo_vn): Properly mark blocks with incoming backedges as executable. * gcc.dg/torture/pr87147.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/pr87147.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-sccvn.c