Previously we promoted v2i32 to v2i64. This patch changes this to widen to v4i32 instead.
I think widening is a better behavior for illegal vectors. In fact we have an experimental flag to do just that, that has been around for a few years.
There are definitely a few deficiencies observed in here, but I think overall this is an improvement. I'll submit more patches for some of the issues.
One of my goals is to try to clean up some of the handling we have to do to account for the current legalization around masked load, store, gather, and scatter.
convert to for-range loop or for (unsigned i = 0, e = Op.getNumOperands(); i != e; ++i) {
BTW - Can this diff be pulled out?