This is the mail archive of the
mailing list for the GCC project.
Re: Question about SUBREG handling in get_last_value
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 27 Nov 2001 21:14:49 -0500 (EST)
- Subject: 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
J. David Anglin firstname.lastname@example.org
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)