LegalizeVectorTypes.cpp tries to widen loads and stores if possible, so that a load or store of v2i32 would become an operation with a single i64 for example. That is not beneficial in all cases. For example for a GPU supporting 3-element vector operations that will be more efficient to issue a single load of three 32 bit values than two distinct loads of 64 and 32 bit size.
The patch is to provide backend a way to tell if such transformation is desirable. The callback takes original operation width, a widened width and a MemSDNode to check if that is a store or load and its address space.