[LLVMbugs] [Bug 12233] New: dead code elimination does not work

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 10 12:46:52 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=12233

             Bug #: 12233
           Summary: dead code elimination does not work
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: screwer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Environment: 
    OS: Windows7, Compiler: MSVC2008 SP1, LLVM & CLang builded from trunk.

Repoduction:
    1) take old compiler test, "optbench.c":
http://www.koders.com/c/fidCC09E6AF2D9A028BE02BA3A69A1F79D296DD8D24.aspx?s=malloc
    2) compile it to IR via CLang
    3) optimize IR with "opt" tool. Use options O3, -adce, -dce, -die

Expected behavior:
    Function "dead_code" is eliminated.

Observer behavior:
    Function body only eliminated, nor call to the function. Callee code
consist "ret" opcode only. And this dummy call must be fully excluded, for my
opinion.
    Trying to optimize output again has no effect. Dead call still present.

-- 
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