aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-06-14 14:57:26 +0200
committerRichard Biener <rguenther@suse.de>2021-06-14 16:37:23 +0200
commit788bb7edb3975b80c4cb16323e7a5e55a2471e46 (patch)
tree834405bec8c423976d9b8fb364b84cd44aa24c8e /gcc/tree-ssa-dom.c
parenta40d2293a7a417fc7711f8f4e52dbd4c48c2a43f (diff)
downloadgcc-788bb7edb3975b80c4cb16323e7a5e55a2471e46.zip
gcc-788bb7edb3975b80c4cb16323e7a5e55a2471e46.tar.gz
gcc-788bb7edb3975b80c4cb16323e7a5e55a2471e46.tar.bz2
tree-optimization/100934 - properly mark irreducible regions for DOM
The jump threading code requires marked irreducible regions for the purpose of validating jump threading paths but DOM fails to provide that resulting in mised number of iteration upper bounds clearing. 2021-06-14 Richard Biener <rguenther@suse.de> PR tree-optimization/100934 * tree-ssa-dom.c (pass_dominator::execute): Properly mark irreducible regions. * gcc.dg/torture/pr100934.c: New testcase.
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 075b1cc..c231e6c 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -727,7 +727,8 @@ pass_dominator::execute (function *fun)
gcc.dg/tree-ssa/pr21417.c can't be threaded if loop preheader is
missing. We should improve jump threading in future then
LOOPS_HAVE_PREHEADERS won't be needed here. */
- loop_optimizer_init (LOOPS_HAVE_PREHEADERS | LOOPS_HAVE_SIMPLE_LATCHES);
+ loop_optimizer_init (LOOPS_HAVE_PREHEADERS | LOOPS_HAVE_SIMPLE_LATCHES
+ | LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS);
/* We need accurate information regarding back edges in the CFG
for jump threading; this may include back edges that are not part of