* [Bug debug/105586] [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
@ 2022-05-13 7:55 ` rguenth at gcc dot gnu.org
2022-05-13 9:31 ` jakub at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-13 7:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug debug/105586] [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
2022-05-13 7:55 ` [Bug debug/105586] " rguenth at gcc dot gnu.org
@ 2022-05-13 9:31 ` jakub at gcc dot gnu.org
2022-05-13 16:49 ` segher at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-13 9:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |jakub at gcc dot gnu.org,
| |linkw at gcc dot gnu.org,
| |segher at gcc dot gnu.org
Last reconfirmed| |2022-05-13
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The differences start during sched1 pass.
Could be the backend (rs6000_sched*, rs6000_variable_issue*) or the scheduler.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug debug/105586] [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
2022-05-13 7:55 ` [Bug debug/105586] " rguenth at gcc dot gnu.org
2022-05-13 9:31 ` jakub at gcc dot gnu.org
@ 2022-05-13 16:49 ` segher at gcc dot gnu.org
2022-05-16 2:47 ` linkw at gcc dot gnu.org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: segher at gcc dot gnu.org @ 2022-05-13 16:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
We have
+(debug_insn 11 10 81 2 (var_location:QI u8_1 (mem/c:QI (plus:DI (unspec:DI [
+ (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
+ (reg:DI 2 2)
+ ] UNSPEC_TOCREL)
+ (const_int 3 [0x3])) [1 g+3 S1 A8])) "../105586.c":11:8 -1
+ (nil))
(the first such unspec in the file), and sched1 does
+;; 0--> b 0: i 11 loc [unspec[`*.LANCHOR0',%2] 47+0x3]
:nothing:GENERAL_REGS+0(0)FLOAT_REGS+0(0)CR_REGS+0(0)SPECIAL_REGS+0(0)
with it. Things in debug_insns should not influence code generation.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug debug/105586] [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-05-13 16:49 ` segher at gcc dot gnu.org
@ 2022-05-16 2:47 ` linkw at gcc dot gnu.org
2022-05-19 12:41 ` jskumari at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-05-16 2:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jskumari at gcc dot gnu.org,
| |pthaugen at linux dot ibm.com
--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
btw, it doesn't need the cross build for reproduction, but if the native cpu
isn't power8, it needs the explicit option -mcpu=power8, otherwise cpu
power9/10 makes this issue gone.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug debug/105586] [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-05-16 2:47 ` linkw at gcc dot gnu.org
@ 2022-05-19 12:41 ` jskumari at gcc dot gnu.org
2022-09-07 15:35 ` [Bug rtl-optimization/105586] " cvs-commit at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jskumari at gcc dot gnu.org @ 2022-05-19 12:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Surya Kumari Jangala <jskumari at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jskumari at gcc dot gnu.org
--- Comment #4 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
I will look into the issue.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (4 preceding siblings ...)
2022-05-19 12:41 ` jskumari at gcc dot gnu.org
@ 2022-09-07 15:35 ` cvs-commit at gcc dot gnu.org
2022-10-19 10:08 ` [Bug rtl-optimization/105586] [11/12 " rguenth at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-07 15:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Surya Kumari Jangala
<jskumari@gcc.gnu.org>:
https://gcc.gnu.org/g:bec35caafae8db0278e1d037a7ba00c3e6899bbd
commit r13-2525-gbec35caafae8db0278e1d037a7ba00c3e6899bbd
Author: Surya Kumari Jangala <jskumari@linux.ibm.com>
Date: Tue Aug 2 23:00:03 2022 -0500
sched1: Fix -fcompare-debug issue in schedule_region [PR105586]
In schedule_region(), a basic block that does not contain any real insns
is not scheduled and the dfa state at the entry of the bb is not copied
to the fallthru basic block. However a DEBUG insn is treated as a real
insn, and if a bb contains non-real insns and a DEBUG insn, it's dfa
state is copied to the fallthru bb. This was resulting in
-fcompare-debug failure as the incoming dfa state of the fallthru block
is different with -g. We should always copy the dfa state of a bb to
it's fallthru bb even if the bb does not contain real insns.
2022-08-22 Surya Kumari Jangala <jskumari@linux.ibm.com>
gcc/
PR rtl-optimization/105586
* sched-rgn.cc (save_state_for_fallthru_edge): New function.
(schedule_region): Use it for all blocks.
gcc/testsuite/
PR rtl-optimization/105586
* gcc.target/powerpc/pr105586.c: New test.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (5 preceding siblings ...)
2022-09-07 15:35 ` [Bug rtl-optimization/105586] " cvs-commit at gcc dot gnu.org
@ 2022-10-19 10:08 ` rguenth at gcc dot gnu.org
2022-10-27 16:02 ` bergner at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-19 10:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |13.0
Priority|P3 |P2
Known to fail|13.0 |
Summary|[11/12/13 Regression] |[11/12 Regression]
|-fcompare-debug failure |-fcompare-debug failure
|(length) with -O2 |(length) with -O2
|-fno-if-conversion |-fno-if-conversion
|-mtune=power4 |-mtune=power4
|-fno-guess-branch-probabili |-fno-guess-branch-probabili
|ty |ty
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (6 preceding siblings ...)
2022-10-19 10:08 ` [Bug rtl-optimization/105586] [11/12 " rguenth at gcc dot gnu.org
@ 2022-10-27 16:02 ` bergner at gcc dot gnu.org
2022-10-27 17:58 ` segher at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-10-27 16:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #7 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to CVS Commits from comment #5)
> The master branch has been updated by Surya Kumari Jangala
> <jskumari@gcc.gnu.org>:
>
> https://gcc.gnu.org/g:bec35caafae8db0278e1d037a7ba00c3e6899bbd
>
> commit r13-2525-gbec35caafae8db0278e1d037a7ba00c3e6899bbd
> Author: Surya Kumari Jangala <jskumari@linux.ibm.com>
> Date: Tue Aug 2 23:00:03 2022 -0500
>
> sched1: Fix -fcompare-debug issue in schedule_region [PR105586]
Surya, I think this has baked on trunk long enough, so if you have approval to
backport, I think you can do that now.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (7 preceding siblings ...)
2022-10-27 16:02 ` bergner at gcc dot gnu.org
@ 2022-10-27 17:58 ` segher at gcc dot gnu.org
2022-10-27 18:01 ` segher at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: segher at gcc dot gnu.org @ 2022-10-27 17:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Please do that together with the follow-up fix only? PR107171.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (8 preceding siblings ...)
2022-10-27 17:58 ` segher at gcc dot gnu.org
@ 2022-10-27 18:01 ` segher at gcc dot gnu.org
2022-11-08 12:56 ` jskumari at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: segher at gcc dot gnu.org @ 2022-10-27 18:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
--- Comment #9 from Segher Boessenkool <segher at gcc dot gnu.org> ---
I read <https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601914.html>
as approval to backport, fwiw :-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (9 preceding siblings ...)
2022-10-27 18:01 ` segher at gcc dot gnu.org
@ 2022-11-08 12:56 ` jskumari at gcc dot gnu.org
2022-11-08 14:23 ` segher at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jskumari at gcc dot gnu.org @ 2022-11-08 12:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
--- Comment #10 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #9)
> I read <https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601914.html>
> as approval to backport, fwiw :-)
I read that as: Since it is *not* a regression, no need to backport.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (10 preceding siblings ...)
2022-11-08 12:56 ` jskumari at gcc dot gnu.org
@ 2022-11-08 14:23 ` segher at gcc dot gnu.org
2022-11-09 6:36 ` jskumari at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: segher at gcc dot gnu.org @ 2022-11-08 14:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
--- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Ah. It's a nasty bug, so "safe side" is to *do* fix it, in my reading. But
you
can also say "not doing anything" (so, staying susceptible to the bug) is
safer.
It happens rather infrequently after all.
Just follow up, ask for clarification?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (11 preceding siblings ...)
2022-11-08 14:23 ` segher at gcc dot gnu.org
@ 2022-11-09 6:36 ` jskumari at gcc dot gnu.org
2022-11-09 16:51 ` jskumari at gcc dot gnu.org
2023-05-05 21:42 ` pinskia at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jskumari at gcc dot gnu.org @ 2022-11-09 6:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
--- Comment #12 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
Richard has clarified here
(https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605386.html) that
backporting is not required.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (12 preceding siblings ...)
2022-11-09 6:36 ` jskumari at gcc dot gnu.org
@ 2022-11-09 16:51 ` jskumari at gcc dot gnu.org
2023-05-05 21:42 ` pinskia at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jskumari at gcc dot gnu.org @ 2022-11-09 16:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Surya Kumari Jangala <jskumari at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #13 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
Closing the bug as it is fixed on trunk and we don't plan to backport it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/105586] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability
2022-05-12 19:08 [Bug debug/105586] New: [11/12/13 Regression] -fcompare-debug failure (length) with -O2 -fno-if-conversion -mtune=power4 -fno-guess-branch-probability zsojka at seznam dot cz
` (13 preceding siblings ...)
2022-11-09 16:51 ` jskumari at gcc dot gnu.org
@ 2023-05-05 21:42 ` pinskia at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-05 21:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105586
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |13.0
^ permalink raw reply [flat|nested] 16+ messages in thread