This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: powerpc64 doloop not used in all loops?
- From: Aaron Lehmann <aaronl at vitelus dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 19 Sep 2002 19:55:35 -0700
- Subject: Re: powerpc64 doloop not used in all loops?
- References: <20020920120835.N14457@bubble.sa.bigpond.net.au>
On Fri, Sep 20, 2002 at 12:08:35PM +0930, Alan Modra wrote:
> This testcase:
>
> #define NR_RUNS 100000
>
> void foo (void)
> {
> unsigned long i;
>
> i = NR_RUNS;
> do { } while (--i);
>
> i = NR_RUNS;
> do { } while (--i);
> }
>
> generates this code on powerpc64:
>
> .foo:
> lis 0,0x1
> ori 0,0,34464
> mtctr 0
> .L11:
> bdnz .L11
> lis 0,0x1
> ori 0,0,34464
> .L10:
> addic. 0,0,-1
> bne+ 0,.L10
> blr
Am I wrong to be disappointed that these loops aren't automatically
optimized out?