http://llvm.org/bugs/show_bug.cgi?id=3054
Summary: Struct ret promotion doesn't handle first-class
aggregates.
Product: new-bugs
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs