public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/61017] New: lra aborts on optional match_scratch
@ 2014-04-30 16:30 amylaar at gcc dot gnu.org
2014-04-30 16:36 ` [Bug rtl-optimization/61017] " amylaar at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-04-30 16:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61017
Bug ID: 61017
Summary: lra aborts on optional match_scratch
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: amylaar at gcc dot gnu.org
CC: vmakarov at gcc dot gnu.org
lra is still not able to compile libgcc2 for ARC:
./cc1 libgcc2.i -O2 -mlra
../../../../unisrc-209293-arc/libgcc/libgcc2.c:2105:1: internal compiler error:
in curr_insn_transform, at lra-constraints.c:3492
The abort happens for the doloop_end_i pattern.
It contains
(clobber (match_scratch:SI 3 "=X,X,&????r"))
and for that, a register is allocated in advance without regard to need:
lra.c:remove_scratches 1992ff
if (GET_CODE (*id->operand_loc[i]) == SCRATCH
&& GET_MODE (*id->operand_loc[i]) != VOIDmode)
{
insn_changed_p = true;
*id->operand_loc[i] = reg
= lra_create_new_reg (static_id->operand[i].mode,
*id->operand_loc[i], ALL_REGS, NULL);
As process_alr_operands find that no the alternative uses "X" for that operand,
it set this alternative to NO_REGS:
lra-constraints.c:process_alt_operands 1608ff
if (curr_static_id->operand_alternative[opalt_num].anything_ok)
{
/* Fast track for no constraints at all. */
curr_alt[nop] = NO_REGS;
CLEAR_HARD_REG_SET (curr_alt_set[nop]);
curr_alt_win[nop] = true;
curr_alt_match_win[nop] = false;
curr_alt_offmemok[nop] = false;
curr_alt_matches[nop] = -1;
continue;
}
which causes an abort later:
lra-constraints.c:curr_insn_transform 3486ff
if (REG_P (reg) && (regno = REGNO (reg)) >= FIRST_PSEUDO_REGISTER)
{
bool ok_p = in_class_p (reg, goal_alt[i], &new_class);
if (new_class != NO_REGS && get_reg_class (regno) != new_class)
{
lra_assert (ok_p);
lra_change_class (regno, new_class, " Change to", true);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug rtl-optimization/61017] lra aborts on optional match_scratch
2014-04-30 16:30 [Bug rtl-optimization/61017] New: lra aborts on optional match_scratch amylaar at gcc dot gnu.org
@ 2014-04-30 16:36 ` amylaar at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-04-30 16:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61017
--- Comment #1 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
Created attachment 32717
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32717&action=edit
preprocessed libgcc file
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-30 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30 16:30 [Bug rtl-optimization/61017] New: lra aborts on optional match_scratch amylaar at gcc dot gnu.org
2014-04-30 16:36 ` [Bug rtl-optimization/61017] " amylaar at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).