<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 - [ppc] vec_sel variants missing"
   href="https://bugs.llvm.org/show_bug.cgi?id=46770">46770</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[ppc] vec_sel variants missing
          </td>
        </tr>

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

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

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

        <tr>
          <th>OS</th>
          <td>All
          </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>clang@evan.coeusgroup.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>According to the xlc documentation
(<<a href="https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/compiler.pdf?view=kc">https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/compiler.pdf?view=kc</a>>,
page 501), the following variants of vec_sel should be available:

vector bool long long
  vec_sel(vector bool long long
          vector bool long long,
          vector bool long long);

  vector bool long long
  vec_sel(vector bool long long
          vector bool long long,
          vector unsigned long long);

  vector signed long long
  vec_sel(vector signed long long
          vector signed long long,
          vector bool long long);

  vector signed long long
  vec_sel(vector signed long long
          vector signed long long,
          vector unsigned long long);

  vector unsigned long long
  vec_sel(vector unsigned long long
          vector unsigned long long,
          vector bool long long);

  vector unsigned long long
  vec_sel(vector unsigned long long
          vector unsigned long long,
          vector unsigned long long);

However, in clang the only variants declared in altivec.h for 64-bit types have
vector double for the first two arguments and the return value.

Reproducing is pretty straightforward, just enable -Wvector-conversion and try
to call one of the functions.  For example:

  #include <altivec.h>

  vector signed long long
  foo(vector signed long long a,
      vector signed long long b,
      vector unsigned long long c) {
    return vec_sel(a, b, c);
  }


Here it is on Compiler Explorer: <a href="https://godbolt.org/z/x71Gnj">https://godbolt.org/z/x71Gnj</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>