<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 --- - PowerPC64: fatal error with -mcpu=power9"
   href="https://llvm.org/bugs/show_bug.cgi?id=31191">31191</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PowerPC64: fatal error with -mcpu=power9
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>Backend: PowerPC
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>anton@samba.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>amehsan@ca.ibm.com, hfinkel@anl.gov, kbarton@ca.ibm.com, llvm-bugs@lists.llvm.org, nemanja.i.ibm@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following test case:

int a, b, c;

void d(void)
{
        b = 8;

        for (; b <= 27; ++b) {
                char *e = (char *)&a;
                c &= ++*e;
        }
}

when built with:

clang -Wall -Os -mcpu=power9 -c testcase.c

fails with:

fatal error: error in backend: Cannot select: 0x10018a9cfa0: v16i8 =
BUILD_VECTOR Constant:i32<1>, Constant:i32<2>, Constant:i32<3>,
      Constant:i32<4>, undef:i32, undef:i32, undef:i32, undef:i32, undef:i32,
undef:i32, undef:i32, undef:i32, undef:i32, undef:i32, undef:i32,
      undef:i32
  0x10018a9c718: i32 = Constant<1>
  0x10018a9ce00: i32 = Constant<2>
  0x10018a9c9f0: i32 = Constant<3>
  0x10018a9d0d8: i32 = Constant<4>
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
  0x10018a9d140: i32 = undef
In function: d
clang-3.9: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 4.0.0 (git://github.com/llvm-mirror/clang.git
b3eb023bef514b684fcb374ae674c251e48514fd)
(<a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a>
9fdd2a607c03e086c571c54018ab87a4d40798e5)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/anton/llvm.install/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.9: note: diagnostic msg: 
********************

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