[LLVMbugs] [Bug 3054] New: Struct ret promotion doesn't handle first-class aggregates.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Nov 12 06:46:11 PST 2008


           Summary: Struct ret promotion doesn't handle first-class
           Product: new-bugs
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: fvbommel at wxs.nl
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=2198)
 --> (http://llvm.org/bugs/attachment.cgi?id=2198)
A sample .ll with an sret parameter being used by a load.

"opt -sretpromotion" doesn't do anything if any of the sret arguments have a
load instruction as one of their uses, even though the IR should be trivial to
update in this case. Either replace all uses of the load with the return value
(if the call dominates the load) or just store the return value to the sret
argument and let -mem2reg/-scalarrepl clean it up...
(Invokes may be trickier to update, but that can be checked for if necessary)

Attaching sample .ll to test with. (The following:
$ llvm-as <first-class-sret.ll | opt -sretpromotion | llvm-dis | grep sret
should show no instances of 'sret')

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