<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 - LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.dss"
   href="https://bugs.llvm.org/show_bug.cgi?id=43072">43072</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.dss
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

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

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

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

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>elvis.dowson@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I tried to compile SDL2 library from sources on an IBM Power9 system, using
clang-8.0.1 built from the 8.0 branch.

The options passed for building the library are as follows:
```bash
cmake -DCMAKE_BUILD_TYPE=Debug -DVIDEO_MIR=OFF -DVIDEO_KMSDRM=OFF
-DSDL_STATIC=ON -DEXTRA_CFLAGS='-gdwarf-4 -fpic -mabi=altivec -mvsx -maltivec
-mpower9-vector' -DEXTRA_LDFLAGS='-fpic' ${ARCH_OPTIONS} ../$SDL_DIR
e
```

I went through the debugging process and narrowed it down to a code generator
bug.

When I run the command
```
llc ./build-SDL-gui-backend-Debug/SDL_blit_N.bc
LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.dss

llc ./build-SDL-gui-backend-Debug/SDL_blit_N.bc -relocation-model=pic
LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.dss

llc ./build-SDL-gui-backend-Debug/SDL_blit_N.bc -relocation-model=static
LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.dss
```

Here is the output of the build process:

```bash
13 warnings generated.
fatal error: error in backend: Cannot select: intrinsic %llvm.ppc.altivec.dss
clang-8: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 8.0.1 
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-8: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/SDL_blit_N-ca38a1.c
clang-8: note: diagnostic msg: /tmp/SDL_blit_N-ca38a1.sh
clang-8: note: diagnostic msg: 
********************
```</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>