Combine known_cond() may create subreg of const_int

Richard Henderson rth@redhat.com
Thu Feb 14 13:13:00 GMT 2002


On Thu, Feb 14, 2002 at 05:40:08PM -0200, Alexandre Oliva wrote:
> Thinking some more about it, it appears that we actually only need to
> handle ZERO_EXTEND, because SIGN_EXTEND is already taken care of by
> the fact that: (i) in (sign_extend:M X), X's mode must be narrower
> than M, and (ii) if X is a const_int, it's already a sign-extension
> for the narrower mode, so it's implicitly a sign-extension for the
> wider mode.  Agreed?

You're expecting that 

	(set (reg:SI 101) (const_int 0x1ff))
	(set (reg:SI 102) (sign_extend:SI (subreg:QI (reg:SI 101) 0)))

should be handled in two steps, with the subreg simplified first?
Yes, I can agree to that.

> I'm looking into that.  Any suggestions of targets on which you think
> this is most likely to expose problems?

No idea, really.


r~



More information about the Gcc-patches mailing list