THIS PATCH IS TO BE ABANDONED DUE TO EXCESSIVE COMPLEXITY. IT WILL BE SPLIT INTO SMALLER PATCHES BUT I'M KEEPING IT OPEN FOR REFERENCE UNTIL THE OTHERS ARE FINALIZED.
This patch accomplishes the following:
- Detects BUILD_VECTOR nodes whose operands are consecutive memory locations (ascending or descending) and converts the load to a vector load (with a possible vector shuffle)
- Converts a BUILD_VECTOR node whose operands are fp-to-int conversions into a BUILD_VECTOR of fp values followed by a single fp-to-int conversions
- Provides optimal patterns for common BUILD_VECTOR nodes on Power8 and Power9 (i.e. avoiding things like mfvsr -> mtvsr for converting fp scalars to integer vectors, etc.)
- Cleans up some redundant splats (i.e. after a splatting load, etc.)
The patch passes double bootstrap on Power8 LE with all the testing. I'll try to investigate the performance impact on the test suite test cases and post that in a follow-up comment.
I'll follow this patch up with similar improvements for BUILD_VECTOR nodes with floating point results.
This seems... weird.