public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c
@ 2020-03-18 11:38 zhroma at gcc dot gnu.org
2020-03-18 12:09 ` [Bug tree-optimization/94211] " rguenth at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: zhroma at gcc dot gnu.org @ 2020-03-18 11:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
Bug ID: 94211
Summary: [9/10 Regression] -fcompare-debug failure on
phi-opt-13.c
Product: gcc
Version: 9.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zhroma at gcc dot gnu.org
Target Milestone: ---
This command:
gcc -c -O2 -fcompare-debug gcc/testsuite/gcc.dg/tree-ssa/phi-opt-13.c
fails on todays master (r10-7237) on ppc64le, fails on 9.3 on x86_64, but not
in 7.4. Haven't checked version 8.x.
long f(long a, long b) {
if (__builtin_expect(b == 1, 1)) return a;
return a / b;
}
Tree .phiopt2 is the first dump which seems buggy.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [9/10 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
@ 2020-03-18 12:09 ` rguenth at gcc dot gnu.org
2020-03-18 13:40 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-03-18 12:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |9.3.0
Target Milestone|--- |9.4
Known to work| |7.4.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [9/10 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
2020-03-18 12:09 ` [Bug tree-optimization/94211] " rguenth at gcc dot gnu.org
@ 2020-03-18 13:40 ` jakub at gcc dot gnu.org
2020-03-18 15:35 ` [Bug tree-optimization/94211] [8/9/10 " jakub at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-18 13:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-03-18
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r8-5241-g8697bf9f46f36168ddba5752db582e673e3cbe8c . I'll have a
quick look.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8/9/10 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
2020-03-18 12:09 ` [Bug tree-optimization/94211] " rguenth at gcc dot gnu.org
2020-03-18 13:40 ` jakub at gcc dot gnu.org
@ 2020-03-18 15:35 ` jakub at gcc dot gnu.org
2020-03-18 15:41 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-18 15:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Target Milestone|9.4 |8.5
Summary|[9/10 Regression] |[8/9/10 Regression]
|-fcompare-debug failure on |-fcompare-debug failure on
|phi-opt-13.c |phi-opt-13.c
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think I've introduced this with
r8-3866-g14745bcac0e7b90a5c671b1f9402a53e57ea6431
With
int e = a + 1;
before return a / b; it started already in that revision.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8/9/10 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
` (2 preceding siblings ...)
2020-03-18 15:35 ` [Bug tree-optimization/94211] [8/9/10 " jakub at gcc dot gnu.org
@ 2020-03-18 15:41 ` jakub at gcc dot gnu.org
2020-03-19 9:25 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-18 15:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48056
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48056&action=edit
gcc10-pr94211.patch
Untested fix.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8/9/10 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
` (3 preceding siblings ...)
2020-03-18 15:41 ` jakub at gcc dot gnu.org
@ 2020-03-19 9:25 ` cvs-commit at gcc dot gnu.org
2020-03-19 9:26 ` [Bug tree-optimization/94211] [8/9 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-19 9:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:c7e9019681857b329bbe4c1e7ec8dec8c736c0fe
commit r10-7274-gc7e9019681857b329bbe4c1e7ec8dec8c736c0fe
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Mar 19 10:24:16 2020 +0100
phiopt: Avoid -fcompare-debug bug in phiopt [PR94211]
Two years ago, I've added support for up to 2 simple preparation statements
in value_replacement, but the
- && estimate_num_insns (assign, &eni_time_weights)
+ && estimate_num_insns (bb_seq (middle_bb), &eni_time_weights)
change, meant that we compute the cost of all those statements rather than
just the single assign that has been the single supported non-debug
statement in the bb before, doesn't do what I thought would do, gimple_seq
is just gimple * and thus it can't be really overloaded depending on
whether
we pass a single gimple * or a whole sequence. Which means in the last
two years it doesn't count all the statements, but only the first one.
With -g that happens to be a DEBUG_STMT, or it could be e.g. the first
preparation statement which could be much cheaper than the actual assign.
2020-03-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94211
* tree-ssa-phiopt.c (value_replacement): Use estimate_num_insns_seq
instead of estimate_num_insns for bb_seq (middle_bb). Rename
emtpy_or_with_defined_p variable to empty_or_with_defined_p, adjust
all uses.
* gcc.dg/pr94211.c: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8/9 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
` (4 preceding siblings ...)
2020-03-19 9:25 ` cvs-commit at gcc dot gnu.org
@ 2020-03-19 9:26 ` jakub at gcc dot gnu.org
2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-19 9:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9/10 Regression] |[8/9 Regression]
|-fcompare-debug failure on |-fcompare-debug failure on
|phi-opt-13.c |phi-opt-13.c
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8/9 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
` (5 preceding siblings ...)
2020-03-19 9:26 ` [Bug tree-optimization/94211] [8/9 " jakub at gcc dot gnu.org
@ 2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
2020-04-07 20:00 ` [Bug tree-optimization/94211] [8 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-07 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:8db876e9c045c57d2dc5bd08a6e250f822efaad0
commit r9-8464-g8db876e9c045c57d2dc5bd08a6e250f822efaad0
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Mar 19 10:24:16 2020 +0100
phiopt: Avoid -fcompare-debug bug in phiopt [PR94211]
Two years ago, I've added support for up to 2 simple preparation statements
in value_replacement, but the
- && estimate_num_insns (assign, &eni_time_weights)
+ && estimate_num_insns (bb_seq (middle_bb), &eni_time_weights)
change, meant that we compute the cost of all those statements rather than
just the single assign that has been the single supported non-debug
statement in the bb before, doesn't do what I thought would do, gimple_seq
is just gimple * and thus it can't be really overloaded depending on
whether
we pass a single gimple * or a whole sequence. Which means in the last
two years it doesn't count all the statements, but only the first one.
With -g that happens to be a DEBUG_STMT, or it could be e.g. the first
preparation statement which could be much cheaper than the actual assign.
2020-03-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94211
* tree-ssa-phiopt.c (value_replacement): Use estimate_num_insns_seq
instead of estimate_num_insns for bb_seq (middle_bb). Rename
emtpy_or_with_defined_p variable to empty_or_with_defined_p, adjust
all uses.
* gcc.dg/pr94211.c: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
` (6 preceding siblings ...)
2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
@ 2020-04-07 20:00 ` jakub at gcc dot gnu.org
2020-09-17 14:25 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:20 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-07 20:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9 Regression] |[8 Regression]
|-fcompare-debug failure on |-fcompare-debug failure on
|phi-opt-13.c |phi-opt-13.c
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 9.4+ too.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
` (7 preceding siblings ...)
2020-04-07 20:00 ` [Bug tree-optimization/94211] [8 " jakub at gcc dot gnu.org
@ 2020-09-17 14:25 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:20 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-17 14:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:2b0aaa4970a8d174b00fb98b4d24550d1c9a4e3a
commit r8-10471-g2b0aaa4970a8d174b00fb98b4d24550d1c9a4e3a
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Mar 19 10:24:16 2020 +0100
phiopt: Avoid -fcompare-debug bug in phiopt [PR94211]
Two years ago, I've added support for up to 2 simple preparation statements
in value_replacement, but the
- && estimate_num_insns (assign, &eni_time_weights)
+ && estimate_num_insns (bb_seq (middle_bb), &eni_time_weights)
change, meant that we compute the cost of all those statements rather than
just the single assign that has been the single supported non-debug
statement in the bb before, doesn't do what I thought would do, gimple_seq
is just gimple * and thus it can't be really overloaded depending on
whether
we pass a single gimple * or a whole sequence. Which means in the last
two years it doesn't count all the statements, but only the first one.
With -g that happens to be a DEBUG_STMT, or it could be e.g. the first
preparation statement which could be much cheaper than the actual assign.
2020-03-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94211
* tree-ssa-phiopt.c (value_replacement): Use estimate_num_insns_seq
instead of estimate_num_insns for bb_seq (middle_bb). Rename
emtpy_or_with_defined_p variable to empty_or_with_defined_p, adjust
all uses.
* gcc.dg/pr94211.c: New test.
(cherry picked from commit 8db876e9c045c57d2dc5bd08a6e250f822efaad0)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/94211] [8 Regression] -fcompare-debug failure on phi-opt-13.c
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
` (8 preceding siblings ...)
2020-09-17 14:25 ` cvs-commit at gcc dot gnu.org
@ 2020-09-17 17:20 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-09-17 17:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94211
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 8.5 too.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-09-17 17:20 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 11:38 [Bug tree-optimization/94211] New: [9/10 Regression] -fcompare-debug failure on phi-opt-13.c zhroma at gcc dot gnu.org
2020-03-18 12:09 ` [Bug tree-optimization/94211] " rguenth at gcc dot gnu.org
2020-03-18 13:40 ` jakub at gcc dot gnu.org
2020-03-18 15:35 ` [Bug tree-optimization/94211] [8/9/10 " jakub at gcc dot gnu.org
2020-03-18 15:41 ` jakub at gcc dot gnu.org
2020-03-19 9:25 ` cvs-commit at gcc dot gnu.org
2020-03-19 9:26 ` [Bug tree-optimization/94211] [8/9 " jakub at gcc dot gnu.org
2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
2020-04-07 20:00 ` [Bug tree-optimization/94211] [8 " jakub at gcc dot gnu.org
2020-09-17 14:25 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:20 ` jakub 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).