[LLVMbugs] [Bug 5183] New: call to func optimized out at -O2
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Oct 13 13:12:20 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=5183
Summary: call to func optimized out at -O2
Product: clang
Version: unspecified
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rdivacky at freebsd.org
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=3653)
--> (http://llvm.org/bugs/attachment.cgi?id=3653)
test case
the attached testcase is basically:
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
(*p) ();
which clang -O2 compiles to:
__do_global_ctors_aux:
pushl %ebp
movl %esp, %ebp
xorb %al, %al
.align 16
.LBB1_2:
notb %al
testb $1, %al
movb $0, %al
jne .LBB1_2
popl %ebp
ret
note that there is no call to the function... gcc generates the call
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list