[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


http://llvm.org/bugs/show_bug.cgi?id=8644

           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 =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
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
false)
  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