<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Clang 7.0 missing Power9 __builtin_darn and friends"
   href="https://bugs.llvm.org/show_bug.cgi?id=39800">39800</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang 7.0 missing Power9 __builtin_darn and friends
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </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>Backend: PowerPC
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>noloader@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, nemanja.i.ibm@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>My apologies if this is the wrong classification.

Clang 7.0 is missing Power9 builtins that GCC provides. I also happen to want
to use 3 of them.

Grepping the LLVM 7.0 source code:

llvm_source$ cat llvm/test/MC/PowerPC/ppc64-encoding.s | grep darn -B 1 -A 1

  # CHECK-BE: darn 2, 3        # encoding: [0x7c,0x43,0x05,0xe6]
  # CHECK-LE: darn 2, 3        # encoding: [0xe6,0x05,0x43,0x7c]
              darn 2, 3

However, I can't seen to find the builtin:

  llvm_source$ grep -IR darn | grep builtin
  llvm_source$

The builtins I am looking for are:

  long long __builtin_darn (void);
  long long __builtin_darn_raw (void);
  int __builtin_darn_32 (void);

It would be nice to see some of them make it into Clang 7.0.1. (Re:
<a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Clang 7.0 claims unaligned load with POWER7 vec_xl"
   href="show_bug.cgi?id=39704">https://bugs.llvm.org/show_bug.cgi?id=39704</a>).

Also see
<a href="https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-ISA-3_002e0.html">https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-ISA-3_002e0.html</a>
and <a href="https://stackoverflow.com/q/53491053/608639">https://stackoverflow.com/q/53491053/608639</a> .</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>