https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67816
--- Comment #13 from Jeffrey A. Law <law at gcc dot gnu.org> --- Author: law Date: Wed Oct 7 02:25:57 2015 New Revision: 228559 URL: https://gcc.gnu.org/viewcvs?rev=228559&root=gcc&view=rev Log: [PATCH][PR tree-optimization/67816] Fix jump threading when DOM removes conditionals in jump threading path PR tree-optimization/67816 * tree-ssa-threadupdate.h (remove_jump_threads_including): Renamed from remove_jump_threads_starting_at. Accept an edge rather than a basic block. * tree-ssa-threadupdate.c (removed_edges): New hash table. (remove_jump_threads_including): Note edges that get removed from the CFG for later pruning of jump threading paths including them. (thread_through_all_blocks): Remove paths which include edges that have been removed. * tree-ssa-dom.c (optimize_stmt): Call remove_jump_threads_including on each outgoing edges when optimizing away a control statement. * gcc.c-torture/compile/pr67816.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr67816.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-dom.c trunk/gcc/tree-ssa-threadupdate.c trunk/gcc/tree-ssa-threadupdate.h