This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination
- From: "lacombar at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 May 2011 20:19:07 +0000
- Subject: [Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination
- Auto-submitted: auto-generated
- References: <bug-42494-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42494
--- Comment #15 from Arnaud Lacombe <lacombar at gmail dot com> 2011-05-13 20:14:08 UTC ---
trunk from early May also fails with one more "if (outcnt == 1) func ();" line
at the end of the function:
% ./gcc/cc1 -Os -o - test.c
.file "test.c"
test
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> <visibility> <early_local_cleanups> <whole-program>
<ipa-profile> <cp> <inline> <pure-const> <static-var>Assembling functions:
test .text
.globl test
.type test, @function
test:
.LFB0:
.cfi_startproc
movl $0, outcnt(%rip)
cmpl $0, outcnt(%rip)
je .L1
xorl %eax, %eax
jmp func
.L1:
ret
.cfi_endproc
.LFE0:
.size test, .-test
.ident "GCC: (GNU) 4.7.0 20110416 (experimental)"
.section .note.GNU-stack,"",@progbits
Target and host are x86-64-linux. -O2 and above are fine.