This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Uncessary long long produced in tree-ssa?
Ian,
Thanks. My pointer type is 32-bit. But when I tried the ARM target, GCC
4.3.0 does produce simpler code. It is likely my porting has some issue.
Bingfneg
-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com]
Sent: 17 April 2008 18:31
To: Bingfeng Mei
Cc: gcc@gcc.gnu.org
Subject: Re: Uncessary long long produced in tree-ssa?
"Bingfeng Mei" <bmei@broadcom.com> writes:
> I noticed in some cases GCC 4.3.0 produces unnecessary long long data
> type in tree ssa form. It results in inefficient 64-bit arithmetic in
> our porting.
You neglected to mention the target. I assume that pointers are
64-bits. Otherwise this behaviour is inexplicable. With 64-bit
pointers, you need 64-bit arithmetic. gcc thinks it is being clever
by using an induction variable of the right type, rather than sign
extending the variable in the middle of the loop. That may be the
wrong choice for your target. In general gcc is not well optimized
for cases where pointers are larger than the ordinary register size.
If pointers are not 64-bits, then I have no idea what is going on.
Ian