* [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
@ 2006-06-30 5:55 ` pinskia at gcc dot gnu dot org
2006-07-14 19:11 ` dje at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-30 5:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-06-30 05:47 -------
Confirmed on the mainline.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.2.0
Last reconfirmed|0000-00-00 00:00:00 |2006-06-30 05:47:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
2006-06-30 5:55 ` [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143 pinskia at gcc dot gnu dot org
@ 2006-07-14 19:11 ` dje at gcc dot gnu dot org
2006-07-17 1:43 ` dje at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-07-14 19:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dje at gcc dot gnu dot org 2006-07-14 19:11 -------
This is because the E500 DOUBLE support wasn't prepared for complex doubles.
Index: rs6000.c
===================================================================
--- rs6000.c (revision 115431)
+++ rs6000.c (working copy)
@@ -3638,8 +3638,13 @@
if (FP_REGNO_P (regno))
return (GET_MODE_SIZE (mode) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD;
- if (TARGET_E500_DOUBLE && mode == DFmode)
- return 1;
+ if (TARGET_E500_DOUBLE)
+ {
+ if (mode == DFmode)
+ return 1;
+ if (mode == DCmode)
+ return 2;
+ }
if (SPE_SIMD_REGNO_P (regno) && TARGET_SPE && SPE_VECTOR_MODE (mode))
return (GET_MODE_SIZE (mode) + UNITS_PER_SPE_WORD - 1) /
UNITS_PER_SPE_WORD;
I could make this cuter with tests for FLOAT_MODE_P, but I am worried about the
effect on SPE vector modes and there are not enough mode to warrant a case
table, so just use an explicit test.
--
dje at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dje at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
2006-06-30 5:55 ` [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143 pinskia at gcc dot gnu dot org
2006-07-14 19:11 ` dje at gcc dot gnu dot org
@ 2006-07-17 1:43 ` dje at gcc dot gnu dot org
2006-07-17 2:05 ` dje at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-07-17 1:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dje at gcc dot gnu dot org 2006-07-17 01:43 -------
Double Complex on e500 with double GPRs fundamentally does not interact well
with GCC's current design. GCC does not want to have a double placed in the
same register that can contain an int if the width of the register for ints
cannot span the width of the register for float.
rs6000_hard_regno_nregs() can cover the e500 double case with:
if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode))
return (GET_MODE_SIZE (mode) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD;
which fixes the first dubreg_offset_representable_p() assert, but subreg_offset
with double nregs foir regno != int nregs for same regno intends this case for
"holes", e.g., XFmode spanning three 32-bit float words but four 32-bit int
words.
(In this example, xmode is DCmode and ymode is DFmode.)
For this special case, the function overrides the default (and correct) nregs
nregs_xmode = hard_regno_nregs[xregno][xmode];
with
nregs_xmode_unit_int * GET_MODE_NUNITS (xmode)
which is twice the number of units. However, ymode is calculated the normal
way. Hilarity ensues, e.g.,
gcc_assert ((mode_multiple % nregs_multiple) == 0);
fails.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-07-17 1:43 ` dje at gcc dot gnu dot org
@ 2006-07-17 2:05 ` dje at gcc dot gnu dot org
2006-11-23 0:16 ` jsm28 at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-07-17 2:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dje at gcc dot gnu dot org 2006-07-17 02:05 -------
Created an attachment (id=11902)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11902&action=view)
consistently calculate nregs for FLOAT_MODES
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-07-17 2:05 ` dje at gcc dot gnu dot org
@ 2006-11-23 0:16 ` jsm28 at gcc dot gnu dot org
2006-12-01 2:25 ` jsm28 at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-11-23 0:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jsm28 at gcc dot gnu dot org 2006-11-23 00:16 -------
Patch was discussed at
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00451.html
and had some objections from Geoff Keating.
I've come across another problem case and am testing another possible patch to
address both cases. If you take an SImode subreg of a DFmode register, offset
4, that is the low word of the register and so is representable and
subreg_regno_offset should return 0. But the conversion to integer units means
that it acts like taking an SImode subreg of a DImode value (and so returns 1,
taking the wrong register). I think the conversion to integer units is simply
wrong in these cases.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm28 at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-11-23 0:16 ` jsm28 at gcc dot gnu dot org
@ 2006-12-01 2:25 ` jsm28 at gcc dot gnu dot org
2006-12-01 2:28 ` [Bug target/24036] [4.1/4.2 Regression] " jsm28 at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-12-01 2:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jsm28 at gcc dot gnu dot org 2006-12-01 02:25 -------
Subject: Bug 24036
Author: jsm28
Date: Fri Dec 1 02:25:22 2006
New Revision: 119395
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119395
Log:
2006-12-01 Joseph Myers <joseph@codesourcery.com>
David Edelsohn <edelsohn@gnu.org>
PR target/24036
* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Document new target macros.
* defaults.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* config/i386/i386.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* rtlanal.c (subreg_regno_offset, subreg_offset_representable_p):
Use new macros to detect modes with holes; do not look at integer
units.
(subreg_offset_representable_p): Check for and disallow cases
where the modes use different numbers of bits from registers.
* config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode
constant for soft-float.
(rs6000_hard_regno_nregs): Use UNITS_PER_FP_WORD for e500 GPRs
containing doubles.
(rs6000_split_multireg_move): Use DFmode reg_mode for TFmode moves
in E500 double case.
* config/rs6000/rs6000.md (movtf): Allow soft-float.
(movtf_softfloat): New.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.h
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rs6000/rs6000.md
trunk/gcc/defaults.h
trunk/gcc/doc/tm.texi
trunk/gcc/rtlanal.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [4.1/4.2 Regression] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-12-01 2:25 ` jsm28 at gcc dot gnu dot org
@ 2006-12-01 2:28 ` jsm28 at gcc dot gnu dot org
2006-12-16 16:34 ` jsm28 at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-12-01 2:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jsm28 at gcc dot gnu dot org 2006-12-01 02:28 -------
Fixed on trunk. David's original patch posting identified this as a
regression, so we'll need to consider the fix for 4.2 and 4.1 if it proves
stable on trunk.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.3.0
Priority|P2 |P3
Summary|[e500] ICE in |[4.1/4.2 Regression] [e500]
|subreg_offset_representable_|ICE in
|p, at rtlanal.c:3143 |subreg_offset_representable_
| |p, at rtlanal.c:3143
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [4.1/4.2 Regression] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-12-01 2:28 ` [Bug target/24036] [4.1/4.2 Regression] " jsm28 at gcc dot gnu dot org
@ 2006-12-16 16:34 ` jsm28 at gcc dot gnu dot org
2006-12-16 19:25 ` jsm28 at gcc dot gnu dot org
2006-12-24 5:09 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-12-16 16:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jsm28 at gcc dot gnu dot org 2006-12-16 16:34 -------
Subject: Bug 24036
Author: jsm28
Date: Sat Dec 16 16:33:55 2006
New Revision: 119962
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119962
Log:
2006-12-16 Joseph Myers <joseph@codesourcery.com>
David Edelsohn <edelsohn@gnu.org>
PR target/24036
* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Document new target macros.
* defaults.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* config/i386/i386.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* rtlanal.c (subreg_regno_offset, subreg_offset_representable_p):
Use new macros to detect modes with holes; do not look at integer
units.
(subreg_offset_representable_p): Check for and disallow cases
where the modes use different numbers of bits from registers.
* config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode
constant for soft-float.
(rs6000_hard_regno_nregs): Use UNITS_PER_FP_WORD for e500 GPRs
containing doubles.
(rs6000_split_multireg_move): Use DFmode reg_mode for TFmode moves
in E500 double case.
* config/rs6000/rs6000.md (movtf): Allow soft-float.
(movtf_softfloat): New.
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/i386/i386.h
branches/gcc-4_2-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_2-branch/gcc/config/rs6000/rs6000.md
branches/gcc-4_2-branch/gcc/defaults.h
branches/gcc-4_2-branch/gcc/doc/tm.texi
branches/gcc-4_2-branch/gcc/rtlanal.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [4.1/4.2 Regression] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-12-16 16:34 ` jsm28 at gcc dot gnu dot org
@ 2006-12-16 19:25 ` jsm28 at gcc dot gnu dot org
2006-12-24 5:09 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-12-16 19:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jsm28 at gcc dot gnu dot org 2006-12-16 19:25 -------
Subject: Bug 24036
Author: jsm28
Date: Sat Dec 16 19:24:56 2006
New Revision: 119967
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119967
Log:
2006-12-16 Joseph Myers <joseph@codesourcery.com>
David Edelsohn <edelsohn@gnu.org>
PR target/24036
* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Document new target macros.
* defaults.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* config/i386/i386.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* rtlanal.c (subreg_regno_offset, subreg_offset_representable_p):
Use new macros to detect modes with holes; do not look at integer
units.
(subreg_offset_representable_p): Check for and disallow cases
where the modes use different numbers of bits from registers.
* config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode
constant for soft-float.
(rs6000_hard_regno_nregs): Use UNITS_PER_FP_WORD for e500 GPRs
containing doubles.
(rs6000_split_multireg_move): Use DFmode reg_mode for TFmode moves
in E500 double case.
* config/rs6000/rs6000.md (movtf): Allow soft-float.
(movtf_softfloat): New.
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/i386/i386.h
branches/gcc-4_1-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_1-branch/gcc/config/rs6000/rs6000.md
branches/gcc-4_1-branch/gcc/defaults.h
branches/gcc-4_1-branch/gcc/doc/tm.texi
branches/gcc-4_1-branch/gcc/rtlanal.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/24036] [4.1/4.2 Regression] [e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143
[not found] <bug-24036-11406@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-12-16 19:25 ` jsm28 at gcc dot gnu dot org
@ 2006-12-24 5:09 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-24 5:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2006-12-24 05:08 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24036
^ permalink raw reply [flat|nested] 10+ messages in thread