[LLVMbugs] [Bug 10292] New: redundant load not removed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 6 23:13:45 PDT 2011


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: unassignedbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu


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.



More information about the llvm-bugs mailing list