public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/109596] [14 Regression] Lots of guality testcase fails on x86_64 after r14-162-gcda246f8b421ba
Date: Mon, 15 Apr 2024 18:53:36 +0000	[thread overview]
Message-ID: <bug-109596-4-OekUD84yWg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109596-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109596

--- Comment #19 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I looked into the remaining exit/nonexit rename discussed here earlier before
the PR was closed. The following patch would restore the code to do the same
calls as before my patch
        PR tree-optimization/109596
        * tree-ssa-loop-ch.c (ch_base::copy_headers): Fix use of exit/nonexit
edges.
diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc
index b7ef485c4cc..cd5f6bc3c2a 100644
--- a/gcc/tree-ssa-loop-ch.cc
+++ b/gcc/tree-ssa-loop-ch.cc
@@ -952,13 +952,13 @@ ch_base::copy_headers (function *fun)
       if (!single_pred_p (nonexit->dest))
        {
          header = split_edge (nonexit);
-         exit = single_pred_edge (header);
+         nonexit = single_pred_edge (header);
        }

       edge entry = loop_preheader_edge (loop);

       propagate_threaded_block_debug_into (nonexit->dest, entry->dest);
-      if (!gimple_duplicate_seme_region (entry, exit, bbs, n_bbs, copied_bbs,
+      if (!gimple_duplicate_seme_region (entry, nonexit, bbs, n_bbs,
copied_bbs,
                                         true))
        {
          delete candidate.static_exits;

I however convinced myself this is an noop. both exit and nonexit sources have
same basic blocks.  

propagate_threaded_block_debug_into walks predecessors of its first parameter
and moves debug statements to the second parameter, so it does the same job,
since the split BB is empty.

gimple_duplicate_seme_region uses the parametr to update loop header but it
does not do that correctly for loop header copying and we re-do it in
tree-ssa-loop-ch.

Still the code as it is now in trunk is very confusing, so perhaps we should
update it?

      parent reply	other threads:[~2024-04-15 18:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23  1:46 [Bug testsuite/109596] New: [14 Regression] Lots of testcases " haochen.jiang at intel dot com
2023-04-24  7:06 ` [Bug testsuite/109596] " rguenth at gcc dot gnu.org
2024-01-12 10:58 ` [Bug testsuite/109596] [14 Regression] Lots of guality testcase " rguenth at gcc dot gnu.org
2024-03-19 14:14 ` jakub at gcc dot gnu.org
2024-03-19 15:23 ` jakub at gcc dot gnu.org
2024-03-19 15:27 ` hubicka at gcc dot gnu.org
2024-03-19 15:41 ` jakub at gcc dot gnu.org
2024-03-19 15:47 ` hubicka at gcc dot gnu.org
2024-03-19 15:58 ` hubicka at gcc dot gnu.org
2024-03-19 16:28 ` jakub at gcc dot gnu.org
2024-03-19 22:28 ` jakub at gcc dot gnu.org
2024-03-20 11:50 ` jakub at gcc dot gnu.org
2024-04-10  7:13 ` rguenth at gcc dot gnu.org
2024-04-11  6:53 ` rguenth at gcc dot gnu.org
2024-04-11  9:11 ` cvs-commit at gcc dot gnu.org
2024-04-11  9:12 ` rguenth at gcc dot gnu.org
2024-04-12 18:14 ` carlos.seo at linaro dot org
2024-04-12 18:18 ` pinskia at gcc dot gnu.org
2024-04-12 18:24 ` carlos.seo at linaro dot org
2024-04-13 11:36 ` haochen.jiang at intel dot com
2024-04-15 18:53 ` hubicka at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109596-4-OekUD84yWg@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).