Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed: 0 <= InputIdx1 && "Unknown target shuffle input", file E:\work\upstream-llvm\llvm\lib\Target\X86\X86ISelLowering.cpp #38831

Closed
gregbedwell opened this issue Oct 29, 2018 · 2 comments
Labels
backend:X86 bugzilla Issues migrated from bugzilla

Comments

@gregbedwell
Copy link
Collaborator

Bugzilla Link 39483
Resolution FIXED
Resolved on Nov 01, 2018 04:55
Version trunk
OS Windows NT
Attachments ll reproducer
CC @topperc,@echristo,@RKSimon,@rgal,@rotateright
Fixed by commit(s) 345520,345824

Extended Description

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.

@RKSimon
Copy link
Collaborator

RKSimon commented Nov 1, 2018

Reapplied with fix at rL345824

@RKSimon
Copy link
Collaborator

RKSimon commented Nov 1, 2018

Test was added at rL345520

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants