public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/14927] New: [ia64] ICE in gen_movxf
@ 2004-04-12 19:37 schwab at suse dot de
2004-04-12 19:49 ` [Bug target/14927] " schwab at suse dot de
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: schwab at suse dot de @ 2004-04-12 19:37 UTC (permalink / raw)
To: gcc-bugs
$ cat scalar-by-value-3_x.i
_Complex long double g01cld;
extern void testvacld (int n, ...);
void testitcld (void)
{
testvacld (1, g01cld);
}
$ ./xgcc -B./ scalar-by-value-3_x.i
scalar-by-value-3_x.i: In function `testitcld':
scalar-by-value-3_x.i:6: internal compiler error: in gen_movxf, at
insn-emit.c:2389
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: [ia64] ICE in gen_movxf
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schwab at suse dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14927
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/14927] [ia64] ICE in gen_movxf
2004-04-12 19:37 [Bug target/14927] New: [ia64] ICE in gen_movxf schwab at suse dot de
@ 2004-04-12 19:49 ` schwab at suse dot de
2004-04-23 7:29 ` wilson at specifixinc dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: schwab at suse dot de @ 2004-04-12 19:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.0 3.1 3.2 3.3.4 3.4.0
| |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14927
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/14927] [ia64] ICE in gen_movxf
2004-04-12 19:37 [Bug target/14927] New: [ia64] ICE in gen_movxf schwab at suse dot de
2004-04-12 19:49 ` [Bug target/14927] " schwab at suse dot de
@ 2004-04-23 7:29 ` wilson at specifixinc dot com
2004-04-27 6:23 ` cvs-commit at gcc dot gnu dot org
2004-04-27 8:55 ` giovannibajo at libero dot it
3 siblings, 0 replies; 5+ messages in thread
From: wilson at specifixinc dot com @ 2004-04-23 7:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at specifixinc dot com 2004-04-23 06:17 -------
Subject: Re: New: [ia64] ICE in gen_movxf
schwab at suse dot de wrote:
> scalar-by-value-3_x.i: In function `testitcld':
> scalar-by-value-3_x.i:6: internal compiler error: in gen_movxf, at
This is a long latent SUBREG problem, going back at least 4 years to
when some of the long double code was originally added.
The movxf pattern fails to handle the case where operands[0] is a SUBREG
of a GR reg. While looking at the code, I noticed a second latent
problem. There is one place where we are accidentally applying
SUBREG_REG to a GR reg. I tried to fix that too, though I don't have a
testcase for it.
The following patch works for this testcase, but is as yet untested.
2004-04-22 James E Wilson <wilson@specifixinc.com>
* config/ia64/ia64.md (movxf): New local op0. Handle case where
operands[0] is a SUBREG. Handle case where operands[1] is a GR reg.
Index: ia64.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.md,v
retrieving revision 1.128
diff -p -r1.128 ia64.md
*** ia64.md 21 Apr 2004 01:39:17 -0000 1.128
--- ia64.md 23 Apr 2004 06:12:47 -0000
***************
*** 677,688 ****
(match_operand:XF 1 "general_operand" ""))]
""
{
/* We must support XFmode loads into general registers for stdarg/vararg
and unprototyped calls. We split them into DImode loads for convenience.
We don't need XFmode stores from general regs, because a stdarg/vararg
routine does a block store to memory of unnamed arguments. */
! if (GET_CODE (operands[0]) == REG
! && GR_REGNO_P (REGNO (operands[0])))
{
/* We're hoping to transform everything that deals with XFmode
quantities and GR registers early in the compiler. */
--- 677,693 ----
(match_operand:XF 1 "general_operand" ""))]
""
{
+ rtx op0 = operands[0];
+
+ if (GET_CODE (op0) == SUBREG)
+ op0 = SUBREG_REG (op0);
+
/* We must support XFmode loads into general registers for stdarg/vararg
and unprototyped calls. We split them into DImode loads for convenience.
We don't need XFmode stores from general regs, because a stdarg/vararg
routine does a block store to memory of unnamed arguments. */
!
! if (GET_CODE (op0) == REG && GR_REGNO_P (REGNO (op0)))
{
/* We're hoping to transform everything that deals with XFmode
quantities and GR registers early in the compiler. */
***************
*** 695,710 ****
|| (GET_CODE (operands[1]) == REG
&& GR_REGNO_P (REGNO (operands[1]))))
{
! emit_move_insn (gen_rtx_REG (TImode, REGNO (operands[0])),
! SUBREG_REG (operands[1]));
DONE;
}
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
! emit_move_insn (gen_rtx_REG (DImode, REGNO (operands[0])),
operand_subword (operands[1], 0, 0, XFmode));
! emit_move_insn (gen_rtx_REG (DImode, REGNO (operands[0]) + 1),
operand_subword (operands[1], 1, 0, XFmode));
DONE;
}
--- 700,722 ----
|| (GET_CODE (operands[1]) == REG
&& GR_REGNO_P (REGNO (operands[1]))))
{
! rtx op1 = operands[1];
!
! if (GET_CODE (op1) == SUBREG)
! op1 = SUBREG_REG (op1);
! else
! /* ??? Maybe we should make a SUBREG here? */
! op1 = gen_rtx_REG (TImode, REGNO (op1));
!
! emit_move_insn (gen_rtx_REG (TImode, REGNO (op0)), op1);
DONE;
}
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
! emit_move_insn (gen_rtx_REG (DImode, REGNO (op0)),
operand_subword (operands[1], 0, 0, XFmode));
! emit_move_insn (gen_rtx_REG (DImode, REGNO (op0) + 1),
operand_subword (operands[1], 1, 0, XFmode));
DONE;
}
***************
*** 717,724 ****
{
rtx out[2];
! out[WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (operands[0]));
! out[!WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (operands[0])+1);
emit_move_insn (out[0], adjust_address (operands[1], DImode, 0));
emit_move_insn (out[1], adjust_address (operands[1], DImode, 8));
--- 729,736 ----
{
rtx out[2];
! out[WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (op0));
! out[!WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (op0) + 1);
emit_move_insn (out[0], adjust_address (operands[1], DImode, 0));
emit_move_insn (out[1], adjust_address (operands[1], DImode, 8));
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14927
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/14927] [ia64] ICE in gen_movxf
2004-04-12 19:37 [Bug target/14927] New: [ia64] ICE in gen_movxf schwab at suse dot de
2004-04-12 19:49 ` [Bug target/14927] " schwab at suse dot de
2004-04-23 7:29 ` wilson at specifixinc dot com
@ 2004-04-27 6:23 ` cvs-commit at gcc dot gnu dot org
2004-04-27 8:55 ` giovannibajo at libero dot it
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-27 6:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-04-27 05:19 -------
Subject: Bug 14927
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: wilson@gcc.gnu.org 2004-04-27 05:19:50
Modified files:
gcc : ChangeLog
gcc/config/ia64: ia64.md
Log message:
Bug 14927
* config/ia64/ia64.md (movxf): New local op0. Handle case where
operands[0] is a SUBREG. Handle case where operands[1] is a GR reg.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3489&r2=2.3490
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.md.diff?cvsroot=gcc&r1=1.128&r2=1.129
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14927
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/14927] [ia64] ICE in gen_movxf
2004-04-12 19:37 [Bug target/14927] New: [ia64] ICE in gen_movxf schwab at suse dot de
` (2 preceding siblings ...)
2004-04-27 6:23 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-27 8:55 ` giovannibajo at libero dot it
3 siblings, 0 replies; 5+ messages in thread
From: giovannibajo at libero dot it @ 2004-04-27 8:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-04-27 07:35 -------
Fixed by Jim's patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14927
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-04-27 7:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-12 19:37 [Bug target/14927] New: [ia64] ICE in gen_movxf schwab at suse dot de
2004-04-12 19:49 ` [Bug target/14927] " schwab at suse dot de
2004-04-23 7:29 ` wilson at specifixinc dot com
2004-04-27 6:23 ` cvs-commit at gcc dot gnu dot org
2004-04-27 8:55 ` giovannibajo at libero dot it
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).