* [Bug debug/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
@ 2022-03-24 9:02 ` rguenth at gcc dot gnu.org
2022-03-29 21:58 ` bergner at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-24 9:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Or the one Alex just fixed for -fharden-compares.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug debug/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
2022-03-24 9:02 ` [Bug debug/105041] " rguenth at gcc dot gnu.org
@ 2022-03-29 21:58 ` bergner at gcc dot gnu.org
2022-03-29 22:13 ` bergner at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-03-29 21:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-03-29
CC| |bergner at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Peter Bergner <bergner at gcc dot gnu.org> ---
Confirmed. This only seems to fail for me on BE and using -m32. It passes
when compiled with -mcpu={7,8,9} and fails using -mcpu={4,5,6,10}.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug debug/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
2022-03-24 9:02 ` [Bug debug/105041] " rguenth at gcc dot gnu.org
2022-03-29 21:58 ` bergner at gcc dot gnu.org
@ 2022-03-29 22:13 ` bergner at gcc dot gnu.org
2022-04-01 13:33 ` bergner at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-03-29 22:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
--- Comment #3 from Peter Bergner <bergner at gcc dot gnu.org> ---
The first real change I see does occur in the rnreg dump file.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug debug/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (2 preceding siblings ...)
2022-03-29 22:13 ` bergner at gcc dot gnu.org
@ 2022-04-01 13:33 ` bergner at gcc dot gnu.org
2022-04-05 22:46 ` segher at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-04-01 13:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
Given this only affects 32-bit BE compiles that use the uncommonly used option
-frename-registers, I'm dropping the importance to P4.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug debug/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (3 preceding siblings ...)
2022-04-01 13:33 ` bergner at gcc dot gnu.org
@ 2022-04-05 22:46 ` segher at gcc dot gnu.org
2022-04-07 5:30 ` jskumari at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-05 22:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> ---
It is not so uncommon at all: it is enabled by -funroll-loops, which is used
quite often.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug debug/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (4 preceding siblings ...)
2022-04-05 22:46 ` segher at gcc dot gnu.org
@ 2022-04-07 5:30 ` jskumari at gcc dot gnu.org
2022-06-14 17:39 ` [Bug rtl-optimization/105041] " cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jskumari at gcc dot gnu.org @ 2022-04-07 5:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
--- Comment #6 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
I will be debugging the issue to figure the root cause.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (5 preceding siblings ...)
2022-04-07 5:30 ` jskumari at gcc dot gnu.org
@ 2022-06-14 17:39 ` cvs-commit at gcc dot gnu.org
2022-06-15 5:25 ` jskumari at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-14 17:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:
https://gcc.gnu.org/g:3e16b4359e86b36676ed01219e6deafa95f3c16b
commit r13-1092-g3e16b4359e86b36676ed01219e6deafa95f3c16b
Author: Surya Kumari Jangala <jskumari@linux.vnet.ibm.com>
Date: Fri Jun 10 19:52:57 2022 +0530
regrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041]
In check_new_reg_p, the nregs of a du chain is computed by obtaining the
MODE of the first element in the chain, and then calling
hard_regno_nregs() with the MODE. But the first element of the chain can
be a DEBUG_INSN whose mode need not be the same as the rest of the
elements in the du chain. This was resulting in fcompare-debug failure
as check_new_reg_p was returning a different result with -g for the same
candidate register. We can instead obtain nregs from the du chain
itself.
2022-06-10 Surya Kumari Jangala <jskumari@linux.ibm.com>
gcc/
PR rtl-optimization/105041
* regrename.cc (check_new_reg_p): Use nregs value from du chain.
gcc/testsuite/
PR rtl-optimization/105041
* gcc.target/powerpc/pr105041.c: New test.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (6 preceding siblings ...)
2022-06-14 17:39 ` [Bug rtl-optimization/105041] " cvs-commit at gcc dot gnu.org
@ 2022-06-15 5:25 ` jskumari at gcc dot gnu.org
2022-06-16 5:08 ` jskumari at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jskumari at gcc dot gnu.org @ 2022-06-15 5:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
Surya Kumari Jangala <jskumari at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #8 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (7 preceding siblings ...)
2022-06-15 5:25 ` jskumari at gcc dot gnu.org
@ 2022-06-16 5:08 ` jskumari at gcc dot gnu.org
2022-07-14 14:07 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jskumari at gcc dot gnu.org @ 2022-06-16 5:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
Surya Kumari Jangala <jskumari at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
--- Comment #9 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
Reopening the bug as we need to backport the fix.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (8 preceding siblings ...)
2022-06-16 5:08 ` jskumari at gcc dot gnu.org
@ 2022-07-14 14:07 ` cvs-commit at gcc dot gnu.org
2022-07-21 6:38 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-14 14:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Surya Kumari Jangala
<jskumari@gcc.gnu.org>:
https://gcc.gnu.org/g:0380d008b1474373852fd2fc921886491304f854
commit r12-8568-g0380d008b1474373852fd2fc921886491304f854
Author: Surya Kumari Jangala <jskumari@linux.vnet.ibm.com>
Date: Fri Jun 10 19:52:57 2022 +0530
regrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041]
In check_new_reg_p, the nregs of a du chain is computed by obtaining the
MODE of the first element in the chain, and then calling
hard_regno_nregs() with the MODE. But the first element of the chain can
be a DEBUG_INSN whose mode need not be the same as the rest of the
elements in the du chain. This was resulting in fcompare-debug failure
as check_new_reg_p was returning a different result with -g for the same
candidate register. We can instead obtain nregs from the du chain
itself.
2022-06-10 Surya Kumari Jangala <jskumari@linux.ibm.com>
gcc/
PR rtl-optimization/105041
* regrename.cc (check_new_reg_p): Use nregs value from du chain.
gcc/testsuite/
PR rtl-optimization/105041
* gcc.target/powerpc/pr105041.c: New test.
(cherry picked from commit 3e16b4359e86b36676ed01219e6deafa95f3c16b)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (9 preceding siblings ...)
2022-07-14 14:07 ` cvs-commit at gcc dot gnu.org
@ 2022-07-21 6:38 ` cvs-commit at gcc dot gnu.org
2022-07-22 9:53 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-21 6:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Surya Kumari Jangala
<jskumari@gcc.gnu.org>:
https://gcc.gnu.org/g:8522fab3f900d6fe0cc43be52fdd850f5c9c44db
commit r11-10156-g8522fab3f900d6fe0cc43be52fdd850f5c9c44db
Author: Surya Kumari Jangala <jskumari@linux.vnet.ibm.com>
Date: Fri Jun 10 19:52:57 2022 +0530
regrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041]
In check_new_reg_p, the nregs of a du chain is computed by obtaining the
MODE of the first element in the chain, and then calling
hard_regno_nregs() with the MODE. But the first element of the chain can
be a DEBUG_INSN whose mode need not be the same as the rest of the
elements in the du chain. This was resulting in fcompare-debug failure
as check_new_reg_p was returning a different result with -g for the same
candidate register. We can instead obtain nregs from the du chain
itself.
2022-06-10 Surya Kumari Jangala <jskumari@linux.ibm.com>
gcc/
PR rtl-optimization/105041
* regrename.c (check_new_reg_p): Use nregs value from du chain.
gcc/testsuite/
PR rtl-optimization/105041
* gcc.target/powerpc/pr105041.c: New test.
(cherry picked from commit 3e16b4359e86b36676ed01219e6deafa95f3c16b)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (10 preceding siblings ...)
2022-07-21 6:38 ` cvs-commit at gcc dot gnu.org
@ 2022-07-22 9:53 ` cvs-commit at gcc dot gnu.org
2022-07-23 6:55 ` asolokha at gmx dot com
2022-07-23 16:28 ` bergner at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-22 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Surya Kumari Jangala
<jskumari@gcc.gnu.org>:
https://gcc.gnu.org/g:2753c7d0cd95a3db9d97c5ee674917ad11de5246
commit r10-10907-g2753c7d0cd95a3db9d97c5ee674917ad11de5246
Author: Surya Kumari Jangala <jskumari@linux.vnet.ibm.com>
Date: Fri Jun 10 19:52:57 2022 +0530
regrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041]
In check_new_reg_p, the nregs of a du chain is computed by obtaining the
MODE of the first element in the chain, and then calling
hard_regno_nregs() with the MODE. But the first element of the chain can
be a DEBUG_INSN whose mode need not be the same as the rest of the
elements in the du chain. This was resulting in fcompare-debug failure
as check_new_reg_p was returning a different result with -g for the same
candidate register. We can instead obtain nregs from the du chain
itself.
2022-06-10 Surya Kumari Jangala <jskumari@linux.ibm.com>
gcc/
PR rtl-optimization/105041
* regrename.c (check_new_reg_p): Use nregs value from du chain.
gcc/testsuite/
PR rtl-optimization/105041
* gcc.target/powerpc/pr105041.c: New test.
(cherry picked from commit 3e16b4359e86b36676ed01219e6deafa95f3c16b)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (11 preceding siblings ...)
2022-07-22 9:53 ` cvs-commit at gcc dot gnu.org
@ 2022-07-23 6:55 ` asolokha at gmx dot com
2022-07-23 16:28 ` bergner at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: asolokha at gmx dot com @ 2022-07-23 6:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
--- Comment #13 from Arseny Solokha <asolokha at gmx dot com> ---
After the fix was backported to all open branches, should this PR be closed?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
2022-03-24 7:38 [Bug debug/105041] New: '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers asolokha at gmx dot com
` (12 preceding siblings ...)
2022-07-23 6:55 ` asolokha at gmx dot com
@ 2022-07-23 16:28 ` bergner at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-07-23 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105041
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #14 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Arseny Solokha from comment #13)
> After the fix was backported to all open branches, should this PR be closed?
Yes. Marking as fixed. Thanks Surya!
^ permalink raw reply [flat|nested] 15+ messages in thread