This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] rtx_cost of SUBREG


> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]