This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Jul 2011 22:12:39 +0000
- Subject: [Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403
- Auto-submitted: auto-generated
- References: <bug-47744-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744
--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-17 22:12:20 UTC ---
(In reply to comment #19)
> (In reply to comment #18)
>
> > This is the same as
> >
> > ---
> > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> > index c728c51..414b528 100644
> > --- a/gcc/config/i386/i386.c
> > +++ b/gcc/config/i386/i386.c
> > @@ -11380,7 +11382,6 @@ ix86_decompose_address (rtx addr, struct ix86_address
> > *out)
> > break;
> >
> > case REG:
> > - case SUBREG:
> > if (!base)
> > base = op;
> > else if (!index)
>
> No!
>
> Subreg of a reg is perfectly valid RTX here.
The code in question is
switch (GET_CODE (op))
{
...
case REG:
case SUBREG:
...
break;
...
default:
return 0;
}
case SUBREG:
if (GET_CODE (op) != REG)
return 0;
always return 0.