This is the mail archive of the gcc@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: Question about SUBREG handling in get_last_value


> On Tue, Nov 27, 2001 at 07:10:35PM -0500, John David Anglin wrote:
> > 	* combine.c (gen_lowpart_for_combine): Don't call simplify_gen_subreg
> > 	with a VOIDmode inner mode.
> 
> This, however, doesn't special-case CONST_INT.

That's because simplify_gen_subreg and for that matter simplify_subreg
abort unconditionally when innermode is VOIDmode.  I don't see how
simplify_gen_subreg can handle a CONST_INT if it doesn't know its mode.

I have another situation where simplify_subreg is called with a
VOIDmode innermode.  In that case, innermode probably should be
DImode (the mode of the register into which the CONST_INT was
substituted).  This can happen in simplify_if_then_else.  The function
known_cond can return can return a rtx with mode VOIDmode.  The simple
solution was to have known_cond return X if the modes of X and REG
differ.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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