This is the mail archive of the
mailing list for the GCC project.
Abusive (?) promotions to int
- From: Alexandre Courbot <Alexandre dot Courbot at lifl dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 24 Sep 2003 12:00:55 +0200
- Subject: Abusive (?) promotions to int
I've been looking for macros to control integer promotions, especially for
temporary statements. Consider for instance the following code:
if (c + 4 > 10) ...
On my target, c gets zero_extended to int, then the addition and comparison
are performed in SImode, while it is not really necessary (could be done in
QImode as well and would save the zero_extend). This results in sub-optimal
code and additional memory requirements (which is important since I'm porting
to a smartcard target).
Is it possible to get rid of this? Is there a macro that can control that?
I've been looking at PROMOTE_MODE and SLOW_BYTE_ACCESS but it looks like they
can't do much for this.
Thanks in advance,