This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/68973] [6 regression] Internal compiler error on power for gcc/testsuite/g++.dg/pr67211.C
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Feb 2016 12:05:20 +0000
- Subject: [Bug target/68973] [6 regression] Internal compiler error on power for gcc/testsuite/g++.dg/pr67211.C
- Auto-submitted: auto-generated
- References: <bug-68973-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68973
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amodra at gmail dot com
--- Comment #14 from Alan Modra <amodra at gmail dot com> ---
This looks like a reload problem. The pr67211.C testcase on powerpc64le gives
reload this insn
(insn 155 153 156 8 (set (reg/f:DI 178 [ p3$_M_first ])
(mem/f:DI (pre_inc:DI (reg/f:DI 185 [ p3$_M_node ])) [3 MEM[base: _9,
offset: 0B]+0 S8 A64])) /src/gcc.git/gcc/testsuite/g++.dg/pr67211.C:28 550
{*movdi_internal64}
(expr_list:REG_INC (reg/f:DI 185 [ p3$_M_node ])
(nil)))
and reload chooses to put reg 185 in fr31, likely due to using that reg in
vector insns elsewhere. Of course, (pre_inc:DI (reg/f:DI 63)) isn't a valid
memory address so it needs reloading. reload does that by reloading the entire
address into a gpr rather than just reloading fr31. Unfortunately neither the
rs6000 backend machinery nor the code in push_reload that normally handles
secondary memory sees that a secondary reload is needed.
There is some pre_inc code in find_reloads_address_1 that could reload just
fr31 but that is currently only active for regs that already have a mem.
Making that code active for invalid hard regs cures this failure.
Another fix is to disable the auto_inc_dec pass (maybe we should do that anyway
for powerpc processors where the update forms of memory insns are slow).