<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - llvm/clang doesn't inline __builtin_mempcpy"
   href="https://llvm.org/bugs/show_bug.cgi?id=26903">26903</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llvm/clang doesn't inline __builtin_mempcpy
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hjl.tools@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>david.l.kreitzer@intel.com, llvm-bugs@lists.llvm.org, zia.ansari@intel.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>[hjl@gnu-6 pr70155a]$ cat m.i 
extern char *src, *dst;

char *
foo1 (void)
{
  return __builtin_memcpy (dst, src, 16);
}

char *
foo2 (void)
{
  return __builtin_mempcpy (dst, src, 16);
}
[hjl@gnu-6 pr70155a]$
/export/build/gnu/llvm-clang-bootstrap/stage1/build-x86_64-linux/bin/clang -S
-O2 m.i
[hjl@gnu-6 pr70155a]$ cat m.s
    .text
    .file    "m.i"
    .globl    foo1
    .p2align    4, 0x90
    .type    foo1,@function
foo1:                                   # @foo1
    .cfi_startproc
# BB#0:
    movq    dst(%rip), %rax
    movq    src(%rip), %rcx
    movups    (%rcx), %xmm0
    movups    %xmm0, (%rax)
    retq
.Lfunc_end0:
    .size    foo1, .Lfunc_end0-foo1
    .cfi_endproc

    .globl    foo2
    .p2align    4, 0x90
    .type    foo2,@function
foo2:                                   # @foo2
    .cfi_startproc
# BB#0:
    movq    dst(%rip), %rdi
    movq    src(%rip), %rsi
    movl    $16, %edx
    jmp    mempcpy                 # TAILCALL
.Lfunc_end1:
    .size    foo2, .Lfunc_end1-foo2
    .cfi_endproc


    .ident    "clang version 3.9.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
fdef93f7bb7594c6a2a623835f9d5330184bf37c) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
ffadaf5667befa7f105aa48fca597d26d8c7ee49)"
    .section    ".note.GNU-stack","",@progbits
[hjl@gnu-6 pr70155a]$ 

I was expecting something like

foo2:
    movq    dst(%rip), %rax
    movq    src(%rip), %rcx
    movups    (%rcx), %xmm0
    movups    %xmm0, (%rax)
        addq    $16, %rax
    retq</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>