* [Bug debug/100148] [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
@ 2021-04-19 17:07 ` jakub at gcc dot gnu.org
2021-04-19 18:05 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-19 17:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |NEW
Target Milestone|--- |10.4
Last reconfirmed| |2021-04-19
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r10-7268-g529ea7d9596b26ba103578eeab448e9862a2d2c5
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/100148] [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
2021-04-19 17:07 ` [Bug debug/100148] " jakub at gcc dot gnu.org
@ 2021-04-19 18:05 ` jakub at gcc dot gnu.org
2021-04-20 13:31 ` [Bug rtl-optimization/100148] [10/11/12 " jakub at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-19 18:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I bet it goes wrong during cprop1, at least fwprop1 dumps with --param
min-nondebug-insn-uid=10000 look good to me and cprop1 contains
-rescanning insn with uid = 10033.
-GLOBAL CONST-PROP: Replacing reg 82 in jump_insn 10033 with constant
(const_int 0 [0])
-Purged edges from bb 8
-deleting insn with uid = 10033.
-GLOBAL CONST-PROP: Replacing reg 82 in insn 10029 with constant (const_int 0
[0])
-CPROP of foo, 14 basic blocks, 592 bytes needed, 0 local const props, 0 local
copy props, 2 global const props, 0 global copy props
+CPROP of foo, 14 basic blocks, 592 bytes needed, 0 local const props, 0 local
copy props, 0 global const props, 0 global copy props
as the first major difference.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [10/11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
2021-04-19 17:07 ` [Bug debug/100148] " jakub at gcc dot gnu.org
2021-04-19 18:05 ` jakub at gcc dot gnu.org
@ 2021-04-20 13:31 ` jakub at gcc dot gnu.org
2021-04-20 13:38 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-20 13:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [10/11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (2 preceding siblings ...)
2021-04-20 13:31 ` [Bug rtl-optimization/100148] [10/11/12 " jakub at gcc dot gnu.org
@ 2021-04-20 13:38 ` jakub at gcc dot gnu.org
2021-04-21 10:32 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-20 13:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50637
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50637&action=edit
gcc11-pr100148.patch
Untested fix.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [10/11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (3 preceding siblings ...)
2021-04-20 13:38 ` jakub at gcc dot gnu.org
@ 2021-04-21 10:32 ` cvs-commit at gcc dot gnu.org
2021-04-21 10:38 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-21 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
--- 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:022f6ee3ad67ee30f62c8c2aeeb4156494f3284e
commit r12-24-g022f6ee3ad67ee30f62c8c2aeeb4156494f3284e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Apr 21 12:31:45 2021 +0200
cprop: Fix -fcompare-debug bug in constprop_register [PR100148]
The following testcase shows different behavior between -g and -g0
in constprop_register, if a flags register setter is separated
from a conditional jump using those flags with -g by a DEBUG_INSN.
As it uses just NEXT_INSN, for -g it will look at the DEBUG_INSN which is
not a conditional jump, while otherwise it would look at the conditional
jump and call cprop_jump.
2021-04-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/100148
* cprop.c (constprop_register): Use next_nondebug_insn instead of
NEXT_INSN.
* g++.dg/opt/pr100148.C: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [10/11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (4 preceding siblings ...)
2021-04-21 10:32 ` cvs-commit at gcc dot gnu.org
@ 2021-04-21 10:38 ` cvs-commit at gcc dot gnu.org
2021-04-21 10:39 ` [Bug rtl-optimization/100148] [11 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-21 10:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:63353b2aebd2cf171ee8aa747b2dc84f5534de6b
commit r10-9741-g63353b2aebd2cf171ee8aa747b2dc84f5534de6b
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Apr 21 12:31:45 2021 +0200
cprop: Fix -fcompare-debug bug in constprop_register [PR100148]
The following testcase shows different behavior between -g and -g0
in constprop_register, if a flags register setter is separated
from a conditional jump using those flags with -g by a DEBUG_INSN.
As it uses just NEXT_INSN, for -g it will look at the DEBUG_INSN which is
not a conditional jump, while otherwise it would look at the conditional
jump and call cprop_jump.
2021-04-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/100148
* cprop.c (constprop_register): Use next_nondebug_insn instead of
NEXT_INSN.
* g++.dg/opt/pr100148.C: New test.
(cherry picked from commit 022f6ee3ad67ee30f62c8c2aeeb4156494f3284e)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (5 preceding siblings ...)
2021-04-21 10:38 ` cvs-commit at gcc dot gnu.org
@ 2021-04-21 10:39 ` jakub at gcc dot gnu.org
2021-04-27 13:32 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-21 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12 Regression] |[11 Regression]
|-fcompare-debug failure |-fcompare-debug failure
|(length) with -O2 -fno-dce |(length) with -O2 -fno-dce
|-fno-tree-dce |-fno-tree-dce
|-fno-tree-dominator-opts |-fno-tree-dominator-opts
|-fno-tree-sink |-fno-tree-sink
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on trunk and for 10.4 so far, queued for 11.2.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (6 preceding siblings ...)
2021-04-21 10:39 ` [Bug rtl-optimization/100148] [11 " jakub at gcc dot gnu.org
@ 2021-04-27 13:32 ` cvs-commit at gcc dot gnu.org
2021-04-27 13:35 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 13:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:12333b7e7636d7337054b85d37cb2def3b2e4ca4
commit r11-8296-g12333b7e7636d7337054b85d37cb2def3b2e4ca4
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Apr 21 12:31:45 2021 +0200
cprop: Fix -fcompare-debug bug in constprop_register [PR100148]
The following testcase shows different behavior between -g and -g0
in constprop_register, if a flags register setter is separated
from a conditional jump using those flags with -g by a DEBUG_INSN.
As it uses just NEXT_INSN, for -g it will look at the DEBUG_INSN which is
not a conditional jump, while otherwise it would look at the conditional
jump and call cprop_jump.
2021-04-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/100148
* cprop.c (constprop_register): Use next_nondebug_insn instead of
NEXT_INSN.
* g++.dg/opt/pr100148.C: New test.
(cherry picked from commit 022f6ee3ad67ee30f62c8c2aeeb4156494f3284e)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (7 preceding siblings ...)
2021-04-27 13:32 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 13:35 ` jakub at gcc dot gnu.org
2021-05-04 12:21 ` cvs-commit at gcc dot gnu.org
2021-05-04 12:26 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 11.2 too.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (8 preceding siblings ...)
2021-04-27 13:35 ` jakub at gcc dot gnu.org
@ 2021-05-04 12:21 ` cvs-commit at gcc dot gnu.org
2021-05-04 12:26 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-04 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
--- Comment #9 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:959719061ab3e9cfa11a2551e20cc0d8c5570a4c
commit r9-9503-g959719061ab3e9cfa11a2551e20cc0d8c5570a4c
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Apr 21 12:31:45 2021 +0200
cprop: Fix -fcompare-debug bug in constprop_register [PR100148]
The following testcase shows different behavior between -g and -g0
in constprop_register, if a flags register setter is separated
from a conditional jump using those flags with -g by a DEBUG_INSN.
As it uses just NEXT_INSN, for -g it will look at the DEBUG_INSN which is
not a conditional jump, while otherwise it would look at the conditional
jump and call cprop_jump.
2021-04-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/100148
* cprop.c (constprop_register): Use next_nondebug_insn instead of
NEXT_INSN.
* g++.dg/opt/pr100148.C: New test.
(cherry picked from commit 022f6ee3ad67ee30f62c8c2aeeb4156494f3284e)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/100148] [11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink
2021-04-19 16:47 [Bug debug/100148] New: [10/11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink zsojka at seznam dot cz
` (9 preceding siblings ...)
2021-05-04 12:21 ` cvs-commit at gcc dot gnu.org
@ 2021-05-04 12:26 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-04 12:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100148
--- Comment #10 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:bef3ed832a97b0cdfb540fc5c5dee923ccdc540a
commit r8-10944-gbef3ed832a97b0cdfb540fc5c5dee923ccdc540a
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Apr 21 12:31:45 2021 +0200
cprop: Fix -fcompare-debug bug in constprop_register [PR100148]
The following testcase shows different behavior between -g and -g0
in constprop_register, if a flags register setter is separated
from a conditional jump using those flags with -g by a DEBUG_INSN.
As it uses just NEXT_INSN, for -g it will look at the DEBUG_INSN which is
not a conditional jump, while otherwise it would look at the conditional
jump and call cprop_jump.
2021-04-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/100148
* cprop.c (constprop_register): Use next_nondebug_insn instead of
NEXT_INSN.
* g++.dg/opt/pr100148.C: New test.
(cherry picked from commit 022f6ee3ad67ee30f62c8c2aeeb4156494f3284e)
^ permalink raw reply [flat|nested] 12+ messages in thread