[Bug rtl-optimization/105041] '-fcompare-debug' failure w/ -mcpu=power6 -O2 -fharden-compares -frename-registers
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 21 06:38:16 GMT 2022
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)
More information about the Gcc-bugs
mailing list