ia64 promote_mode
Richard Henderson
rth@cygnus.com
Fri Aug 11 15:31:00 GMT 2000
IA-64, unlike Alpha, has a 32-bit compare instruction. Following
Alpha in promoting to DImode results in both a sign-extension and
a truncate for an `int' counter around a loop. This confuses loop
so much that it gives up without recognizing the biv. Which of
course results in no strength reduction or unrolling.
It also appears to reduce the number of sign and zero extensions
overall. Grepping disassembly output of cc1 reveals a static
count of 8081 sxt4 instructions before the change and 5045 after.
The count of zxt4 insns drops from 2442 to 1326.
It doesn't help benchmark results, however. Address GIVs are
still not recognized.
r~
* config/ia64/ia64.h (PROMOTE_MODE): Only extend to SImode.
Index: config/ia64/ia64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.h,v
retrieving revision 1.33
diff -c -p -d -r1.33 ia64.h
*** ia64.h 2000/08/08 10:01:20 1.33
--- ia64.h 2000/08/11 22:22:15
*************** extern const char *ia64_fixed_range_stri
*** 300,314 ****
/* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and
which has the specified mode and signedness is to be stored in a register.
This macro is only called when TYPE is a scalar type. */
-
- /* ??? Maybe sign-extend 32 bit values like the alpha? Or maybe zero-extend
- because we only have zero-extending loads? */
#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
do \
{ \
if (GET_MODE_CLASS (MODE) == MODE_INT \
! && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
! (MODE) = DImode; \
} \
while (0)
--- 300,311 ----
/* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and
which has the specified mode and signedness is to be stored in a register.
This macro is only called when TYPE is a scalar type. */
#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
do \
{ \
if (GET_MODE_CLASS (MODE) == MODE_INT \
! && GET_MODE_SIZE (MODE) < 4) \
! (MODE) = SImode; \
} \
while (0)
More information about the Gcc-patches
mailing list