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.
Created attachment 21043 [details] ll reproducer Managed to convince bugpoint to cooperate. $ e:\work\upstream-llvm\build-vs2015-native-ninja\bin\llc.exe 2.ll Assertion failed: 0 <= InputIdx1 && "Unknown target shuffle input", file E:\work\upstream-llvm\llvm\lib\Target\X86\X86ISelLowering.cpp, line 30877
Reapplied with fix at rL345824
Test was added at rL345520