https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80884
amker at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from amker at gcc dot gnu.org ---
Seems this PR has been fixed sometime on GCC8:
$ ./powerpc-elf-gcc -mcpu=power6 -O2 20050830-1.c -o 20050830-1.S
-fdump-tree-ivopts-details -S
$ more 20050830-1.S
.file "20050830-1.c"
.section ".text"
.align 2
.p2align 4,,15
.globl foo
.type foo, @function
foo:
cmpwi 7,3,511
blelr 7
addi 9,3,-512
addi 10,3,-256
lis 8,a@ha
srwi 9,9,8
addi 9,9,1
la 8,a@l(8)
slwi 3,3,2
cmpwi 7,10,256
mtctr 9
add 3,3,8
li 9,42
blt 7,.L7
.L3:
stw 9,0(3)
addi 3,3,-1024
bdnz .L3
blr
.L7:
li 10,1
mtctr 10
b .L3
.size foo, .-foo
$ ./powerpc-elf-gcc --version
powerpc-elf-gcc (GCC) 8.0.0 20171218 (experimental)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Consider it's fixed.