[LLVMbugs] [Bug 2411] New: Interprocedural constant propagation ignores weak attribute

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jun 4 00:29:33 PDT 2008


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

           Summary: Interprocedural constant propagation ignores weak
                    attribute
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: yingyi.liang at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1705)
 --> (http://llvm.org/bugs/attachment.cgi?id=1705)
Test case

Interprocedural constant propagation (-ipconstprop) propagates the result of
foo to main, regardless the weak attribute of foo:

define weak i32 @foo() nounwind  {
entry:
        ret i32 1
}

define i32 @main() nounwind  {
entry:
        %tmp1 = call i32 @foo( ) nounwind
        ret i32 %tmp1
}

test.ll as attached is the test case and test-ipconstprop.ll is the result
after applying "opt -ipconstprop".


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