This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] rtx_cost of SUBREG
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org,Mark Dettinger <mdetting at yahoo dot com>
- Date: Sat, 22 Jan 2005 13:56:53 +0100
- Subject: Re: [Patch] rtx_cost of SUBREG
- References: <Pine.LNX.4.44.0501141057460.4535-100000@www.eyesopen.com>
> > 2005-01-14 Mark Dettinger <dettinge@de.ibm.com>
> >
> > * rtlanal.c (rtx_cost): Assign cost of 0 to a SUBREG
> > when modes are tieable.
>
> This looks reasonable to me. If nobody objects in the next day
> or two, feel free to go ahead and commit this to mainline.
May I ask you on which grounds this patch was accepted? Does it fix a bug?
I can tell you that it breaks bootstrap on SPARC 64-bit (stack overflow in the
combiner). Granted, the real problem is elsewhere (bad interaction between
apply_distributive_law and simplify_associative_operation, I can give the gory
details if you want) but I think tweaking the generic cost function at the
very end of stage3 is dangerous. I'm seeing this sort of things in the
combiner now:
(ior:DI (and:DI (and:DI (ior:DI (ior:DI (and:DI (subreg:DI (reg:SI 159) 0)
(const_int 4 [0x4]))
(subreg:DI (reg:SI 150) 0))
(subreg:DI (reg:SI 152) 0))
(subreg:DI (reg:SI 159) 0))
(const_int 4 [0x4]))
(and:DI (ior:DI (ior:DI (and:DI (subreg:DI (reg:SI 159) 0)
(const_int 4 [0x4]))
(subreg:DI (reg:SI 150) 0))
(subreg:DI (reg:SI 152) 0))
(const_int 1 [0x1])))
Please revert the patch.
--
Eric Botcazou