This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/82187] missed PRE at -O3
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Sep 2017 10:36:58 +0000
- Subject: [Bug tree-optimization/82187] missed PRE at -O3
- Auto-submitted: auto-generated
- References: <bug-82187-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82187
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-09-12
CC| |rguenth at gcc dot gnu.org
Summary|missing optimization |missed PRE at -O3
|pointer to char* |
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I see with -O2:
.L4:
movzbl (%rax), %edx
cmpb $97, %dl
je .L5
.L2:
addq $1, %rax
testb %dl, %dl
jne .L4
xorl %eax, %eax
ret
.L5:
movl $1, %eax
ret
so a single load in the loop. Something messes up at -O3.