<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:stefanp@ca.ibm.com" title="Stefan Pintilie <stefanp@ca.ibm.com>"> <span class="fn">Stefan Pintilie</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - LLVM defines __GNUC__ but can't compile __builtin_crypto_vcipher on POWER8"
   href="https://bugs.llvm.org/show_bug.cgi?id=38378">bug 38378</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;">Resolution</td>
           <td>---
           </td>
           <td>WORKSFORME
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>stefanp@ca.ibm.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - LLVM defines __GNUC__ but can't compile __builtin_crypto_vcipher on POWER8"
   href="https://bugs.llvm.org/show_bug.cgi?id=38378#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - LLVM defines __GNUC__ but can't compile __builtin_crypto_vcipher on POWER8"
   href="https://bugs.llvm.org/show_bug.cgi?id=38378">bug 38378</a>
              from <span class="vcard"><a class="email" href="mailto:stefanp@ca.ibm.com" title="Stefan Pintilie <stefanp@ca.ibm.com>"> <span class="fn">Stefan Pintilie</span></a>
</span></b>
        <pre>Checked altivec.h and both of the __builtin and __builtin_altivec_ forms are
there. The function in the example given: __builtin_crypto_vcipher has been
part of altivec.h since 2015. It looks like LLVM does have all of the PPC
crypto functions available for use.

A quick test with this example:

$ cat builtins-ppc-crypto-vcipher.c
#include <altivec.h>

#define D_INIT1 { 0x0102030405060708, \
                  0x090A0B0C0D0E0F10 };
#define D_INIT2 { 0x7172737475767778, \
                  0x797A7B7C7D7E7F70 };

// <2 x i64> test_vcipher_e
vector unsigned long long test_vcipher_e(void)
{
  vector unsigned long long a = D_INIT1
  vector unsigned long long b = D_INIT2
  return __builtin_crypto_vcipher(a, b);
}

$ clang -c builtins-ppc-crypto-vcipher.c
$ echo $?
0

Looks like __builtin_crypto_vcipher is working.

There is a passing test case that is part of LLVM that tests all of the PPC
crypto builtins: ./tools/clang/test/CodeGen/builtins-ppc-crypto.c


I see that you are using xlC to compile instead of LLVM. This may be an xlC
only issue.</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>