Modify the peephole optimization for PowerPC so that it doesn't just simplify a shift feeding a splat but also a swap feeding a splat.
Also fixed a small bug in the original shift feeds splat code.
stefanp on Nov 9 2017, 12:18 PM.Authored by
This looks good, but of course, lets run this through all the testing before committing. Also, I think that for the test cases you added, you don't expect to see any swaps. You should be able to add -implicit-check-not to the RUN lines.
Thank you for fixing the issue with the register class - it has clearly existed in this code before your patch as well. My comments are minor nits.
The patch looks good to me, please run some tests with the verifier turned on and commit when you have a clean result.