http://llvm.org/bugs/show_bug.cgi?id=2655
Chris Lattner <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME | --- Comment #9 from Chris Lattner <[email protected]> 2009-05-06 11:21:06 --- The memcpy isn't present, but the memmove is. Taking the code from the description, adding nocapture to the stret result and using: $ llvm-as < t.ll | opt -memcpyopt | llvm-dis gives: define void @foo(%struct.out* nocapture sret %agg.result) { entry: %out = alloca %struct.out, align 4 ; <%struct.out*> [#uses=3] %tmp = getelementptr %struct.out* %out, i32 0, i32 0 ; <i32*> [#uses=1] %call = call i32 @bar() ; <i32> [#uses=1] store i32 %call, i32* %tmp %tmp1 = getelementptr %struct.out* %out, i32 0, i32 1 ; <i32*> [#uses=1] %call2 = call i32 @bar() ; <i32> [#uses=1] store i32 %call2, i32* %tmp1 %tmp3 = bitcast %struct.out* %agg.result to i8* ; <i8*> [#uses=1] %tmp4 = bitcast %struct.out* %out to i8* ; <i8*> [#uses=1] call void @llvm.memmove.i32(i8* %tmp3, i8* %tmp4, i32 8, i32 4) ret void } -- 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
