[Bug target/12395] Suboptimal code with global variables
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 21 13:53:00 GMT 2008
------- Comment #14 from steven at gcc dot gnu dot org 2008-09-21 13:52 -------
Here is the .final_cleanup dump, fwiw:
;; Function foo (foo)
foo ()
{
int a.1;
<bb 2>:
a.1 = a + 1;
a = a.1;
if (a.1 != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
a = [plus_expr] a.1 + 1;
<bb 4>:
return;
}
which translates (on Cygwin) to:
.file "t.c"
.text
.p2align 4,,15
.globl _foo
.def _foo; .scl 2; .type 32; .endef
_foo:
movl _a, %edx
leal 1(%edx), %eax
movl %eax, _a
testl %eax, %eax
je L3
addl $2, %edx
movl %edx, _a
L3:
rep
ret
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2008-09-21 13:49:47 |2008-09-21 13:52:33
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12395
More information about the Gcc-bugs
mailing list