Check if a build_vector node includes a repeated constant pattern and replace it with a broadcast of that pattern.
For example:
"build_vector <0, 1, 2, 3, 0, 1, 2, 3>" would be replaced by "broadcast <0, 1, 2, 3>"
This would decrease the code size and the size of chunks loaded from constant pool (less cache line splits and forwarding problems).
This can be reduced to:
APInt Val = SplatValue.lshr(ScalarSize * i).trunc(ScalarSize);