<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 - Assertion failed: 0 <= InputIdx1 && "Unknown target shuffle input", file E:\work\upstream-llvm\llvm\lib\Target\X86\X86ISelLowering.cpp"
   href="https://bugs.llvm.org/show_bug.cgi?id=39483">39483</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: 0 <= InputIdx1 && "Unknown target shuffle input", file E:\work\upstream-llvm\llvm\lib\Target\X86\X86ISelLowering.cpp
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>greg.bedwell@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>echristo@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>r345395 ([X86][SSE] Move 2-input limit up from getFauxShuffleMask to
resolveTargetShuffleInputs) introduced a new compiler failure.  This was later
reverted in r345451 due to a report of new failures, but without a testcase
just yet.

I'm not sure if this is the same failure that was observed, but we found this
in our testing so I'm reporting it, as presumably we'll want to re-land r345395
in some form at some point.


$ e:\work\upstream-llvm\build-vs2015-native-ninja\bin\clang.exe --version
clang version 8.0.0 (trunk 345380) (llvm/trunk 345395)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: e:\work\upstream-llvm\build-vs2015-native-ninja\bin

$ cat 1.cpp
struct a {
  float e;
  float f;
  float h;
};
float b(a &c, a &d) { return c.e * d.e + c.f * d.f + c.h * d.h; }
float g[6];
int j;
a *k;
void fn2(a &c) {
  for (int i = 0; i < j; ++i)
    g[i] = b(k[i], c);
}

$ e:\work\upstream-llvm\build-vs2015-native-ninja\bin\clang.exe -c 1.cpp -O2
-march=btver2
Assertion failed: 0 <= InputIdx1 && "Unknown target shuffle input", file
E:\work\upstream-llvm\llvm\lib\Target\X86\X86ISelLowering.cpp, line 30877

I would love to provide a reduced .ll input, but bugpoint has decided so far
not to be cooperative today.  Regardless, the above should be easily usable for
reproducing.</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>