This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Implement switch statements with bit tests
On Fri, Jan 24, 2003 at 06:45:30AM -0700, Roger Sayle wrote:
> I was originally thinking that SImode represented the natural
> word size of the target.
Nope, that would be word_mode. ;-)
> I don't suppose you would consider
> extending this strategy to DImode as the basis for a follow-up
> patch, rather than a show stopper for this one?
Um, I suppose so.
> This is a tricky one. I wasn't sure if the distinction that you
> make above is preserved by the time you reach RTL. Do target
> descriptions define ashlsi2qi?
No.
> It seems more a feature of front-ends with the undefined behaviour
> beyond word size that "1UL << (int)X" is effectively written in RTL
> as "1UL << (long)X", and "1 << (long)X" becomes "1 << (int)(long)X".
Yeah. Perhaps a mis-feature of the rtl expanders. It needn't
be headed by the backends, which can frob things back down to
QImode if they want. But they have to do that themselves.
r~