[LLVMbugs] [Bug 8644] New: [memcpyopt] not optimizing away memcpy feeding byval

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 18 00:12:43 PST 2010


           Summary: [memcpyopt] not optimizing away memcpy feeding byval
           Product: libraries
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: llvmbugs at cs.uiuc.edu

The testcase in PR8582 has a memcpy that isn't being eliminated, here's a
reduces testcase that memcpyopt + dse should eliminate:

target datalayout =
target triple = "x86_64-apple-darwin10.0.0"

declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32,
i1) nounwind

%T = type { i8, [123 x i8] }

define void @test3(i8 *%P) {
  %A = alloca %T
  %a = bitcast %T* %A to i8*
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %P, i64 124, i32 4, i1
  call void @baz(i8* byval %a) 
  ret void

declare void @baz(i8* byval)

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