<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:e.menezes@samsung.com" title="Evandro Menezes <e.menezes@samsung.com>"> <span class="fn">Evandro Menezes</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Redundant Restore of $x0 when memcpy always returns the first argument."
   href="https://bugs.llvm.org/show_bug.cgi?id=38849">bug 38849</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WONTFIX
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Redundant Restore of $x0 when memcpy always returns the first argument."
   href="https://bugs.llvm.org/show_bug.cgi?id=38849#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Redundant Restore of $x0 when memcpy always returns the first argument."
   href="https://bugs.llvm.org/show_bug.cgi?id=38849">bug 38849</a>
              from <span class="vcard"><a class="email" href="mailto:e.menezes@samsung.com" title="Evandro Menezes <e.menezes@samsung.com>"> <span class="fn">Evandro Menezes</span></a>
</span></b>
        <pre>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
}</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>