The powerpcspe 64-bit load/store only allows a 8-bit delta (32 64-bit
words), so if the stack size is any larger than that, we need extra
spill slots for doing indexing.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | ||
---|---|---|
2071 | Should probably extend this sentence to include (or 8-bit immediate for powerpcspe). | |
llvm/test/CodeGen/PowerPC/spe-spills.ll | ||
8 | Is it possible to handwrite a simple test to expose the issue? If its too difficult we can stick with this test but I think something simpler which showcases the problem would be ideal. |
llvm/test/CodeGen/PowerPC/spe-spills.ll | ||
---|---|---|
8 | This is really odd, I am unable to reproduce the failure now, even rolling back to origin/release/10.x. The change needed is obviously correct, but being unable to test it is a problem. |
Funny thing, I'm able to reproduce it *only* while running natively on a powerpcspe based device, not on any other device I've tested. I'll try to reduce the testcase even further, since it really is unwieldy.
Simplify the test a little.
The problem with trying to write a simplified test by hand is it requires all
registers to be in use simultaneously, and all variables to be in scope
together, to exert register pressure. The best I can do is this test that's
slightly simplified (saves over 200 lines over the previous test) vs the
previous test. I hope it's sufficient.
As mentioned before, I can only seem to reproduce this running natively on powerpcspe; running the test on powerpc64, even without this patch, succeeds. This is extremely bizarre, but this fix gets the native build to produce the exact same text as running the test on powerpc64.
llvm/test/CodeGen/PowerPC/spe-spills.ll | ||
---|---|---|
424–460 | One thing to note: these flags are required to reproduce the problem, along with the !tbaa annotations in the code. Without them, even the otherwise failing llc would succeed. |
Should probably extend this sentence to include (or 8-bit immediate for powerpcspe).