public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/110590] New: Failing CFG consistency testcases
@ 2023-07-07 17:12 hubicka at gcc dot gnu.org
2023-07-07 17:16 ` [Bug middle-end/110590] " hubicka at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2023-07-07 17:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110590
Bug ID: 110590
Summary: Failing CFG consistency testcases
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: hubicka at gcc dot gnu.org
Target Milestone: ---
there are 3 testcases that checks for Invalid sum but fogets to enable
blocks-details which fails after this is fixed:
gcc.dg/tree-ssa/loop-ch-profile-1.c
here the problem is that loop header dulication introduces loop invariant
conditoinal that is later
updated by tree-ssa-dom but dom does not take care of updating profile.
Since loop-ch knows when it duplicates loop invariant, we may be able to
get this right.
The test is still useful since it tests that right after ch profile is
consistent.
gcc.dg/tree-prof/update-cunroll-2.c
This is about profile updating code in duplicate_loop_body_to_header_edge
being wrong when optimized
out exit is not last in the loop. In that case the probability of later
exits needs to be accounted in.
I will think about making this better - in general this does not seem to
have easy solution, but for
special case of chained tests we can definitely account for the later
exits.
gcc.dg/tree-ssa/update-unroll-1.c
This fails after aprefetch invoked unrolling. I did not look into details
yet.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/110590] Failing CFG consistency testcases
2023-07-07 17:12 [Bug middle-end/110590] New: Failing CFG consistency testcases hubicka at gcc dot gnu.org
@ 2023-07-07 17:16 ` hubicka at gcc dot gnu.org
2023-07-07 21:00 ` hubicka at gcc dot gnu.org
2023-07-08 15:38 ` cvs-commit at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2023-07-07 17:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110590
--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Forgot about
gcc.dg/tree-prof/update-unroll-2.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/110590] Failing CFG consistency testcases
2023-07-07 17:12 [Bug middle-end/110590] New: Failing CFG consistency testcases hubicka at gcc dot gnu.org
2023-07-07 17:16 ` [Bug middle-end/110590] " hubicka at gcc dot gnu.org
@ 2023-07-07 21:00 ` hubicka at gcc dot gnu.org
2023-07-08 15:38 ` cvs-commit at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2023-07-07 21:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110590
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
... and testsuite/gcc.dg/unroll-7.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/110590] Failing CFG consistency testcases
2023-07-07 17:12 [Bug middle-end/110590] New: Failing CFG consistency testcases hubicka at gcc dot gnu.org
2023-07-07 17:16 ` [Bug middle-end/110590] " hubicka at gcc dot gnu.org
2023-07-07 21:00 ` hubicka at gcc dot gnu.org
@ 2023-07-08 15:38 ` cvs-commit at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-08 15:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110590
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:
https://gcc.gnu.org/g:15bbf1826a01f5beb2d7c0f74d6270bbc94ece91
commit r14-2396-g15bbf1826a01f5beb2d7c0f74d6270bbc94ece91
Author: Jan Hubicka <jh@suse.cz>
Date: Sat Jul 8 17:38:09 2023 +0200
Fix tree-ssa/update-cunroll.c
In this testcase the profile is misupdated before loop has two exits.
The first exit is one eliminated by complete unrolling while second exit
remains.
We remove first exit but forget about fact that the source BB of other exit
will
then have higher frequency making other exit more likely.
This patch fixes that in duplicate_loop_body_to_header_edge.
While looking into resulting profiles I also noticed that in some cases
scale_loop_profile may drop probabilities to 0 incorrectly either when
trying to update exit from nested loop (which has similar problem) or when
the profile
was inconsistent as described in coment bellow.
gcc/ChangeLog:
PR middle-end/110590
* cfgloopmanip.cc (scale_loop_profile): Avoid scaling exits within
inner loops and be more careful about inconsistent profiles.
(duplicate_loop_body_to_header_edge): Fix profile update when
eliminated
exit is followed by other exit.
gcc/testsuite/ChangeLog:
PR middle-end/110590
* gcc.dg/tree-prof/update-cunroll-2.c: Remove xfail.
* gcc.dg/tree-ssa/update-cunroll.c: Likewise.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-08 15:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-07 17:12 [Bug middle-end/110590] New: Failing CFG consistency testcases hubicka at gcc dot gnu.org
2023-07-07 17:16 ` [Bug middle-end/110590] " hubicka at gcc dot gnu.org
2023-07-07 21:00 ` hubicka at gcc dot gnu.org
2023-07-08 15:38 ` cvs-commit at gcc dot gnu.org
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).