<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:whitequark@whitequark.org" title="whitequark <whitequark@whitequark.org>"> <span class="fn">whitequark</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - clang emits memcpy for std::swap, which can introduce undefined behavior"
   href="https://llvm.org/bugs/show_bug.cgi?id=27498">bug 27498</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>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>DUPLICATE
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - clang emits memcpy for std::swap, which can introduce undefined behavior"
   href="https://llvm.org/bugs/show_bug.cgi?id=27498#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - clang emits memcpy for std::swap, which can introduce undefined behavior"
   href="https://llvm.org/bugs/show_bug.cgi?id=27498">bug 27498</a>
              from <span class="vcard"><a class="email" href="mailto:whitequark@whitequark.org" title="whitequark <whitequark@whitequark.org>"> <span class="fn">whitequark</span></a>
</span></b>
        <pre>Sorry but I am reopening this. Specifically because the generated IR violates
LLVM's own invariats! To quote LangRef for @llvm.memcpy: "The ‘llvm.memcpy.*‘
intrinsics copy a block of memory from the source location to the destination
location, which are not allowed to overlap."
<a href="http://llvm.org/docs/LangRef.html#id407">http://llvm.org/docs/LangRef.html#id407</a>

It might be that the fix is adjusting the contract of @llvm.memcpy--it is not
my call. But I would say that the current self-contradictory behavior is
indefensible.</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>