A common issue in RV32 is that i64 splats of fixed length vectors are legalized
to (bitcast v2i64 (build_vector <i32 x, i32 y, i32 x, i32 y>)).
These are then lowered in RISCVISelLowering to something like:
(insert_subvector (bitcast (extract_subvector (vmv_v_x_vl))))
RV64 doesn't have this problem since the insert_subvector and extract_subvector pairs are usually combined away, but the bitcast introduced with SEW=64 on RV32 prevents this from happening.
This patch handles the case by peeking through the inserts, bitcasts and
extracts to detect the "hidden" splats.