This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR target/65242, Fix powerpc abort in gen_add2_insn
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Mon, 9 Mar 2015 19:30:10 -0400
- Subject: [PATCH] PR target/65242, Fix powerpc abort in gen_add2_insn
- Authentication-results: sourceware.org; auth=none
This bug was one I unfortunately introduced with the -mupper-regs support. If
the reload pass needed to reload a PLUS operation (for example, due to using
odd address with the LD/STD instructions), it would go through all of the
registers you could load DImode into, and see if it is a preferred register
class. This lead the compiler to believe it could do integer arithmetic in the
floating point registers.
This patch fixes the problem, by not allowing PLUS to be reloaded into FPR
registers. I have done bootstraps and make checks on both a big endian Power7
and a little endian Power8 system, and there were no regressions. Is the patch
ok to apply? I do not believe it needs to be back ported to GCC 4.9 since the
-mupper-regs changes are not installed currently on that branch.
[gcc]
2015-03-09 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/65242
* config/rs6000/rs6000.c (rs6000_preferred_reload_class): Do not
allow reloads of PLUS in floating point/VSX registers.
[gcc/testsuite]
2015-03-09 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/65242
* g++.dg/pr65242.C: New test.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797