http://llvm.org/bugs/show_bug.cgi?id=10292
Summary: redundant load not removed
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
In the following example, tmp5 could be removed.
%zed = type { i8* }
define void @test(%zed** %bar) {
%tmp1 = alloca i8, align 8
%tmp2 = load %zed** %bar, align 8
%tmp3 = getelementptr inbounds %zed* %tmp2, i64 0, i32 0
%tmp4 = load i8** %tmp3, align 8
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp4, i64 24, i32 8, i1
false)
%tmp5 = load i8** %tmp3, align 8
call void @foobar(i8* %tmp1)
call void @foobar(i8* %tmp5)
ret void
}
declare void @foobar(i8*)
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32,
i1) nounwind
--
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