[llvm-bugs] [Bug 38849] Redundant Restore of $x0 when memcpy always returns the first argument.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 18 13:40:08 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38849

Evandro Menezes <e.menezes at samsung.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Evandro Menezes <e.menezes at samsung.com> ---
It seems that the problem is that the return value from memcpy() is cast to
void*:

%struct.BigStruct = type { [64 x i32] }

define dso_local void @_Z17callStructByValueii9BigStruct(i32 %unused, i32
%unused2, %struct.BigStruct* nocapture readonly %s) local_unnamed_addr #0 {
entry:
  %agg.tmp = alloca %struct.BigStruct, align 4
  %0 = bitcast %struct.BigStruct* %agg.tmp to i8*
  %1 = bitcast %struct.BigStruct* %s to i8*
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 4 %0, i8* align 4 %1,
i64 256, i1 false), !tbaa.struct !2
  call void @_Z13structByValue9BigStruct(%struct.BigStruct* nonnull %agg.tmp)
  ret void
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180918/3edbbc53/attachment.html>


More information about the llvm-bugs mailing list