<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Recent CC_default change broke intrinsics?"
   href="http://llvm.org/bugs/show_bug.cgi?id=17021">bug 17021</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>ASSIGNED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Recent CC_default change broke intrinsics?"
   href="http://llvm.org/bugs/show_bug.cgi?id=17021#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Recent CC_default change broke intrinsics?"
   href="http://llvm.org/bugs/show_bug.cgi?id=17021">bug 17021</a>
              from <span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span></b>
        <pre>The difference is that after my patch, we successfully recognize memcpy as a
builtin:

--- cc_after.ll 2013-08-28 13:16:19.875920600 -0700
+++ cc_before.ll        2013-08-28 13:16:26.360920600 -0700
@@ -53,7 +53,7 @@
   %call = call i8* @"\01?ident@@YAPAXPCX@Z"(i8* %arraydecay)
   %arraydecay1 = getelementptr inbounds [6 x i8]* %buff1, i32 0, i32 0
   %call2 = call i8* @"\01?ident@@YAPAXPCX@Z"(i8* %arraydecay1)
-  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %call, i8* %call2, i32 6, i32 1, i1
false)
+  %call3 = call i8* @memcpy(i8* %call, i8* %call2, i32 6)
   call void @"\01?UNREACHABLE@@YAXXZ"()
   ret i32 0
 }
@@ -61,6 +61,8 @@
 ; Function Attrs: nounwind
 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly,
i32, i32, i1) #2

+declare i8* @memcpy(i8*, i8*, i32) #1
+

Presumably LLVM lowers it to loads and stores.  Maybe if you put the function
pointer through ident() you'd get the original stack.

The weird thing is that this is not an LLVM optimization, it happens even with
-mllvm -disable-llvm-optzns and -O0.  It's something in clang.</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>